Why can I not log many signals for a long period of time using a PX4 autopilot and the UAV Toolbox?

2 views (last 30 days)
I have a Pixhawk 4 (PX4) autopilot with a 16GB Sandisk SD card that I am using to log data to. I want to log ~200 signals for ~10 min, but I cannot seem to log more than a few signals. I have followed all the troubleshooting steps here: https://www.mathworks.com/help/uav/px4/ref/px4-matfile-logging-example.html?s_tid=srchtitle.
What do I need to change in my model to achieve this logging goal, and what are the limits to logging based on the available RAM?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Apr 2024 at 0:00
In Configuration Parameters > Data Import/Export > Save to workspace or file, the 'Time' parameter may be checked. If this variable is checked, the memory required for logging is directly proportional to the model stop time and inversely proportional to the model sample time. After unchecking this parameter, you can log all signals (~200) at a sample time of 0.01 seconds for 600 seconds, and even for 6,000 seconds. To ensure the time data is still available, change the save format of the 'To Workspace' block to 'Structure with time'.
It is also important to know that the memory required for logging purposes is capped at 50% of the board's RAM. This is to ensure there is enough memory left for the rest of the flight stack and the algorithm.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!