Documentation Index
Fetch the complete documentation index at: https://docs.skyvexsoftware.com/llms.txt
Use this file to discover all available pages before exploring further.
useLandingAnalysis provides real-time access to touchdown detection, bounce counting, and settled landing analysis. It hydrates from GET /api/simulator/landing-analysis/snapshot on mount, then updates on flight:landing Socket.io events. The hook only re-renders when a landing-relevant event occurs — not on every simulator data tick.
Landing data resets automatically when a new tracking session starts.
Import
import { useLandingAnalysis } from "@skyvexsoftware/stratos-sdk";
Signature
function useLandingAnalysis<TSelected = LandingAnalysisSnapshot>(
options?: UseLandingAnalysisOptions<TSelected>
): UseLandingAnalysisReturn
type UseLandingAnalysisOptions<TSelected = LandingAnalysisSnapshot> = {
select?: (snapshot: LandingAnalysisSnapshot) => TSelected;
};
type UseLandingAnalysisReturn = {
landingRate: number | null;
bounceCount: number;
touchdowns: BounceData[];
isOnGround: boolean;
approachData: CapturePoint | null;
landingAnalysis: LandingAnalysis | null;
isLoading: boolean;
};
Parameters
| Parameter | Type | Description |
|---|
options.select | (snapshot: LandingAnalysisSnapshot) => TSelected | Selector to subscribe to a specific subset of landing data |
Return value
| Field | Type | Description |
|---|
landingRate | number | null | Final landing rate in feet per minute (negative = descent). null until settled. |
bounceCount | number | Number of bounces detected on the current landing sequence |
touchdowns | BounceData[] | Array of all touchdown events for the current landing |
isOnGround | boolean | Whether the aircraft is currently on the ground |
approachData | CapturePoint | null | Snapshot of flight parameters captured at approach |
landingAnalysis | LandingAnalysis | null | Full analysis object populated after a settled landing |
isLoading | boolean | true during the initial REST fetch |
Types
BounceData
Each entry in touchdowns represents one touchdown contact:
type BounceData = {
bounceNumber: number;
timestamp: number;
maxAltitudeAgl: number; // peak AGL height during the bounce
touchdownVerticalSpeed: number; // vertical speed at re-contact
touchdownGForce: number;
durationMs: number; // time airborne during the bounce
};
CapturePoint
Approach data captured when the aircraft enters the final approach phase:
type CapturePoint = {
timestamp: number;
altitude: number;
altitudeAgl: number;
verticalSpeed: number;
groundSpeed: number;
indicatedAirspeed: number;
latitude: number;
longitude: number;
pitch: number;
bank: number;
gForce: number;
heading: number;
glideslopeDeviation: number | null;
localizerDeviation: number | null;
flapsControl: number;
windDirection: number;
windSpeed: number;
totalFuelLbs: number;
};
LandingAnalysis
Populated after the aircraft settles (weight on wheels stabilizes):
type LandingAnalysis = {
landingRateFpm: number;
simulatorVsAtTouchdown: number;
touchdownTimestamp: number;
touchdownLatitude: number;
touchdownLongitude: number;
touchdownHeading: number;
touchdownGroundSpeed: number;
touchdownPitch: number;
touchdownBank: number;
touchdownGForce: number;
approachAltitude: number;
approachIas: number;
approachVs: number;
approachTimestamp: number;
descentTimeSeconds: number;
averageDescentRateFpm: number;
bounceCount: number;
bounces: BounceData[];
landingDistanceFt: number;
captureQuality: "excellent" | "good" | "fair" | "poor";
captureNotes: string[];
};
Usage
Display landing rate after touchdown
import { useLandingAnalysis } from "@skyvexsoftware/stratos-sdk";
export function LandingCard() {
const { landingRate, bounceCount, isOnGround, isLoading } = useLandingAnalysis();
if (isLoading) return <p>Loading...</p>;
if (!isOnGround && landingRate === null) {
return <p>Awaiting touchdown</p>;
}
return (
<div>
{landingRate !== null && (
<p>Landing rate: {Math.round(landingRate)} fpm</p>
)}
{bounceCount > 0 && <p>Bounces: {bounceCount}</p>}
</div>
);
}
Show detailed analysis after settling
const { landingAnalysis, touchdowns } = useLandingAnalysis();
if (landingAnalysis) {
return (
<div>
<p>Rate: {Math.round(landingAnalysis.landingRateFpm)} fpm</p>
<p>G-force: {landingAnalysis.touchdownGForce.toFixed(2)}g</p>
<p>Bounces: {landingAnalysis.bounceCount}</p>
</div>
);
}
Notes
landingRate is null until a settled landing is detected. During a bounce sequence it updates per bounce.
- The
select option is passed directly to TanStack Query’s structural sharing. The component will not re-render if the selected value is deeply equal to the previous value.
- Landing data resets when
FlightEventPipeline.startTracking() is called at the beginning of a new flight — previous session data is not preserved across flights.