Module AirfoilUnit

Airfoils are aerodynamic elements that produce a lift force according to their aerodynamic profile as wings, stabilizers, and ailerons.

Element class:

  • Aileron2
  • Stabilizer
  • Wing2

Extends: Element > Engine

Functions

getLift () Returns the current lift of the airfoil.
getMaxLift () Gives the maximum lift that the airfoil can generate, under optimal conditions.
getDrag () Returns the current drag of the airfoil.
getDragRatio () The ratio between lift and drag, depending on the aerodynamic profile of the airfoil.
getCurrentMinLift () Returns the minimal lift the airfoil can deliver at the moment (can be higher than zero), which will depend on various conditions like velocity, atmospheric density, obstruction, orientation, etc.
getCurrentMaxLift () Returns the maximal lift the airfoil can deliver at the moment, which might depend on various conditions like velocity, atmospheric density, obstruction, orientation, etc.
getMaxLiftEfficiency () Returns the ratio between the current maximum lift and the optimal maximum lift.
getLiftAxis () Returns the airfoil lift direction in construct local coordinates.
getTorqueAxis () Returns the airfoil torque axis in construct local coordinates.
getWorldLiftAxis () Returns the airfoil lift direction in world coordinates.
getWorldTorqueAxis () Returns the airfoil torque axis in world coordinates.
isStalled () Checks if the airfoil is stalled.
getStallAngle () Returns the airfoil stall angle.
getMinAngle () Returns the minimum angle to produce the maximum lift of the airfoil.
getMaxAngle () Returns the maximum angle to produce the maximum lift of the airfoil.
mockGetClosure () Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".


Functions

getLift ()
Returns the current lift of the airfoil.

Returns:

    float The current lift of the airfoil.
getMaxLift ()
Gives the maximum lift that the airfoil can generate, under optimal conditions. Note that the actual maximum lift will most of the time be less than this value.

Returns:

    float The maximum lift of the airfoil in newtons.
getDrag ()
Returns the current drag of the airfoil.

Returns:

    float The current drag of the airfoil.
getDragRatio ()
The ratio between lift and drag, depending on the aerodynamic profile of the airfoil.

Returns:

    float The ration between lift and drag.
getCurrentMinLift ()
Returns the minimal lift the airfoil can deliver at the moment (can be higher than zero), which will depend on various conditions like velocity, atmospheric density, obstruction, orientation, etc. Most of the time, this will be 0, but it can be greater than 0, particularly for ailerons, in which case the actual thrust will be at least equal to minThrust.

Returns:

    float The current minimal airfoil lift in newtons.
getCurrentMaxLift ()
Returns the maximal lift the airfoil can deliver at the moment, which might depend on various conditions like velocity, atmospheric density, obstruction, orientation, etc. The actual lift will be anything below this maximum lift, which devines the current max capability of the airfoil.

Returns:

    float The current maximal airfoil lift in newtons.
getMaxLiftEfficiency ()
Returns the ratio between the current maximum lift and the optimal maximum lift.

Returns:

    float Usually 1 but can be lower for certain airfoils.
getLiftAxis ()
Returns the airfoil lift direction in construct local coordinates.

Returns:

    vec3 The airfoil lift direction vector in construct local coordinates.
getTorqueAxis ()
Returns the airfoil torque axis in construct local coordinates.

Returns:

    vec3 The torque axis vector in construct local coordinates.
getWorldLiftAxis ()
Returns the airfoil lift direction in world coordinates.

Returns:

    vec3 The torque axis vector in world coordinates.
getWorldTorqueAxis ()
Returns the airfoil torque axis in world coordinates.

Returns:

    vec3 The torque axis vector in world coordinates.
isStalled ()
Checks if the airfoil is stalled.

Returns:

    0/1 1 if the airfoil is stalled.
getStallAngle ()
Returns the airfoil stall angle.

Returns:

    float The stall angle of the airfoil in degrees.
getMinAngle ()
Returns the minimum angle to produce the maximum lift of the airfoil. Note that the airfoil will produce lift at a lower angle but not optimally.

Returns:

    float The angle of the airfoil in degrees.
getMaxAngle ()
Returns the maximum angle to produce the maximum lift of the airfoil. Note that the airfoil will produce lift at a higher angle but not optimally.

Returns:

    float The angle of the airfoil in degrees.
mockGetClosure ()
Mock only, not in-game: Bundles the object into a closure so functions can be called with "." instead of ":".

Returns:

    table A table encompasing the api calls of object.

See also:

generated by LDoc 1.4.6 Last updated 2022-12-01 00:35:59