Pixhawk 2 Data Output Units

Hi All,

I have conducted a series of test flights with Pixhawk 2, and I’m looking to create a .CSV with the data output.

Firstly I need to know the units of measurement for the data output from the RLOG onboard the PX4

I’m hoping for things like Pitch/Roll/Yaw in Degrees and Altitude in M or FT. The altitude would appear to output in .mm!

Any help would be appreciated!

Thanks

I have conducted a series of test flights with Pixhawk 2, and I’m looking
to create a .CSV with the data output.

Excellent.

Firstly I need to know the units of measurement for the data output from
the RLOG onboard the PX4

Are you refering to the ‘.BIN’ files created during flight?

I’m hoping for things like Pitch/Roll/Yaw in Degrees and Altitude in M or
FT. The altitude would appear to output in .mm!

We recently added a feature to master so that the log includes the units
for each field. You can use the source code to do this mapping by hand
(AFAIK no tool is taking advantage of the units yet).

https://github.com/ardupilot/ardupilot/blob/master/libraries/DataFlash/LogStructure.h#L74

Those are all the units.

https://github.com/ardupilot/ardupilot/blob/master/libraries/DataFlash/LogStructure.h#L1200

That’s the “attitude” (“ATT”) message.

Copying it here:
“ATT”, “QccccCCCC”,
“TimeUS,DesRoll,Roll,DesPitch,Pitch,DesYaw,Yaw,ErrRP,ErrYaw”, “sddddhhdh”,
“FBBBBBBBB” }, \

The first column is the name. The second is the data length. The third
isthe labels. The fourth is the SI unit list for each field (e.g.
seconds). The fifth is the unit multiplier.

Multiplier list:
https://github.com/ardupilot/ardupilot/blob/master/libraries/DataFlash/LogStructure.h#L113

So let’s look at the first column in the “ATT” data.

“Q” is a signed 64-bit type, so this column can store pretty big numbers.
“TimeUS” is an awesomely descriptive label for the column. This column
stores the microseconds since system boot. (Time micro-seconds).
“s” indicates this column uses the SI unit seconds
“F” indicates a multiplier of 1e-6 - the value must be multiplied by
this to get its actual value. This puts the “micro” in microsecond.

Any help would be appreciated!

HTH.

You might like to look at mavlogdump.py to retrieve your CSV data. And
MAVExplorer.py for playing with the log file generally.

Yours,