Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. VOXL2 Time Sources

VOXL2 Time Sources

Scheduled Pinned Locked Moved Ask your questions right here!
2 Posts 2 Posters 156 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shawn_ricardo
    Contributor
    wrote on last edited by shawn_ricardo
    #1

    Hello,

    Recently, PX4 saved log files with a timestamp that was several days old. E.g., March 12th was the flight date, but files were saved under an existing March 9th directory. The flights were successful. PX4 itself was not running in the background but was stopped and started via terminal "voxl-px4 -d".

    So, I'm trying to understand 1) how this may be the case and 2) generally, how time is set

    Can you please verify the following sources? Also, can you provide a time hierarchy -- assuming multiple time sources are active, what would be the order of implementation?

    Sources:

    • NTP - if voxl2 is connected to the internet, will ping ntp. How is time forwarded to PX4?

    • Mavlink SYSTEM_TIME message - can be sent from the GCS, but is not required. This message will be consumed by voxl-mavlink-server::mavlink_services_handle_system_time to set the system time. How is PX4 time updated?

    • GPS data - Assuming GPS is enabled in PX4 configuration file and is valid lock, PX4 will publish mavlink message MAVLINK_MSG_ID_GPS_RAW_INT which is handled in voxl-mavlink-server. voxl-mavlink-server will correct time and send onto MPA. Do any services use this data to set system time?

    • Prior saved point - if none of the above exist, time is loaded from a prior saved point

    It seems like VOXL2 app can update PX4 system time and vice versa. Can you describe the various pathways time can be updated?

    Can you describe time setting hierarchy in the case that multiple sources are active? I'm assuming that the same delta check between received time and current system time is used across multiple locations?

    Eric KatzfeyE 1 Reply Last reply
    0
    • S shawn_ricardo

      Hello,

      Recently, PX4 saved log files with a timestamp that was several days old. E.g., March 12th was the flight date, but files were saved under an existing March 9th directory. The flights were successful. PX4 itself was not running in the background but was stopped and started via terminal "voxl-px4 -d".

      So, I'm trying to understand 1) how this may be the case and 2) generally, how time is set

      Can you please verify the following sources? Also, can you provide a time hierarchy -- assuming multiple time sources are active, what would be the order of implementation?

      Sources:

      • NTP - if voxl2 is connected to the internet, will ping ntp. How is time forwarded to PX4?

      • Mavlink SYSTEM_TIME message - can be sent from the GCS, but is not required. This message will be consumed by voxl-mavlink-server::mavlink_services_handle_system_time to set the system time. How is PX4 time updated?

      • GPS data - Assuming GPS is enabled in PX4 configuration file and is valid lock, PX4 will publish mavlink message MAVLINK_MSG_ID_GPS_RAW_INT which is handled in voxl-mavlink-server. voxl-mavlink-server will correct time and send onto MPA. Do any services use this data to set system time?

      • Prior saved point - if none of the above exist, time is loaded from a prior saved point

      It seems like VOXL2 app can update PX4 system time and vice versa. Can you describe the various pathways time can be updated?

      Can you describe time setting hierarchy in the case that multiple sources are active? I'm assuming that the same delta check between received time and current system time is used across multiple locations?

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @shawn_ricardo A couple of quick points. First of all, PX4 just queries the Linux system time so there's no mechanism to set a separate notion of system time in PX4. If the VOXL 2 is connected to the internet then, yes, it will update the Linux system time with NTP. But VOXL 2 has no battery backed RTC so if it cannot get system time from NTP then it uses the last saved time which is typically the last time there was a connection to an NTP server. Also, in newer versions of our PX4 we get rid of the -t option when starting the logger module so it will not use the system time. Instead it will just create session directories and log files within them in increasing numerical order. So, highest numbered log file in highest numbered session directory is the latest log.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      ModalAI
      Categories Recent Tags ModalAI.com Docs
      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups