date -d "12am dec 31 1989" +"%s"
tells me that that's 631065600 seconds after the start of 1970, so just
add 631065600 to the gps timestamp and you'll have a good old UNIX epoch
timestamp which you can then pass to localtime and gmtime or whatever else
wants the date and time.
By the way, if "12am dec 31 1989" means 12 midnight new year's eve then use
631152000 instead.
Fergal
At 21:54 02/05/00, CARTER JOHN wrote:
>i'm doin' a gps server for linux
>it has these data structures called track points
>these are stap shots of the gps's location at specific point in time
>anyway these trackpoints contain latitude longitude and a time stamp.
>the timestamp is stored as a "long" and it contains the number of seconds
>since
>12am dec 31 1989.
>>is there a function that will conver this to a more user fiendly :-)
>>thanks john
>>ps thanks for the replys to the 64bit thingy
>i still haven't solved that one.( my last attempt was tackeling it wrong)
>the gps(in its infinite wisdom) is sending be the latitude and longitide in
>radians as two 8 byte strings
>each is an IEEE 64bit double. but the most significant byte is #7 and with
>in number #7 the msb is #15
>once this has been put together (no idea how to in a 32 bit machine) it as
>to be multilplied by 180/M_PI
>to convert to degrees
>>any ideas
>>thanks john
>>>--
>Irish Linux Users' Group: ilug at linux.ie>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
>List maintainer: listmaster at linux.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!