Hi everyone , I am trying to calculate the time-delay in ms[milliseconds] of my external navigation system as EKF3 .
To do this I am using a technique. I set the LOG_DISARM parameter to 1 and set an EKF origin , so I can acquire the logs while the drone is unarmed. To save some meaningful values in the logs that make me recognize the accelerometer peaks, I move the drone as fast as possible back and forth a few times with waits between each movement (In such a way as to distinguish the groups of peaks from each other(through a line at the start of the group and at the end of the group)
After doing this, I open the log in the mission planner analyzer.
This is a group of three peaks (i.e. 3 drone movements). The red line represents the accelerometer movements and the green line represents the estimated velocity of North Component’s External Navigation System
What I want to find out is the delay that exists between the peaks of the estimated velocity of external navigation and those of the accelerometer (X axis) in time( I would need this time value in the unit of measurement of milliseconds)
Obviously I expect the peaks of the IMU.AcceX (Accelerometer) to arrive first and then those of the external nav . Mission planner offers the possibility to display the time values on the graph, by pressing: right button and then show values
From what I believe, i have to make a difference between the times of the peaks. In this case following the image below to find the delay between the peak “a2” and “a1” to do delay=(ta2-ta1)[ms], and the same operation for the following peaks
I expect a delay between 20 and 40 ms or anyway constant value even with the other peaks
MY TARGET:
I wanted to get some advice from you regarding the method used to save the log and the program used to view and analyze them. I think Mission planner doesn’t offer much accuracy regarding the time value. Mavexplorer would, I believe, offer better accuracy, but it does not offer a unit of time in milliseconds.
I I need to find a way or a mathematical formula(I had found this formula to use in mavexplorer but I did not understand its use, maybe someone knows it : sqrt( NKF3.IPN^2 + NKF3.IPE^2 ) / GPS.Spd )
To calculate this delay as precisely as possible preferably using mavexplorer or python scripts maybe.
I am also ready to hear advice on the correct method of measurement or your experiences in this field
Thanks to everyone