Hi Mark, > Heather keeps all times as a double precision Julian date. Using Heather's > code can > be a problem on Arduinos since their "double" precision numbers are actually > 32 bit > single precision, so you would need to do some more complicated math.
Ah, more complicated math to solve a problem vs. simpler math to avoid a problem in the first place. Here's a simple "GPS Day Number" example: www.leapsecond.com/tools/gpsdn.c To add 1024 weeks to a given date use: gpsdn = date_to_gpsdn(year, month, day); gpsdn += 1024 * 7; gpsdn_to_ymd(gpsdn, &year, &month, &day); That's it. It uses 32 bit integers; no floating point required; works on any OS, or Arduino. /tvb _______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.