/api/v1/e6b/density-altitude/{icaoCodeOrIdent}Commercial PilotGet Density Altitude For Airport
Calculates density altitude for an airport using live METAR data with optional overrides.
Code Examples
curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/e6b/density-altitude/KJFK?TemperatureCelsiusOverride=10.0&AltimeterInHgOverride=10.0"curl \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
"https://api.preflightapi.io/api/v1/e6b/density-altitude/KJFK?TemperatureCelsiusOverride=10.0&AltimeterInHgOverride=10.0"Description
Fetches the airport's latest METAR to obtain temperature and altimeter setting, then computes density altitude using the ISA model. You can optionally override either value via query parameters for "what if" scenarios (e.g., "what would density altitude be if the temperature reached 40°C?").
Response Fields
DensityAltitudeFt— the effective altitude the aircraft "feels" based on air density
PressureAltitudeFt— field elevation corrected for non-standard pressure
IsaTemperatureCelsius— the standard (ISA) temperature expected at this pressure altitude
TemperatureDeviationCelsius— how far the actual temperature deviates from ISA (positive = hotter than standard)
*Formula:*DA = PA + 120 * (OAT - ISA_temp). This does not account for humidity, local pressure patterns, or non-standard lapse rates.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| icaoCodeOrIdent* | path | string | ICAO code (e.g., KDFW) or FAA identifier (e.g., DFW) |
| TemperatureCelsiusOverride | query | number? | Override temperature in Celsius (uses METAR if not provided) |
| AltimeterInHgOverride | query | number? | Override altimeter setting in inHg (uses METAR if not provided) |
Response Schema
Airport identifier (for airport-based calculations)
Field elevation in feet MSL
Pressure altitude in feet
Density altitude in feet
Standard (ISA) temperature at this pressure altitude in Celsius
Actual temperature in Celsius
Temperature deviation from ISA in Celsius
Altimeter setting used in calculation (inHg)
Raw METAR text for reference (for airport-based calculations)
METAR observation time (for airport-based calculations)
Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
Human-readable error message suitable for display.
Additional error details (only included in development environment).
Name of the external service that failed (only included for 503 errors).
Field-level validation errors (only for validation failures).
UTC timestamp when the error occurred.
Correlation ID for tracing the request.
Request path that generated the error.
Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
Human-readable error message suitable for display.
Additional error details (only included in development environment).
Name of the external service that failed (only included for 503 errors).
Field-level validation errors (only for validation failures).
UTC timestamp when the error occurred.
Correlation ID for tracing the request.
Request path that generated the error.
Machine-readable error code (e.g., "AIRCRAFT_NOT_FOUND").
Human-readable error message suitable for display.
Additional error details (only included in development environment).
Name of the external service that failed (only included for 503 errors).
Field-level validation errors (only for validation failures).
UTC timestamp when the error occurred.
Correlation ID for tracing the request.
Request path that generated the error.