i´m trying to do a quadplane SITL Simulation with the ardupilot firmware and an own matlab physics model.
(I updated the firmware from github last on the 01. Feb. 2021)
Right now i´m debugging my model because the simulation doesn´t fully work yet. Still i was wondering if my SITL startup/set up is correct.
To start the simulation i run matlab and start MAVProxy in cygwin via:
…/Tools/autotest/sim_vehicle.py -v ArduCopter -f JSON:127.0.0.1 --map --console (-w if i want to reset params)
In the MAVProxy command i load default and parameters with:
param load …/Tools/autotest/default_params/plane.parm (don´t know if that is really needed)
param load …/Tools/autotest/default_params/quadplane.parm
param load …/Tools/autotest/default_params/myParameter.parm
Down under is what´s inside myParameter.parm.
I set the servos for my control surfaces and my motors. There are four lift motors and one pusher motor.
When i start i get the errors:
APM: Skipping INS calibration (doesn´t appear when i leave matlab running and restart MAVProxy)
When i try to arm the aircraft i get APM: PreArm: EKF2 Roll/Pitch inconsistent by 179 deg. Even though Roll and Pitch are zero in my model before arming. I added ARMING_CHECK 65518 to stop this error and with this i can takeoff in quadrocopter mode without a problem. The only thing is that the Heading in the console “spins” around without the aircraft actually turning. When i set a waypoint (after the takeoff and when the set height is reached) the airplane crashes, which is my problem right now.
These errors may result because my model isn´t correct but i was still wondering if the SITL set up is correct.
Thanks in regard!