Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    GNSS - When is Time Valid? - Enhance NavData.posFixMode?

    Spresense
    2
    3
    5672
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      m Lewis last edited by

      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.

      1 Reply Last reply Reply Quote
      • K
        KamilTomaszewski DeveloperWorld last edited by

        @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

        1 Reply Last reply Reply Quote
        • M
          m Lewis last edited by

          Great, thank you!

          1 Reply Last reply Reply Quote
          • First post
            Last post
          Developer World
          Copyright © 2021 Sony Group Corporation. All rights reserved.
          • Contact us
          • Legal