CgEnvelope Reference

Table of contents


Introduction

A CgEnvelope extends the Ptable class and represents an aircraft center of gravity envelope. The table data captures the envelopes for different categories (e.g., Normal, or Utility) as well as the forward and aft limits of each envelope. The table can then interpolate the values between the limit points. Here's an example of a Cessna 182B envelope:

new CgEnvelope({
  title: `CG envelope`,
  inputs: ['category', 'cgLimit', 'weight'],
  output: 'arm',
  a: [
    {p:'normal', a:[
      {p:'forward', a:[
        {p:0,     v:33.5},
        {p:2100,  v:33.5},
        {p:2650,  v:40.0},
      ]},
      {p:'aft', a:[
        {p:0,     v:45.8},
        {p:2650,  v:45.8},
      ]},
    ]},
  ],
})

In the above example, the category key only accepts 'normal'. A type or modification that supports other categories can add another set of entries. The cgLimit key specifies which limit is being interpolated. Lastly, the weight specifies the weight to interpolate the limit.

An aircraft whose limits differ between takeoff and landing adds an optional phase key, with 'tko' and 'ldg' entries, ahead of cgLimit. The Kodiak oversize tires are the example: they raise the maximum landing weight and publish a Loading Envelope for Landing of their own, while ramp and takeoff keep the standard limits. An envelope that does not vary by phase omits the key and answers every phase with its one set of limits, so the phase an aircraft page asks for never has to be conditional:

new CgEnvelope({
  title: `CG envelope`,
  inputs: ['category', 'phase', 'cgLimit', 'weight'],
  a: [
    {p:'normal', a:[
      {p:'tko', a:[ {p:'forward', a:[...]}, {p:'aft', a:[...]} ]},
      {p:'ldg', a:[ {p:'forward', a:[...]}, {p:'aft', a:[...]} ]},
    ]},
  ],
})

Note that the above data could be used with an ordinary Ptable; however, CgEnvelope adds specialized methods for exploring the envelope. Here are some examples:

// get the forward and aft limits at a particular weight
const [fwdArmLimit, aftArmLimit] = envelope.armLimits('normal', weight);
// get the normal category weight limit
const maxWeight = envelope.weightLimits('normal')[1];
// get the category associated with a particular aircraft loading
const cg = new CgPoint(2500, 42);
const cgCategory = envelope.category(cg);

Constructor

Syntax

new CgEnvelope(info)

Constructs a new CgEnvelope instance for an aircraft envelope. The input data must have three keys: category, cgLimit, and weight. The category parameter data can have any supported G-load category string. The cgLimit parameter must contain values for both forward and aft strings. The weight parameter can be in any units of weight, but the default Ptable weight units are assumed if it is unspecified in info.inputs. The values can be in any units of length, but the default Ptable arm units are assumed if it is unspecified in info.output. If info.output is not provided, it defaults to 'arm'.

The constructor asserts that the table is well formed:

Parameters


Inherited methods


Instance methods

armLimits()

armLimits(category, weight, phase)

Return an array containing the interpolated [forward, aft] arm limits at a given G-load category, weight and flight phase. If the weight is outside the forward or aft limt, then the corresponding array element contains a StateVarError instance.

Parameters

Return value

An a array containing the following two elements:


category()

category(cg, phase)

Return the G-load category string for a given CgPoint. If the cg is outside the envelope, return ''.

Parameters

Return value

A G-load category string.


minFuelUsed()

minFuelUsed(category, used, maxUsed, ldgCgAt, step)

Return the least fuel that must be burned for the landing point to lie within the landing envelope, searching upwards from used and never going beyond maxUsed. An envelope that does not declare the phase input charts one envelope for every phase and returns used unchanged.

An envelope with a tighter landing chart can make the maximum landing weight the lesser constraint: its forward limit falls with weight faster than burning fuel moves the CG forward, so a load that is legal for takeoff can need fuel burned before it is legal to land. That assumes burning fuel moves the CG toward the limit it is outside of, which holds where the fuel is aft of the CG.

Parameters

Return value

The fuel burn, in the caller's fuel units.


pctArm()

pctArm(category, cg, phase)

Return the fraction of the span between the arm limits for a given weight and arm in cg.
The returned value is 0 if the cg is at the forward limit and 1 if the cg is at the aft limit.

Parameters

Return value

A number or StateVarError instance. The value is 0 if the cg is at the forward limit and 1 if the cg is at the aft limit. If the cg is outside the arm limits then values less than 0 or greater than one is returned. If the cg is outside the weight limits, then a StateVarError instance is returned.


pctWeight()

pctWeight(category, cg, bew, phase)

Return the fraction of the span between the weight limits for a given weight and arm in cg. The lower weight limit is the maximum of the lower weight limit in the table data for the category and the basic empty weight specified by bew. The returned value is 0 if the cg is at the lower weight limit and 1 if the cg is at the upper weight limit.

Parameters

Return value

A number whose value is 0 if the cg is at the lower weight limit and 1 if the cg is at the upper limit.


points()

points(category, bew, phase)

Return an array of CgPoint instances that represent the envelope for a category and flight phase. bew is the lower weight cutoff. The points() method is used to draw the envelope. The returned array is ordered such that drawing lines between successive CgPoint instances and connecting the final point with the first will draw a CG envelope diagram.

Parameters

Return value

An array CgPoint instances representing a center of gravity envelope diagram.


weightLimits()

weightLimits(category, phase)

Return an array containing the [lower, upper] weight limits at a given G-load category and flight phase. The lower weight limit is the lowest weight parameter value in the table for the category. It may be above or below the basic empty weight of the aircraft.

Parameters

Return value

An a array containing the following two elements:


Inherited properties


Instance properties

hasPhase

true when the table declares the phase input, i.e. when its limits differ between takeoff and landing. The weight & balance diagram uses it to decide whether to draw a second, dashed landing envelope.


maxTow

The maximum takeoff weight: The maximum weight in any category.