maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N810 (https://talk.maemo.org/forumdisplay.php?f=28)
-   -   Theory about why GPS performs poorly (https://talk.maemo.org/showthread.php?t=16057)

ag2 2008-02-02 09:00

Theory about why GPS performs poorly
 
Something I discovered today -- if you turn on the internal GPS on N810, and watch D-BUS messages, you see GPS timestamps for each fix. The time in these fixes is very accurate, but the date is always ONE DAY OFF.

Right now it is 1 am on February 2nd. The timestamps coming from GPS are around 1202027650, which ctime tells me is

Sun Feb 3 00:39:11 2008

If there is indeed an off-by-one error, this could explain the poor GPS performance in acquiring satellites (since the almanac data would be invalid). Perhaps there is a simple fix that could make the GPS in our tablets significantly better.

I hope I am onto something. Anyone know of a legitimate reason for the time difference?

rdcinhou 2008-02-02 09:15

Re: Theory about why GPS performs poorly
 
Are the timestamps UTC (GMT) time? Is the difference between the timestamp and your local time, the difference in timezones?

If so...not an error.

ag2 2008-02-02 09:17

Re: Theory about why GPS performs poorly
 
Update: with a BT-connected GPS, I am also seeing +1 day timestamps. So if there is a bug, it is in gpsd, and not in gpsdriver or the chip firmware.

ag2 2008-02-02 09:20

Re: Theory about why GPS performs poorly
 
Quote:

Originally Posted by rdcinhou (Post 137054)
Are the timestamps UTC (GMT) time? Is the difference between the timestamp and your local time, the difference in timezones?

If so...not an error.

Not sure what you are asking. The timestamps are indeed UTC. I convert them to local time with ctime(). I am 8 hours away from GMT, but see a 24-hour error in GPS values.

free 2008-02-02 10:38

Re: Theory about why GPS performs poorly
 
With 24h I guess you'll have a huge error. I don't know what's the orbit time of gps sat. 15hours?

go to bugs.gps.org and fill a bug :)

debernardis 2008-02-02 11:12

Re: Theory about why GPS performs poorly
 
how do you monitor? I tried dbus-monitor --system but the time value seems to be shown in exponential format so that I lose several least significan digits.

ag2 2008-02-02 19:30

Re: Theory about why GPS performs poorly
 
Quote:

Originally Posted by debernardis (Post 137084)
how do you monitor? I tried dbus-monitor --system but the time value seems to be shown in exponential format so that I lose several least significan digits.

dbus-monitor displays double values to 5 significant digits, so you only lose 4 digits (10000 seconds = 2.5 hours).

[user@nokia ~]$ dbus-monitor --system
signal sender=:1.76 -> dest=(null destination) path=/org/gpsd; interface=org.gpsd; member=fix
double 1.20207e+09

[user@nokia ~]$ python
>>> from time import *
>>> ctime(1.20207e+09)
'Sun Feb 3 12:20:00 2008'
>>> ctime()
'Sat Feb 2 11:29:25 2008'

If you need exact timestamps, you can write your own signal listener (only a few lines of Python) or download the source of dbus-monitor and hack it to print doubles with %f instead of %g.

ag2 2008-02-02 19:57

Re: Theory about why GPS performs poorly
 
Filed a bug. Please vote for it!

https://bugs.maemo.org/show_bug.cgi?id=2877

tz1 2008-02-02 21:52

Re: Theory about why GPS performs poorly
 
(apologies for the crosspost, but this seems on-topic here too)

using the statusbar process viewer, the following command will allow you to start the GPS and log NMEA output to the external card (without running the actual map program):

sh -c '/usr/libexec/navicore-gpsd-helper >>/media/mmc1/gpslog.txt'

It is not timestamped, but can show the acquisition process.

You can watch it better in an xterm, but this lets me turn the GPS on for my old zmapper I ported from the zaurus.
Edit/Delete Message

jussik 2008-02-02 23:14

Re: Theory about why GPS performs poorly
 
Quote:

Originally Posted by ag2 (Post 137299)
If you need exact timestamps, you can write your own signal listener (only a few lines of Python) or download the source of dbus-monitor and hack it to print doubles with %f instead of %g.

I just tested the c library, it's broken too. Confirmed your bug and added the details: The NMEA is correct but osso-gpsd adds exactly 24 hours...

Oh, and don't bother filing a bug on gpsd upstream at least without testing on a modern gpsd version. the gpsd version Nokia uses is quite ancient and heavily patched.


All times are GMT. The time now is 11:46.

vBulletin® Version 3.8.8