Change the SD card data logging rate on Pixhawk

Hi there,
I need to analyse some flight data for a uni project but I need the data to be recorded at around 100 Hz. I have seen (in the sdlog2 parameter file) that the fastest rate is 250 Hz and the default rate is 25 Hz.

Does anyone know if it is possible to change the data logging rate to the sd card through mission planner? Or any other method to change the rate?

Cheers,
Stu

I need to analyse some flight data for a uni project but I need the data to
be recorded at around 100 Hz. I have seen (in the sdlog2 parameter file)
that the fastest rate is 250 Hz and the default rate is 25 Hz.

Which data do you need at the faster rate?

Hi Peter,
Pretty much all the flight data such as pitch, roll, yaw, airspeed, RC control inputs etc.

A couple thoughts:

  1. Logging at a faster rate takes away available processor time from other tasks. I am not sure how much “extra time” is available for use… be aware that increasing logging rates may cause performance problems.

1.5) There are ways to determine if performance is suffering (I think the keyword is “Performance Monitoring”) but they may be difficult and I personally can’t give any advice.

  1. If you’re committed to changing the logging rates to see what happens, try modifying is the scheduler task table in ArduPlane.cpp.

Thanks for that.
In order to update the scheduler task and apply it to the Pixhawk do I need to edit the scheduler task table using PX4 Toolchain via Eclipse and then rebuild the firmware with those changes?
I’m very new to Mission Planner and the Arduplane code so I apologise if this is a silly question!
Cheers

It’s most correct to say that you need to “Edit the scheduler task in the ArduPlane firmware, then re-build it and upload to your Pixhawk.”

You are describing (what I think is) one specific way to do that (PX4 Toolchain via Eclipse) but I am not sure… I’m not an Eclipse user. Take a look at this page on Building the Code. (http://ardupilot.org/dev/docs/building-the-code.html) I see there that Eclipse is one of the options that you might pursue.

That’s great thanks. What are your preferred options for building code?

I work in Linux, and use “make”. (That’s a pretty standard way to work with C/C++ in Linux.)

I have heard that perhaps ArduPilot is transitioning towards a build system called “waf” and I’ve used that before too, so I’ll welcome that change if it ever comes.

I didn’t mean at all to imply there’s anything wrong with Eclipse! That is a fine way to do it, and I’m sure lots of folks do that regularly.

I meant only to say that I (personally) can’t answer many questions about it… just in case that wasn’t clear.

If you are not a Linux user, I’m not sure if it’s worth getting Linux JUST to build the way I do. If you’re a Windows user, I would first check out Windows+Make http://ardupilot.org/dev/docs/building-px4-with-make.html (and I might be able to help if you run into issues) You might also check out http://ardupilot.org/dev/docs/building-ardupilot-onwindows10.html if you’re using Windows10 64-bit.

That’s a great help man. Thanks for taking the time to respond too, much appreciated!

1 Like