Step 1 configure a simulink model for mat file logging.
Mat file logging.
Mat file logging on sd card for px4 autopilots.
Step 2 prepare model for simulation and deployment.
For example the storage class getset causes the outport to appear in the generated code as a function call which is not addressable.
For example the storage class getset causes the outport to appear in the generated code as a function call which is not addressable.
On for the grt target off for ert based targets.
Mat file logging does not support outport blocks to which you apply the storage class importedexternpointer or storage classes that yield nonaddressable data in the generated code.
Also select the desired spi module and spi baud rate and ensure in the spi x pane that all configurations are as required.
For example the storage class getset causes the outport to appear in the generated code as a function call which is not addressable.
Select the enable mat file logging on sd card checkbox.
Step 3 optimize the simulink model to reduce the memory required for logging and deploy on pixhawk 1 hardware.
When you select this option the generated code saves to mat files simulation data specified in one of the following ways.
From the mat file variable name modifier list select an option to add rt as prefix or rt as suffix to the variable name in the mat file.
To use a variable name without any modification select none.
In the configuration parameters dialog box go to code generation interface and expand advanced parameters or type mat file logging in the search box.
Mat file logging does not support outport blocks to which you apply the storage class importedexternpointer or storage classes that yield nonaddressable data in the generated code.
Configuration parameters data import export see model configuration parameters.
Data import export to workspace blocks.
To enable mat file logging go to target hardware resources sd card logging.
Code generation interface settings.
Select the mat file logging option.