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]:
dt = System.DateTime.Now
st = dt.ToString("yyyy-MM-ddTHH:mm:ss.fff") + ' setting wp 1'
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?
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)
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.