felixge / node-ar-drone

A node.js client for controlling Parrot AR Drone 2.0 quad-copters.
http://nodecopter.com/
MIT License
1.76k stars 428 forks source link

Support for uploading ephemeris #74

Closed wiseman closed 10 years ago

wiseman commented 11 years ago

As far as I know the Flight Recorder GPS requires ephemeris to be uploaded from the app. It would be nice to be able to do this and get a faster fix without having to use the app.

I see the Free Flight app send the following GPS-related commands, but I don't know yet how it's actually uploading the ephemeris:

AT*CONFIG=1355,"gps:longitude","-118.277018"
AT*CONFIG=1366,"gps:altitude","115.649048"
AT*CONFIG=1378,"gps:accuracy","65.000000"
AT*CONFIG=1386,"gps:ephemeris_uploaded","RESET"
AT*CONFIG=1468,"gps:ephemeris_uploaded","f437ec69aa76c90f4fe8d64b3122016a"
wiseman commented 11 years ago

It looks like after sending AT*CONFIG=1386,"gps:ephemeris_uploaded","RESET" a file called extendedEphemeris.ee is FTPed from the app to the drone. My guess is that when the drone receives AT*CONFIG=1468,"gps:ephemeris_uploaded","f437ec69aa76c90f4fe8d64b3122016a" it then runs the script /bin/updateEphemeris.sh which verifies the checksum and renames the file to /data/ephemeris.ee.

And f437ec69aa76c90f4fe8d64b3122016a is in fact the MD5 of that file:

$ md5 ephemeris.ee
MD5 (ephemeris.ee) = f437ec69aa76c90f4fe8d64b3122016a
wiseman commented 11 years ago

A comment at http://diydrones.ning.com/profiles/blog/show?id=705844%3ABlogPost%3A1292894&commentId=705844%3AComment%3A1294428&xg_source=activity claims the GPS receiver is a Telit JN3. http://www.telit.com/en/products/satellite.php?p_ac=show&p=114 has links to several PDFs with information about ephemeris injection, though I haven't been able to find a public source for the ephemeris files.

Client EE Distribution Server Setup describes http://agps.telit.com/ as a restricted access server from which ephemeris can be downloaded.

It looks like ephemeris.ee contains 14 days worth of ephemeris data, based on the file size and the table in SiRFInstantFix Application Note.

wiseman commented 11 years ago

Ephemeris is available at http://download.parrot.com/ephemerides/packedDifference.f2p14enc.ee

andrew commented 11 years ago

Awesome detective work!

seiflotfy commented 10 years ago

So if I set client.config("gps:longitude","-118.277018") will this tell it to go to that longitude?

andrew commented 10 years ago

Did you have any luck with this @wiseman?

wiseman commented 10 years ago

No, but it's not something I expect to be able to explore anytime soon, so I'll close it for now.

dlenski commented 8 years ago

Apologies for the random tangent here but I thought this might be interesting to other users of products based on CSR GPS. I came across this thread while searching for more information on the Sirf Instant Fix ephemeris file format. This format is also used by the TomTom GPS watches (as in ryanbinns/ttwatch and dlenski/ttblue).

It's really useful to find the link @wiseman posted to the 14-day ephemeris file: http://download.parrot.com/ephemerides/packedDifference.f2p14enc.ee

That file appears to be completely functionally equivalent to the 3-day ephemeris file provided by TomTom (except that the parrot.com version gives a longer timespan of ephemeris data :+1:): http://gpsquickfix.services.tomtom.com/fitness/sifgps.f2p3enc.ee

By the way, if any of you want to use the Russian GLONASS satellites, which are supposed to be more accurate at high latitudes, then you might try using the 3-day GLONASS ephemeris file provided by TomTom: http://gpsquickfix.services.tomtom.com/fitness/sifglo.f2p3enc.ee

wiseman commented 8 years ago

Cool, thanks for the info, @dlenski.