Adding new navigator/control for airborne wind energy mode

Hell fellow developers,

some fellow students and me are currently involved in an university project regarding airborne wind energy systems. Here a quick introduction video if you are not familiar with the concept and are interested:

Therefore we would like to use the PX4 code base and write a new controller and navigator for it. Here is the link to my github project:
https://github.com/notoriou5/Firmware/tree/AWE_UniStuttgart

I started to implement the Controller (it is not doing anything yet - just writing some debug messages) awe_control, and the navigator is just linked to the loiter mode so far.

Now the problem: I can not start my custom flight mode auto:awecircle after i took off with the plane. If you would like to help, these are the commands I put into the console:

$ make px4_sitl_default gazebo_plane
pxh> commander mode auto:awecircle ----> I can read my debug messages
pxh> commander takeoff
pxh> commander mode auto:awecircle ----> I can not switch back to my custom mode, I am stuck in flight mode 5 (auto:rtl)

For now I searched all the parts in the code where I could find NAVIGATION_STATE_AUTO_LOITER and copied it and modified for my NAVIGATION_STATE_AUTO_AWE_CIRCLE. But I can still not switch to my custom mode after takeoff.

It would be great to get any suggestions from you guys :slight_smile:

Thanks a lot for your time in advance,

Kevin

I managed to solve my problem. The (so far) working code is uploaded to my github. The branch is AWEbySWE.

Through the terminal I can switch to my flight mode via ‘commander mode auto:awecircle’. But now I would like to switch to this mode through my RC-controller. Is there is simple way to map it to the QGCS and then to the RC-Controller?