Actuators and Servos
The actuators in Aerofly FS 2 can simulate the delay between control input and physical deflections.
To differentiate between mechanical controls and electric or hydraulic actuators we add “Servo” in front of the object. Don't add “Servo” if it is a mechanical link operated by a human, as in most general aviation aircraft.
The most basic actuator in Aerofly FS 2 is the servoclassic. It can represent an electrical servo motor or a hydraulic actuator and even the human control inputs, e.g. when there is a direct mechanical linkage.
The values P0, P1, P2 and P3 are the factors of a polynomial of third degree:
x = Input(); target = P0 + P1 * x + P2 * x * x + P3 * x * x * x
P0 is the constant offset when the input is zero, P1 is the proportional factor by which the input is scaled.
Most of the times P2 and P3 are zero, then P1 defines the maximum position of the actuator, usually the control deflection is set in radiant with this value. E.g. a value of
0.1745 would be used for 10 degrees of deflection,
0.3491 (or roughly 0.35) for 20 degrees,
0.5236 for 30 degrees and so on.
After computing the target the actuator moves towards it with a given
Position is the initial position of the actuator, most of the times 0.0 but for the landing gear it is typically 1.0 (gear down).
<[servoclassic][ServoElevator] <[string8][Input][ElevatorTrimmed.Output]> <[float64][Speed][12.0]> <[float64][P0][0.0]> <[float64][P1][0.35]> <[float64][P2][0.0]> <[float64][P3][0.0]> <[float64][Position][0.0]> >
The Story With Aileron Differential in GA-Aircraft
Speed property is affecting the output speed it can result in strange behavior if the deflections are not symmetric, e.g. like the case for aileron differential. If there is an actuator for each aileron the one with the least output travel will reach the end position first.
In normal general aviation aircraft where the controls are mechanically connected to the control surfaces we typically only simulate one actuator, which is the yoke being actuated by the human. The control position of the yoke is then mapped onto the control surface deflections using a polynomial, which does the same thing as the P0, P1, P2, P3 values in the servoclassic (read it from right to left from P0 to Pn) but the result is instant and not delayed.
This makes it possible to create the aileron differential without any artificial lag by one of the ailerons. They move perfectly in sync, even if one has more distance to travel.
<[servoclassic][YokeAileron] <[string8][Input][AileronTrimmed.Output]> <[float64][Speed][12.0]> <[float64][P0][0.0]> <[float64][P1][1.0]> <[float64][Position][0.0]> > <[polynomial][LeftAileron] <[string8][Input][YokeAileron.Output]> <[float64array][Coefficients][ 0.0 0.4 0.0 ]> > <[polynomial][RightAileron] <[string8][Input][YokeAileron.Output]> <[float64array][Coefficients][ 0.0 -0.4 0.0 ]> >
The servolinear contains a mapping from the input position to a target output position. The target is computed from a linear interpolation between the nearest two given points.
The servolinear is typically used in the landing gear retraction logic, where the gear stays down until the doors have opened, then it moves up and reaches the up position before the gear doors close again. The input would be the gear sequence, sort of a slow animation sequence but with real physical effects on the rigidbodies.
<[servolinear][LandingLight] <[string8][Input][LandingLightSwitch.Output]> <[float64][OutputSpeed][1.0]> <[float64array][InputPosition] [ 0.0 0.5 1.0 ]> <[float64array][OutputPosition][ 0.0 0.3 1.0 ]> <[float64][Position][0.0]> >
This is a servo that can rotate, e.g. 360 degrees and then loops back to the beginning. There are actually very few examples in the aviation world for this, one could be a rotating beacon but we usually model this with the
graphics_flasher function instead.
Speed maximum output speed.
Do not use this for altimeter needles or the artificial horizon which typically are not limited in their maximum speed. It would only cause unrealistic lag in the needle position.
<[servocyclic][Position] <[string8][Input][Value.Output]> <[float64][Speed][20.0]> <[tmvector2d][Range][ -3.14159 3.14159 ]> >
The electrical_actuator simulates an electric motor to move the flaps for example. It requires an electrical network to receive electrical power.
Speed is the maximum speed up and down (in case of the flaps the +0.07 is for flaps down, towards greater angle and the -0.07 would be the flap retraction speed, which can differ).
Position is the initial position of the actuator when the aircraft is loaded.
Input is the target position,
InputEnable is a cut off,
AddLoad are the connections to the electrical bus network, the
RatedCurrent are electrical properties.
<[electrical_actuator][ServoFlaps] <[string8][Input][FlapsTargetMapping.Output]> <[string8][InputEnable][BatteryConnector.Output]> <[string8][InputVoltage][MainBus.Output]> <[string8][AddLoad][MainBus.AddLoad]> <[float64][MinimumVoltage][15.0]> <[float64][RatedCurrent][10.0]> <[float64][Speed][ -0.07 0.07 ]> <[float64][Position][0.0]> >