Aircraft types before the mid-1970s often represent performance data for earlier models differently than for later models. For example, the earlier models may base performance data on the outside air temperature and density altitude, while later models might use ISA and airport elevation. An OutsideConditions instance presents these alternatives as different properties that each model's Ptable instance can choose as input keys. You can then add other properties, such as aircraft weight, and use the instance as the input for the Ptable interpolate() and related methods. An OutsideConditions instance presents the following read-only properties:
altitudepressureAltitudedensityAltitudeoatisaaltimetertransitionAltitudepressureAltitude and altitude will always be the same above the transition altitude.An OutsideConditions instance may be created using an object containing any of the following properties:
altitudeoatisaaltimetertransitionAltitudeoat is provided, isa will be ignored. Any additional properties will be passed to the new instance as well.If the constructor is passed a string, then it is passed to setFromPage() to initialize the conditions by retrieving values from a page's state variables.
The conditions properties are read-only and should only be changed using the following methods:
Here's a simple example:
const conditions = new OutsideConditions({
oat: 20,
altitude:1000,
altimeter: 30.12
weight: 2500,
headwind: 8,
})
takeoffRollTable.interpolateC(conditions)
takeoffWeightAdjTable.interpolateC(conditions)
const takeoffRoll = takeoffWindAdjTable.interpolate(conditions)
if (isError(takeoffRoll)) {
...
} else {
...
}
The conditions object will have computed pressureAltitude, deinsityAltitude, and isa properties in addition to the other properties provided to the constructor. The call to takeoffRollTable.interpolateC() will add a runwayDistance property to the conditions object, which may contain a number or an Error. The second interpolation adjusts the runwayDistance property, and the last interpolation returns a result value. If any interpolation produces an error, it will be passed to the takeoffRoll result.
new OutsideConditions(info)
new OutsideConditions(pageId)
Constructs a new OutsideConditions instance. If the argument is an object (info) then it contains any of the following properties:
altitudeoatisaaltimetertransitionAltitudeoat is omitted, then isa is ignored, and the isa in the instance will be computed from the provided oat, altitude, and altimeter or their default values. Any other properties in info are copied to the resulting instance if they don't conflict with the properties provided by OutsideConditions.If the argument is a string, then it is passed to setFromPage() to initialize the conditions from the specified pageId.
Each instance will have the following properties:
These properties are read-only. They may be modified by instance methods. Other info properties copied to the instance may be modified as required.
infoaltitudeoatinfo.isa is ignored. If both oat and isa are not provided, the standard temperature, 15, is assumed.isainfo.oat is provided.altimetertransitionAltitudepageIdsetFromPage().clone()clone()
Return a new OutsideConditions instance that has the same content as this instance. All additional enumerable properties are copied as well.
An OutsideConditions instance.
setAltitude()setAltitude(altitude)
Adjust the conditions for a new true altitude. The pressure altitude is recomputed from the true altitude, altimeter setting, and transition altitude. The OAT is recomputed from the pressure altitude and ISA.
altitudeThe OutsideConditions instance.
setAltitudeTemperature()setAltitudeTemperature(info)
Sets new conditions according to info. info is an object that contains any of the following properties:
altitudeoatisaaltimetertransitionAltitudeoat is omitted, then isa is ignored, and the isa in the instance will be computed from the provided oat, altitude, and altimeter or their default values.infoaltitudeoatinfo.isa is ignored. If both oat and isa are not provided, the standard temperature, 15, is assumed.isainfo.oat is provided.altimetertransitionAltitudeThe OutsideConditions instance.
setFromPage()setFromPage(pageId)
Set the conditions from state variables from the page specified by pageId. However, if pageId is 'enrtAlt', it sets it to the cruise conditions between the destination and alternate airports from the enrt page.
The following state variable values may be used to set the conditions:
enrt_transitionAltitudeHtransitionAltitude.enrt_altitudeHpageId is 'enrt', then this is multiplied by 100 to set altitude.${pageId}_altimeter_inhgaltimeter${pageId}_oat_dCoat.${pageId}elevation_ftpageId is not 'enrt', then this is used to set altitude.pageId'alt': The alternate airport page.'dep': The departure airport page.'depRtn': The departure return airport page.'dest': The destination airport page.'enrt': The enroute page. Sets the cruise conditions between the departure and destination airports.'enrtAlt': The enroute page. Sets the cruise conditions between the destination and alternate airports.The OutsideConditions instance.
setPressureAltitude()setPressureAltitude(pressureAltitude)
Adjust the conditions for a new pressure altitude. The true altitude is recomputed from the pressure altitude, altimeter setting, and transition altitude. The OAT is recomputed from the pressure altitude and ISA.
pressureAltitudeThe OutsideConditions instance.
altimeterThe altimeter setting in inches of Mercury.
altitudeThe true altitude above MSL in feet.
densityAltitudeThe dry density altitude above MSL in feet. The dry density altitude does not consider humidity, but it is the density altitude reported at airports. It is computed from the pressure altitude, and temperature.
isaThe difference from standard temperate (ISA) in degrees Celsius. If temperature information is not set at construction or by instance methods, then the standard temperature at the pressure altitude is used. It is computed from the OAT and pressure altitude if isa is not provided.
oatThe outside air temperature in degrees Celsius. If temperature information is not set at construction or by instance methods, then the standard temperature at the pressure altitude is used. It is computed from the ISA temperature and pressure altitude if oat is not provided.
pressureAltitudeThe pressure altitude above MSL in feet. It is computed from the true altitude, altimeter setting, and transition altitude.
transitionAltitudeThe transition altitude. The altitude above which the standard altimeter setting must be used to report altitude.