Why doesn't Mission Planner display microseconds in the console?

I'm trying to display the current time down to the microsecond (for latency measurements) after each command sent in a script, but everything smaller than a second appears as All Zeroes!

How can I get Mission Planner to display the current time down to the microsecond in the script console???

This is the output I get in Mission Planner:


Here's a portion of the code for the script I'm using [Link to the full script being run]:

Views: 386

Reply to This

Replies to This Discussion


import System

dt = System.DateTime.Now
st = dt.ToString("yyyy-MM-ddTHH:mm:ss.fff") + ' setting wp 1'

print st


This helped! Thanks!!!

But now I need Mission Planner to display in the HUD the time down to the millisecond (even better: microsecond!) when I load a telemetry log...

Do you know off hand which file I need to modify to implement this change?

is this for realtime, or post processing?

I'm using it for post processing... I have the script displaying the timestamp of when the command was processed/transmitted; now I need the exact microsecond (or millisecond if that's the best I can get) that the telemetry indicates the command was processed on the APM.

For clarity: The command MAV.setGuidedModeWP(item) is run in the script, immediately followed by a print statement displaying the timestamp: "2014-02-07 17:09:19.767205 Guiding to WP 1"

THEN, I see the mode change on the HUD about ½ second later... I need to know exactly when the mode changes to determine the precise latency.


Disregard the Mission Planner HUD mod... I'm able to use the output from mavlogdump.py (in the pymavlink library) to identify the time of different events.

However, can you tell me if Mission Planner tlog files record both the transmitted command FROM Mission Planner along with the data received from the APM?

I ask because I noticed that when I send one command (e.g., "SET_MODE"), the .tlog shows it twice — is one the Mission Planner transmission, and the second an immediate response from the APM? Because the MISSION_ACK doesn't come until later (not immediately following the transmitted command)

Reply to Discussion



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service