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 properties. Only oat and isa have public setters (setting one recomputes the other); the others are read-only and are changed using the methods listed below:
altitudepressureAltitudedensityAltitudelimitedDensityAltitudeoatisaaltimetertransitionAltitudepressureAltitude 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 an existing OutsideConditions instance, it returns a clone() of that instance.
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 altitude, pressure altitude, altimeter, and transition altitude properties 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, densityAltitude, 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(conditions)
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 used (default 0) and the oat in the instance is computed as the standard temperature at the pressure altitude plus isa. If oat is provided, then isa is ignored, and the isa in the instance is computed from oat and the pressure altitude. 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:
The oat and isa properties may be set directly. The other properties should be modified using 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, isa defaults to 0, so the standard temperature at the pressure altitude is assumed (15 only at a pressure altitude of 0 feet).isainfo.oat is provided. If omitted, 0 is assumed.altimetertransitionAltitudeconditionsOutsideConditions instance. The constructor returns a clone() of it.pageIdsetFromPage().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:
altitudeoatisaaltimetertransitionAltitudealtitude, altimeter, or transitionAltitude are omitted, then the instance's existing values are kept (or the standard values, if the instance has none yet). If the resulting altitude is at or above the transitionAltitude, the altimeter is forced to the standard setting, 29.92, whatever altimeter was provided. If oat is omitted, then isa is used (default 0) and the oat is computed as the standard temperature at the pressure altitude plus isa. If oat is provided, then isa is ignored, and the isa is computed from oat and the pressure altitude.infoaltitudeoatinfo.isa is ignored. If both oat and isa are not provided, isa defaults to 0, so the standard temperature at the pressure altitude is assumed (15 only at a pressure altitude of 0 feet).isainfo.oat is provided. If omitted, 0 is assumed.altimeteraltitude is at or above transitionAltitude.transitionAltitudeThe 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.
For 'enrtAlt', the conditions are first set from the 'dest' page and the 'alt' page conditions are read as well. The altitude is set from enrt_altAltitudeH (the alternate cruise altitude in hundreds of feet, multiplied by 100). The altimeter is the average of the 'dest' and 'alt' altimeter settings, and isa is the average of their ISA values, clamped to ±20°C. The oat is then computed from the isa at the new altitude.
If pageId is not 'enrt', airportId is set from the page's airportId state variable. If the resulting altitude is at or above the transition altitude, the standard altimeter setting is used.
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}_airportIdpageId is not 'enrt', this is used to set airportId.${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.
airportIdThe ID of the airport whose page the conditions were set from. It is set only by setFromPage() when pageId is not 'enrt'; otherwise it is not present, unless copied from an info object.
altimeterThe altimeter setting in inches of Mercury. It is always the standard setting (29.92) if altitude is at or above transitionAltitude.
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 temperature (ISA) in degrees Celsius. If temperature information is not set at construction or by instance methods, then isa is 0 (the standard temperature at the pressure altitude). It is computed from the OAT and pressure altitude if oat is provided. Setting isa recomputes oat from the pressure altitude. A non-numeric value sets isa to 0.
limitedDensityAltitudeA read-only property that is the larger of the pressureAltitude and the densityAltitude. It is useful for Ptable data for models that have an altitude correction but no temperature correction. It keeps calculations more conservative than the POH by not using a density altitude lower than the pressure altitude.
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. Setting oat recomputes isa from the pressure altitude. A non-numeric value sets isa to 0, so oat becomes the standard temperature.
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.