Custom Flight Mode

Hi everyone,

I’ve been working on incorporating a custom flight mode into Arduplane. Following the guidelines provided on Adding Custom Attitude Controller to Copter — Dev documentation, I’ve also included additional steps tailored specifically for the plane. I’ve successfully managed to run the new flight mode on SITL (Ubuntu). But it is a replica of the guided mode with only the mode name being different.

My primary challenge lies in adding custom functions to this flight mode. I’ve spent weeks studying the codebase and trying to grasp the architecture of the plane. I find myself overwhelmed by the abundance of parameters, variables, classes, and structs. I’m currently seeking a starting point to move forward.

Simply, I aim to create a flight mode (based on auto) for the plane, where it flies straight ahead for 50 meters while maintaining the current altitude, then ascends by 1 meter before entering a loiter state.

I know it might not be nice to want this, but sources are extremely limited. Also, I believe there are many individuals like me who are seeking guidance on customizing Ardupilot. If anyone can offer assistance in creating the mode described above, it would undoubtedly benefit numerous users.

Thank you in advance for your time and consideration.

Perhaps you should look into using scripting instead: Lua Scripts — Copter documentation
Using scripts means you don’t need to be able to understand or modify the existing flight code.

If you’re using Plane instead of Copter, there is also scripted aerobatics