GNSS - When is Time Valid? - Enhance NavData.posFixMode?
-
Typically GNSS provide accurate Date/Time well before 3D Position Fix is achieved. Is there a simple API (Arduino) to determine whether Date/Time is valid? If not, how about adding a value to the enumeration SpFixMode for TimeIsValid that can be retrieved from NavData.posFixMode. Then a RealTimeClock could be set much earlier.
-
@m-Lewis The easiest way to check that the date and time are valid is:
/* Check update. */ if (Gnss.waitUpdate(-1)) { /* Get NaviData. */ SpNavData NavData; Gnss.getNavData(&NavData); /* Check date and time. */ if (NavData.time.year > 1980) { /* Date and time are valid */ }
Best Regards,
Kamil Tomaszewski -
Great, thank you!