Input - to - angle mapping

This page describes the process of how ZeroPilot 3.5’s Attitude Manager will attempt to maintain desired angle(s) and rate(s) for fixed-wing aircraft - and in thhe future, quadcopters.

 

Understanding the input map

Inputs are received by Attitude Manager as percentages from -100 to 100, where 0 is the neutral position.

Core control inputs are received in “AETR” order, standing for Aileron (Roll), Elevator (Pitch), Throttle (Thrust), and Rudder (Yaw). Of these inputs, stabilized flight typically operates off of Roll & Pitch angles, and yaw rates. Can you think of why this might be?

 

For each angle, we want to set configurable limits on each end. Typically, for stabilize flight, roll limits will be the same (i.e. -ROLL_LIM_MAX all the way to +ROLL_LIM_MAX), while pitch typically has a different limit for nose-down vs nose-up (PITCH_ND_MAX, PITCH_NU_MAX). This is because it takes more thrust to nose up, and software typically wants us to prevent stalling out the plane if possible.

 

It is the job of the input manager to translate a % input into a desired angle, or yaw-rate.

Understanding Expo, Trim, and other controller functions

You might hear these terms a LOT when we start talking about input maps. The key to remember here is that these are modifications on the rc transmitter side, meaning that these changes are applied before the signal reaches AM.

Although it’s not as important, understanding the function of expo and trim may still be important during test flights.

 

Implementation

Based on max/min angles for the controls. The percentages can be mapped easily to max and mix angles for the roll limits. For the pitch angles, the negative percentages can be mapped from the ND_MAX to neutral, and the positives can be mapped from neutral to NU_MAX. If the inputs are mapped via a function, that can be specified. Angle function with max/min, and percentage passed in as an argument, then mapped accordingly.

For yaw rates, the speed of yaw movement is determined, but the rate of yaw is still determined by the yaw angle?