# Sloan / Demos / Context Documentation – TypeScript ## Included Files 1. sloan/demos/context/context.mdx ## Context Demo -- Aircraft Metrics Definition Source: sloan/demos/context/context.mdx Learn how to use Sloan's context management to build knowledge-driven data applications # Aircraft Metrics Definition ## Airspeed Metrics **Ground Speed vs True Airspeed**: Ground speed (`gs`) represents the aircraft's speed relative to the ground, while true airspeed (`tas`) accounts for air density and temperature conditions. True airspeed calculation requires outside air temperature (`oat`) and pressure altitude data not currently available in our model. **Indicated Airspeed (IAS)**: The airspeed reading from the aircraft's pitot-static system (`ias`), which differs from true airspeed based on altitude and atmospheric conditions. This metric requires direct airspeed sensor data not present in our current ADS-B feed. ## Climb/Descent Performance Metrics **Vertical Speed**: Calculated using `baro_rate` (barometric rate) and `geom_rate` (geometric rate) to determine climb or descent performance. Positive values indicate climb, negative values indicate descent. **Climb Efficiency**: Ratio of altitude gained to ground distance covered, calculated using altitude change (`alt_baro` or `alt_geom`) and position changes (`lat`, `lon`). ## Flight Phase Detection Metrics **Takeoff Phase**: Identified by rapid altitude gain (`alt_baro` increasing) combined with increasing ground speed (`gs`) and high climb rate (`baro_rate` > 500 ft/min). **Cruise Phase**: Characterized by stable altitude (minimal `baro_rate`), consistent ground speed (`gs`), and straight track (`track` changes < 5°). **Approach Phase**: Detected by decreasing altitude (`baro_rate` < -300 ft/min), decreasing ground speed, and altitude below typical cruise levels. **Landing Phase**: Final approach with very low altitude (`alt_baro` < 1000 ft), decreasing speed, and stable track toward runway. ## Signal Quality Metrics **Signal Strength**: Direct measurement using `rssi` (Received Signal Strength Indicator) to assess reception quality. **Data Freshness**: Calculated using `seen` (seconds since last message) and `seen_pos` (seconds since last position update) to determine data reliability. **Message Frequency**: Messages per minute calculated from `messages` count and time window to assess tracking consistency. ## Position Accuracy Metrics **Navigation Accuracy**: Composite score using `nic` (Navigation Integrity Category), `nac_p` (Navigation Accuracy Category - Position), and `nac_v` (Navigation Accuracy Category - Velocity) to determine positional reliability. **Surveillance Accuracy**: Assessment using `sil` (Surveillance Integrity Level) and `sda` (System Design Assurance) to evaluate overall tracking quality. ## Flight Efficiency Metrics **Great Circle Deviation**: Comparison of actual flight path (derived from sequential `lat`, `lon` coordinates) against the shortest great circle distance between origin and destination. **Altitude Optimization**: Analysis of altitude profile against optimal flight levels for given aircraft type and distance. **Speed Consistency**: Variance in ground speed (`gs`) throughout different flight phases to assess flight smoothness. **Fuel Efficiency**: Calculated using fuel flow rate (`fuel_flow`) and ground speed to determine nautical miles per gallon. Requires engine performance data not available in our current dataset. ## Environmental & Weather Metrics **Wind Speed & Direction**: Calculated by comparing true airspeed (`tas`) with ground speed (`gs`) and track changes. Requires true airspeed data and wind vector information (`wind_speed`, `wind_direction`) not present in our model. **Turbulence Detection**: Identified through rapid changes in altitude (`alt_baro`) and track (`track`) combined with accelerometer data (`vertical_g_force`, `lateral_g_force`) not available in ADS-B transmissions. **Weather Avoidance**: Analysis of flight path deviations around weather systems using onboard weather radar data (`weather_radar_returns`) and precipitation intensity (`precip_intensity`) not included in our current data model. ## Traffic Density & Separation Metrics **Aircraft Density**: Count of aircraft within defined geographical boundaries using `lat`, `lon` coordinates and configurable radius. **Separation Metrics**: Minimum distances between aircraft calculated using position data and altitude differences. **Airspace Utilization**: Percentage of available airspace occupied by tracked aircraft at different altitude bands. ## Operational Metrics **Emergency Detection**: Identification of emergency situations using `emergency` codes, `squawk` codes (7500, 7600, 7700), and `alert` flags. **Autopilot Usage**: Analysis of autopilot engagement using navigation modes (`nav_modes`) and flight path consistency. **Communication Quality**: Assessment based on transponder performance, message consistency, and data completeness across all available fields.