Hello there,
I am currently trying to learn how the PX4 blocks work in Simulink, and how to impliment them in a SIL model. I am currently trying to do a couple of things, but I can't seem to get them to work.
Simulink model:
Question 1.
Writing an accerleration to PX4. It doesn't have to be the acceleration, but I tried to make a simulation, where PX4 just read the gravity (sensor_accel), and then at some point it experienced a change in acceleration (which I would assume would be read on the sensor). The following screen shot is what I see in my Data Inspector:
I am applying a [0 0 100 ]stepfunction at t = 1, expecting to read a change on either the vehical acceleration or sensor acceleration, but I see nothing on either. I don't know why, thus my question, how do I do want I want?
Question 2.
I also watn to export the data preferably not using the Data Inspector but the out.workspace block, but when I tried to do this, the workspace output looked really weird in MATLAB:
I was expecting a long list of number, thus my question, is there a way to do this?
Question 3.
If I switch to Run on Board and run Monitor & Tune, I get the following plot from the Data Inspector:
It seems similar to question 2, but I am just really confused why I get these weird dips, when I am not varying the step function at all, i.e. after t=1, it should be constant at 100. So what is going on here?
thank you in advance for helping me learn!