Introducing my ulog flight data analyzer for octave

While developing drones using px4, I needed to analyze flight data and manipulate for some reasons.
There are some convenient tools such https://logs.px4.io/ however it cannot work with custom messages such as debug_vect or debug messages.

So I write some script that can read data parsed and converted ULog by pyulog and plot using octave.
Octave is a free software almost same as matlab in terms of plotting, visualization.

Below is a screenshot of plots generated by above mentioned script.

or check out the video here

All the scripts can be downloaded from my github page here

If you need any help running the script please let me know.

Kyu

7 Likes

@Kyuhyong_You, Thanks for sharing this. I gave it a try, but I’m getting a ‘time_flow’ error when it calls the plotPositionControl() function. I used a very large log file from a long flight (1:11:49) though and maybe that is causing the error.

error: 'time_flow' undefined near line 165 column 84
error: called from
plotUlogs at line 165 column 3

Hi AI_B,
Sorry there was a bug when flow data is not available time_flow is not set as 0 in line 122.
Change as below
else flow_int_xy = [ 0 0 ]; ==> else time_flow = 0; flow_int_xy = [ 0 0 ];

or git pull again.
Thanks,

Kyu

It works now. Thanks Kyu for the quick fix.

1 Like

I found roll pitch yaw data in vehicle attitude data is actually rollspeed, pitchspeed and yawspeed respectively and real attitude is stored as quaternions.
So I added quaternion to euler process to fix roll pitch yaw data.
Please git pull again to fix the issue.
Thanks,

Awesome! I’ve been using excel when I have to get deep on something, big pain in the ass. Thanks for sharing!

I think a truly valuable tool would be auto generating a lot of the base code i.e: “plotThing.m”. You could reference Firmware/msg to get the data structure information. Titles/legends/units would need to be populated manually, but maybe if you pushed this upstream you could adapt the comments in the .msg files such that those too could be interpreted by the scripts as well.

Hi @dakejahl,
Thanks for your comment.
Auto generating plotXX.m maybe a good idea but it requires firmware and changing plot items require changing in the script.
I just want to make simple as possible and add and remove items easily in the .m file itself. :wink: