Rotary wing flight control. More...
#include <RotaryWing.h>
Public Member Functions | |
| RotaryWing () | |
| virtual void | ParamChanged (Socket *param) |
| A parameter has changed. | |
| virtual void | Init () |
| perform your initialization here | |
| virtual void | Reference () |
| Reference. | |
| virtual void | Loop (const unsigned long &interval) |
| The module's main loop. | |
Rotary wing flight control.
Stabilizes a rotary wing craft. This module tries to maintain the flight angle at whatever angle is commanded.
Sockets exposed:
RotaryWing.Pitch.P Basic gyro based stabilization. Just keeps the craft steady
RotaryWing.Pitch.I
RotaryWing.Pitch.ILimit
RotaryWing.Pitch.D
RotaryWing.Roll.P
RotaryWing.Roll.I
RotaryWing.Roll.ILimit
RotaryWing.Roll.D
RotaryWing.Yaw.P
RotaryWing.Yaw.I
RotaryWing.Yaw.ILimit
RotaryWing.Yaw.D
RotaryWing.Stable.P.P self leveling mode PIDs
RotaryWing.Stable.P.I
RotaryWing.Stable.P.D
RotaryWing.Stable.R.P
RotaryWing.Stable.R.I
RotaryWing.Stable.R.D
RotaryWing.BankComp Increase throttle to compensate for the current bank angle
RotaryWing.CommandComp Increase throttle to compensate for commaded pitch/yaw
external sockets expected:
Gyro.Pitch
Gyro.Roll
Gyro.Yaw
Command.Throttle
Command.Roll
Command.Pitch
Command.Yaw
AHRS.Pitch
AHRS.Roll
AHRS.Yaw
Accel.X
AHRS.Acceleration
| RotaryWing::RotaryWing | ( | ) | [inline] |
| virtual void RotaryWing::Init | ( | ) | [inline, virtual] |
perform your initialization here
This includes connecting plugs and general initialization
Reimplemented from FlightControl.
| virtual void RotaryWing::Loop | ( | const unsigned long & | interval | ) | [inline, virtual] |
The module's main loop.
This function is called at the rate specified by SetInterval()
Do most of your work here. Try to keep this code fast
Reimplemented from FlightControl.
| virtual void RotaryWing::ParamChanged | ( | Socket * | param | ) | [inline, virtual] |
A parameter has changed.
Called when a parameter has been changed (read from EEPROM or via the comms link)
param points to the parameter that has changed.
Reimplemented from FlightControl.
| virtual void RotaryWing::Reference | ( | ) | [inline, virtual] |
Reference.
Called when we are stationary and it is safe to re-reference sensors and clear PID accumulators etc. If at all possible, return fairly quickly from this, just in case we are in the air and reference has been called by mistake (e.g it may have been connected to a transmitter switch that was operated at the wrong moment.
Reimplemented from FlightControl.
1.7.0