Reply
Thread Tools
Posts: 164 | Thanked: 132 times | Joined on Dec 2007
#1
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?
__________________
See my collection of maemo apps: http://nitapps.com
 

The Following 3 Users Say Thank You to ag2 For This Useful Post:
Posts: 251 | Thanked: 22 times | Joined on Dec 2007 @ Houston, Texas
#2
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.
 
Posts: 164 | Thanked: 132 times | Joined on Dec 2007
#3
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.
__________________
See my collection of maemo apps: http://nitapps.com

Last edited by ag2; 2008-02-02 at 21:15.
 
Posts: 164 | Thanked: 132 times | Joined on Dec 2007
#4
Originally Posted by rdcinhou View Post
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.
__________________
See my collection of maemo apps: http://nitapps.com
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#5
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's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#6
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.
 
Posts: 164 | Thanked: 132 times | Joined on Dec 2007
#7
Originally Posted by debernardis View Post
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.
__________________
See my collection of maemo apps: http://nitapps.com
 
Posts: 164 | Thanked: 132 times | Joined on Dec 2007
#8
Filed a bug. Please vote for it!

https://bugs.maemo.org/show_bug.cgi?id=2877
__________________
See my collection of maemo apps: http://nitapps.com
 

The Following 2 Users Say Thank You to ag2 For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#9
(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
 
Posts: 139 | Thanked: 24 times | Joined on Sep 2005
#10
Originally Posted by ag2 View Post
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.
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:10.