Navigation control and attitude control

I‘m learning the code of Arddupilot, and there is a problem which I can’t understand. The L1 controller is the waypoint navigation method, and the output of it is lateral acceration. The attitide controller is used for sttabilizing sailing attitude. The question is what is the relationship between the two controller, whether they work independently or are connected as some function?

Hi @suitangxiaoyi,

I spoke with @williangalvani (our lead ArduSub developer) about this, and he mentioned he’ll need to take a closer look a bit later to give a more detailed response.

As a starting point, I’d refer you to the control_auto.cpp and control_guided.cpp files.

Note that because ArduSub is based on ArduCopter there are some rotationally-focused variable names in the attitude control code (libraries/AC_AttitudeControl) that ArduSub actually uses for direct horizontal motion control.

Thanks for your help

1 Like