[FOSS-GPS] High accuracy positioning with low cost GPS devices:a FOSS project

Jaykob jraible at gmx.de
Tue May 5 11:33:06 EDT 2009


Maybe I should add that NSEC_PER_SEC means nanoseconds per seconds (1000 000
000)



Jaykob wrote:
> 
>   DayTime AntarisMessage::nearestHz(DayTime time, int msgRateHz) const
>   {
> 	   int nSecPerHz = NSEC_PER_SEC / msgRateHz;
> 	   int nSec = (time.DOYsecond() - floor(time.DOYsecond())) *
> NSEC_PER_SEC;
> 	   nSec += nSecPerHz/2;
> 	   double adjust = nSec % nSecPerHz - nSecPerHz/2;
> 	   adjust /= NSEC_PER_SEC;
> 	   return time - adjust;
>   }
> 

-- 
View this message in context: http://n2.nabble.com/High-accuracy-positioning-with-low-cost-GPS-devices%3A-a-FOSS-project-tp1312818p2797931.html
Sent from the Open Source GPS-related discussion and support mailing list archive at Nabble.com.



More information about the FOSS-GPS mailing list