|
|
@ -27,9 +27,13 @@ local function write_to_dataflash() |
|
|
|
|
|
|
|
|
|
|
|
-- care must be taken when selecting a name, must be less than four characters and not clash with an existing log type |
|
|
|
-- care must be taken when selecting a name, must be less than four characters and not clash with an existing log type |
|
|
|
-- format characters specify the type of variable to be logged, see AP_Logger/README.md |
|
|
|
-- format characters specify the type of variable to be logged, see AP_Logger/README.md |
|
|
|
|
|
|
|
-- https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_Logger |
|
|
|
-- not all format types are supported by scripting only: i, L, e, f, n, M, B, I, E, and N |
|
|
|
-- not all format types are supported by scripting only: i, L, e, f, n, M, B, I, E, and N |
|
|
|
-- lua automatically adds a timestamp in micro seconds |
|
|
|
-- lua automatically adds a timestamp in micro seconds |
|
|
|
logger.write('SCR','roll(deg),pitch(deg),yaw(deg)','fff',interesting_data[roll],interesting_data[pitch],interesting_data[yaw]) |
|
|
|
logger.write('SCR1','roll(deg),pitch(deg),yaw(deg)','fff',interesting_data[roll],interesting_data[pitch],interesting_data[yaw]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- it is also possible to give units and multipliers |
|
|
|
|
|
|
|
logger.write('SCR2','roll,pitch,yaw','fff','ddd','---',interesting_data[roll],interesting_data[pitch],interesting_data[yaw]) |
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|