aeronautic

Parts

The part functions, their options, and ControlSurface and ControlAnchor.

Each part function takes the rig and its options, and returns a ControlDrive. The components are the same functions.

functionkindsfrom gives
aileronsailerona share of throw, −1 to 1
elevatorselevatora share of throw
elevonselevona share of throw
stabilatorsstabilatora share of throw
canardscanarda share of throw
ruddersruddera share of throw
flapsflapa share of travel, 0 to 1
leading_edge_flapsle_flapdegrees, leading edge down
airbrakesairbrakea share of travel
spoilersspoilera share of travel
drag_ruddersdrag_ruddera share of travel
cockpitstick_pitch, stick_roll, pedal, throttle_levera share of throw; of travel for the lever
geargear, gear_door, gear_lever, the cliphow far down, 0 to 1

combine_drives(drives) makes several drives one.

PartOptions

optiontypewhat it does
partsstring[]These parts, whatever their kind.
groupstringA rig group, whatever its kind.
side"left" | "right" | "centre"Only this side.
filter(part) => booleanKeep only the parts this passes.
from(flight, part) => number | nullThe command, in the terms of the table above.
ratenumberIn the part's unit a second.
onMove(value, part) => voidCalled in the frame a part moves.

TailOptions adds pitchShare, 0.6 by default. LeadingEdgeFlapOptions adds startDeg (2) and perDeg (1.4). CockpitOptions adds throttle, a function of the flight.

GearOptions

optiontypewhat it does
side"left" | "right" | "centre"Only this side's gear.
from(flight) => numberHow far down, 0 up to 1 down. The flight's gear by default.
ratenumberIn the parts' unit a second.
onMove(value, part) => voidCalled in the frame a part moves.
clipstring | RegExp | falseThe retraction clip. By default one named for the gear and retract, stow or up. false drives the parts.

ControlSurface

fieldwhat it is
nameThe node's name.
kindIts SurfaceKind.
nodeThe node that moves.
motionrotation or translation, about or along the node's local X.
unitdeg, rad, m or normalized.
scaleRadians or metres per unit.
min, maxIts limits, in its unit.
restThe value it was posed at when found.
sideleft, right or centre.
groupThe rig's group, or the kind's name.
positiveWhat a positive value does.
foundByrig, name or virtual.
extrasEverything else its extras said.
basePosition, baseQuaternionThe pose at zero, which values are measured from.

SurfaceKind is one of aileron, elevator, elevon, stabilator, canard, rudder, flap, le_flap, airbrake, spoiler, drag_rudder, nozzle_pitch, nozzle_yaw, nozzle_petal, gear, gear_door, gear_lever, stick_pitch, stick_roll, pedal, throttle_lever or other.

ControlAnchor

fieldwhat it is
nameThe node's name.
kindIts fx_kind, or its name after FX_, in snake case.
sideleft, right or centre.
nodeThe node.
extrasEverything else its extras said.

Finding them yourself

functionwhat it does
find_surfaces(root, options)The parts of a model, as a rig would find them.
find_anchors(root, options)Its anchors.
pose_surface(surface, value)Pose a part at a value, in its unit.
surface_kind(name)What kind a name is.
name_side(name)Which side a name says, or null.
fit_hinge(points, leading?)The hinge line along a panel's forward edge, or its aft edge.

On this page