I’m a university student in Japan. I am researching on automatic control of fixed wing UAV, and I want to experiment with Pixhawk.
Specifically, I’m going to add a flight mode based on my control law to the ArduPilot code and load it into Pixhawk through the Mission Planer.
In the control law, inputs (steering angle, thrust) are generated from the state quantities (velocity, angular velocity, position, angle) of the aircraft.
I’m currently reading the code for ArduPilot on github, but I’m struggling because I’m a C++ beginner, the structure is complicated, and the comments aren’t my native language.
The questions I want to ask are
Which header file can be used to obtain the state quantities, and what are the variable’s name?
What variable’s name are used to define the inputs to the aircraft and in which file should it be included?
The state is available in the code via the ahrs interface. Look for ‘ahrs’ in the ArduPilot directory and you will see lots of examples of grabbing the state.
In the ArduPlane directory look for ‘nav_roll_cd’, ‘nav_pitch_cd’ and ‘throttle’