Changing Servo Function to Command an underwater robot

Hello Everyone.

I am trying to configure an autopilot (MiniPix v1.2 or PixHawk4-Mini) for a quadrirotor that remodulates itself to go underwater during his mission.

With Mission Planner, I was able to configurate the aerial part, but I am now looking for solutions for the underwater part.

The architecture of the water-bot:

  • It has 2 brushless motors at the rear serving for propulsion and direction
  • 2 other motors at the front that can be used for pitch and roll control

I thought of changing the SERVOn_FUNCTION parameters during flight using a Lua Script, but I don’t know what to do then:

  • Using the RCINn options to command directly the wanted motors
  • Creating 4 new SERVOn_FUNCTION with a Lua Script
  • Using the Submarine model offered by Mission Planner, unfortunately I can’t find any documentation about it online

What do you think can be done?
Thank you very much for your help, do not hesitate to ask for any clarification.