Critical stats

Just thought I’d share with you the critical stats logged to console during a flight.

The majority of the stats data (about 0.5MB for a 10s flight) are logged at warning level to file (actually to shared memory and then dumped to file at the end of flight for performance reasons) allowing for post flight analysis.

The following critical stats are logged to file and console so I can check critical config and calibration prior to flight, flight progress and post-flight performance.

Pre-flight checks passes, enjoy your flight, sir!
calibrate_sensors = False, fly = True, hover_speed = 680, shoot_video = False, vvp_gain = 300.000000, vvi_gain = 150.000000, vvd_gain= 1.500000, hvp_gain = 0.500000, hvi_gain = 0.250000, hvd_gain = 0.050000, aap_gain = 2.500000, aai_gain = 0.000000, aad_gain = 0.010000, arp_gain = 140.000000, ari_gain = 0.000000, ard_gain = 2.500000, test_case = 0, tau = 0.500000, dlpf = 4, loop_frequency = 100, matrix = 2
Platform tilt: pitch -0.610291, roll -0.094064
Platform motion: qax -0.010648, qay -0.001641, qaz 0.999648, g 0.999706
Platform motion: eax 0.000000, eay 0.000000, eaz -0.000294, g 0.999706
#AB: TRANSITIONING
#AB: ASCENDING
#AB: TRANSITIONING
#AB: HOVERING
#AB: TRANSITIONNG
#AB: TRANSITIONING
#AB: TRANSITIONING
#AB: TRANSITIONING
loop speed 95.777507 loops per second
% fsm: 1.810349
% sensors: 40.043741
% eangles: 1.625082
% iangles: 0.495392
% angles_filter: 0.837208
% axes_shift: 1.772628
% speed_pids: 5.008621
% angle_pids: 8.999825
% pid_outputs: 8.510055
% pid_diagnosticss: 21.673254
% sleep: 9.416033

The interesting bits in the current testing context are the pre-flight “Platform” logs; they show the pitch / roll angles prior to take-off, the accelerometer readings along Phoebe’s axes, and the conversion to the earth axes.

You can see the take-off platform (the ground) wasn’t completely horizontal, and this shows up in the difference between the qa* and ea* values.  However what’s reassuring is that the total measure of g in both sets of axes comes out to 0.999706g; also reassuring is that the earth axis eax and eay figures are zero to 6 decimal places.  My only concern is that eaz is -0.000294 (I’ve subtracted 1g at this point), suggesting a roughly -3mms-2 vertical acceleration when stationary; for the moment I’m just using this as an offset ‘tweak’.

This gives me yet more confidence the angles / axes code is good, and I should stop spending too much time considering it as the cause for drift.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.