RTA Time Control (avionics/flight-management/rta-time-control)
Use when the task is the required-time-of-arrival (RTA) control function of
a flight management system: predicting the time of arrival at a downstream
waypoint, computing the speed adjustment that lands the aircraft at the
waypoint at the RTA time constraint, and judging whether the constraint
lies inside the achievable arrival window set by the minimum and maximum
cruise Mach. This leaf implements the deterministic speed-command law in
pure Python, stdlib only. It pairs with avionics/flight-management/
performance-computation for the speed selection context,
avionics/flight-management/vertical-navigation for the vertical profile,
and avionics/flight-management/flight-planning for the route structure that
carries the leg.
Domain quick reference
- Ground speed law: GS = TAS + V_wind, with the along-track wind V_wind
positive for a tailwind. TAS and GS in m/s.
- Estimated time of arrival: eta = d_rem / GS, a flight duration from the
prediction time t_now, with d_rem the remaining distance.
- Time error: e = (t_now + eta) - t_RTA, positive when the aircraft is
late against the RTA time constraint; the constraint is met when
|e| <= TIME_TOL_S (5 s).
- Required ground speed: GS_req = d_rem / (t_RTA - t_now), the constant
ground speed that arrives exactly at the RTA time.
- Required Mach: M_req = (GS_req - V_wind) / a, with the ISA speed of
sound a = sqrt(GAMMA * R * T), T = 288.15 - 0.0065 h in the troposphere,
GAMMA = 1.4, R = 287.05 J/(kg K).
- Achievable window: the cruise Mach envelope [M_min, M_max] maps to
ground speeds GS_min = M_min * a + V_wind and GS_max = M_max * a +
V_wind, so arrivals can only fall in [d_rem / GS_max, d_rem / GS_min]
relative to t_now.
- Command law: met within tolerance, hold the current speed; M_req inside
the envelope, command M_req (feasible); M_req above M_max or below
M_min, command the nearer bound (unfeasible) and report the remaining
time error of the best achievable arrival.
- The speed command is a Mach number; a calibrated-airspeed presentation
of the same command is a display-layer conversion outside this leaf.
- Units are SI throughout: m, m/s, s. DO-178C frames the software context
for the FMS function; the relations above are standard engineering
methodology, summary-only.
Workflow
- Fix the leg state: remaining_distance_m, ground_speed_m_s,
wind_along_m_s, rta_time_s on the same clock as t_now_s (default 0),
altitude_m, and the cruise envelope mach_min, mach_max.
- Get the current prediction: eta_s for the ETA duration and
time_error_s for the sign and size of the RTA time error.
- Size the window: achievable_window returns gs_min, gs_max, eta_min_s
and eta_max_s; if rta_time_s falls outside it, the constraint cannot be
met at any cruise speed.
- Run the command law: rta_speed_command(inputs) decides hold,
feasible-speed-change or bound-command and returns the full verdict
dict with required_gs_m_s, required_mach, command_mach, feasible,
predicted_eta_s, remaining_error_s and the verdict string.
- Convert speeds with tas_from_ground_speed and mach_from_tas when a
side check on TAS or Mach is needed, and isa_speed_of_sound for the
local speed of sound.
- Confirm the deterministic checks with the contract test
scripts/test_rta_time_control.py.
Worked example
Leg remaining 450000 m (about 243 NM), current ground speed 250 m/s, wind
along +15 m/s (tailwind), altitude 10668 m (module speed of sound
a = 296.53 m/s; the spec display rounds it to 296.51), Mach envelope
[0.72, 0.84], t_now = 0.
- ETA: eta_s(450000, 250) = 1800 s.
- Case 1, RTA 1900 s: time_error_s(1800, 1900, 0) = -100 s (early, must
slow). required_gs = 450000/1900 = 236.84 m/s; required TAS =
236.84 - 15 = 221.84 m/s; required Mach = 221.84/296.53 = 0.7481
(spec anchor 0.74818). Inside the envelope: command_mach 0.7481,
feasible True, predicted_eta_s 1900 s, remaining_error_s 0,
verdict rta-feasible.
- Case 2, RTA 1200 s: required_gs = 450000/1200 = 375 m/s, required Mach
1.214, above mach_max 0.84: command_mach 0.84, feasible False; ground
speed at Mach 0.84 = 0.84 * 296.53 + 15 = 264.09 m/s; best eta =
450000/264.09 = 1703.97 s (spec anchor 1704.1); remaining_error_s =
1703.97 - 1200 = +503.97 s late (spec anchor 504.1), verdict
rta-unfeasible.
- Case 3, RTA 1800 s (equals the ETA): |error| 0 <= 5 s, hold the current
speed; command_mach = (250 - 15)/296.53 = 0.7925 (spec anchor 0.79257).
- Window: eta_min_s = 450000/264.09 = 1703.97 s (fastest) to eta_max_s =
450000/228.50 = 1969.33 s (slowest, spec anchor 1969.4). An RTA of
2000 s falls beyond eta_max_s: command mach_min 0.72, feasible False,
remaining_error_s = 1969.33 - 2000 = -30.67 s (still early), verdict
rta-unfeasible.
Verification
- Confirm eta_s(450000, 250) returns 1800 s exactly.
- Confirm required_gs for RTA 1900 s is 236.84 m/s within 0.01 and the
required Mach for the 221.84 m/s TAS is within 1e-4 of 0.74818.
- Confirm the window eta bounds land within 0.5 s of 1704.1 s and
1969.4 s and that gs = M * a + wind holds for both envelope bounds.
- Confirm the hold branch keeps the current-speed Mach 0.7925 command
whenever |time error| <= 5 s and the feasible branch reports zero
remaining error with predicted_eta_s equal to the RTA time.
- Confirm the unfeasible fast case (RTA 1200 s) reports remaining_error_s
+504.1 s within 0.5 and the verdict rta-unfeasible.
- Confirm every negative distance, non-positive ground speed, RTA time at
or before t_now, non-positive mach_min, inverted envelope, negative
altitude and headwind above the minimum-cruise TAS raises ValueError.
- Run the contract test offline: python3
scripts/test_rta_time_control.py (42 tests, deterministic).
Related leaves
- avionics/flight-management/performance-computation: the cruise speed
selection context that supplies the speed the RTA function adjusts.
- avionics/flight-management/vertical-navigation: the descent path that
carries the aircraft to the constrained waypoint.
- avionics/flight-management/flight-planning: the route structure whose
legs carry the remaining-distance input.
- avionics/flight-management/lateral-navigation: the lateral guidance the
time-based operation runs alongside.
Pitfalls
- Dropping the wind from the Mach conversion: GS = TAS + V_wind with
a tailwind positive, so required Mach is (GS_req - V_wind) / a -
converting the 236.84 m/s required ground speed directly to Mach
without removing the +15 m/s tailwind commands roughly 0.05 Mach
high instead of the correct 0.7481.
- Flipping the time-error sign: e = (t_now + eta) - t_RTA is positive
when the aircraft is LATE, so an RTA of 1200 s against an 1800 s
ETA means speed up, while -100 s (early) means slow down - swap the
sign and every command drives the aircraft the wrong way.
- Commanding M_req outside the envelope: the command law clamps to
the nearer of mach_min and mach_max and reports the unfeasible
verdict with the remaining error of the best achievable arrival -
an RTA of 1200 s needs Mach 1.214 but the aircraft delivers
Mach 0.84 and arrives +503.97 s late, so the report must carry that
residual, not a silent clamp.
- Ignoring the achievable window: arrivals can only fall in
[d_rem / GS_max, d_rem / GS_min], so an RTA of 2000 s beyond
eta_max_s 1969.33 s is unmeetable at any cruise speed - check the
window before computing a required speed, and still report the
best-case remaining error of -30.67 s (early).
- Holding speed outside the tolerance: the hold branch applies only
when |e| <= TIME_TOL_S (5 s); outside it the command is M_req
inside the envelope, never the current speed, however close the
arrival looks.
- Using the wrong speed of sound or presentation: a is
sqrt(GAMMA * R * T) at the cruise altitude (296.53 m/s at
10668 m, not the sea-level value), and the command is a Mach
number - the calibrated-airspeed presentation of the same command
is a display-layer conversion outside this leaf.
Behavior contract (gate 3)
Run the deterministic contract test (stdlib unittest, offline):
python3 scripts/test_rta_time_control.py
The test covers the ISA speed of sound at sea level, cruise altitude and
in the isothermal stratosphere, the ETA division, the time error sign
convention for early, late and on-time arrivals, the required ground
speed anchor, the TAS from ground speed and wind with headwind rejection,
the Mach conversion anchors and round trip, the achievable window values
with internal consistency, the feasible slow-down command, the hold
branch on time and within tolerance, the unfeasible fast and slow cases
with their remaining error values, the nonzero t_now clock handling, the
verdict strings and the ValueError rejection of non-physical inputs.
Compliance
- Standards referenced, not reproduced: DO-178C is the software
considerations context for FMS functions and is cited reference-only;
the RTA relations above are standard engineering methodology,
summary-only per standards-map.yaml. No proprietary FMS documentation
is reproduced.
- compliance: STANDARDS-REF, gated: false.
1---2name: rta-time-control3description: Use when you must compute the required time of arrival (RTA) function of a flight management system: estimate the arrival time at a downstream waypoint from the remaining distance and ground speed, derive the speed adjustment needed to satisfy the RTA time constraint, check the constraint against the achievable arrival window set by the minimum and maximum cruise Mach bounds, and return the Mach command, the predicted time error and the feasibility verdict for the FMS time control. Produces the ETA, time error, required ground speed and Mach command, achievable window and remaining time error. Trigger: required time of arrival, RTA time constraint, speed adjustment, arrival window, time error, 4D trajectory, FMS time control, Mach command.4license: Apache-2.05---67# RTA Time Control (avionics/flight-management/rta-time-control)89Use when the task is the required-time-of-arrival (RTA) control function of10a flight management system: predicting the time of arrival at a downstream11waypoint, computing the speed adjustment that lands the aircraft at the12waypoint at the RTA time constraint, and judging whether the constraint13lies inside the achievable arrival window set by the minimum and maximum14cruise Mach. This leaf implements the deterministic speed-command law in15pure Python, stdlib only. It pairs with avionics/flight-management/16performance-computation for the speed selection context,17avionics/flight-management/vertical-navigation for the vertical profile,18and avionics/flight-management/flight-planning for the route structure that19carries the leg.2021## Domain quick reference2223- Ground speed law: GS = TAS + V_wind, with the along-track wind V_wind24 positive for a tailwind. TAS and GS in m/s.25- Estimated time of arrival: eta = d_rem / GS, a flight duration from the26 prediction time t_now, with d_rem the remaining distance.27- Time error: e = (t_now + eta) - t_RTA, positive when the aircraft is28 late against the RTA time constraint; the constraint is met when29 |e| <= TIME_TOL_S (5 s).30- Required ground speed: GS_req = d_rem / (t_RTA - t_now), the constant31 ground speed that arrives exactly at the RTA time.32- Required Mach: M_req = (GS_req - V_wind) / a, with the ISA speed of33 sound a = sqrt(GAMMA * R * T), T = 288.15 - 0.0065 h in the troposphere,34 GAMMA = 1.4, R = 287.05 J/(kg K).35- Achievable window: the cruise Mach envelope [M_min, M_max] maps to36 ground speeds GS_min = M_min * a + V_wind and GS_max = M_max * a +37 V_wind, so arrivals can only fall in [d_rem / GS_max, d_rem / GS_min]38 relative to t_now.39- Command law: met within tolerance, hold the current speed; M_req inside40 the envelope, command M_req (feasible); M_req above M_max or below41 M_min, command the nearer bound (unfeasible) and report the remaining42 time error of the best achievable arrival.43- The speed command is a Mach number; a calibrated-airspeed presentation44 of the same command is a display-layer conversion outside this leaf.45- Units are SI throughout: m, m/s, s. DO-178C frames the software context46 for the FMS function; the relations above are standard engineering47 methodology, summary-only.4849## Workflow50511. Fix the leg state: remaining_distance_m, ground_speed_m_s,52 wind_along_m_s, rta_time_s on the same clock as t_now_s (default 0),53 altitude_m, and the cruise envelope mach_min, mach_max.542. Get the current prediction: eta_s for the ETA duration and55 time_error_s for the sign and size of the RTA time error.563. Size the window: achievable_window returns gs_min, gs_max, eta_min_s57 and eta_max_s; if rta_time_s falls outside it, the constraint cannot be58 met at any cruise speed.594. Run the command law: rta_speed_command(inputs) decides hold,60 feasible-speed-change or bound-command and returns the full verdict61 dict with required_gs_m_s, required_mach, command_mach, feasible,62 predicted_eta_s, remaining_error_s and the verdict string.635. Convert speeds with tas_from_ground_speed and mach_from_tas when a64 side check on TAS or Mach is needed, and isa_speed_of_sound for the65 local speed of sound.666. Confirm the deterministic checks with the contract test67 scripts/test_rta_time_control.py.6869## Worked example7071Leg remaining 450000 m (about 243 NM), current ground speed 250 m/s, wind72along +15 m/s (tailwind), altitude 10668 m (module speed of sound73a = 296.53 m/s; the spec display rounds it to 296.51), Mach envelope74[0.72, 0.84], t_now = 0.7576- ETA: eta_s(450000, 250) = 1800 s.77- Case 1, RTA 1900 s: time_error_s(1800, 1900, 0) = -100 s (early, must78 slow). required_gs = 450000/1900 = 236.84 m/s; required TAS =79 236.84 - 15 = 221.84 m/s; required Mach = 221.84/296.53 = 0.748180 (spec anchor 0.74818). Inside the envelope: command_mach 0.7481,81 feasible True, predicted_eta_s 1900 s, remaining_error_s 0,82 verdict rta-feasible.83- Case 2, RTA 1200 s: required_gs = 450000/1200 = 375 m/s, required Mach84 1.214, above mach_max 0.84: command_mach 0.84, feasible False; ground85 speed at Mach 0.84 = 0.84 * 296.53 + 15 = 264.09 m/s; best eta =86 450000/264.09 = 1703.97 s (spec anchor 1704.1); remaining_error_s =87 1703.97 - 1200 = +503.97 s late (spec anchor 504.1), verdict88 rta-unfeasible.89- Case 3, RTA 1800 s (equals the ETA): |error| 0 <= 5 s, hold the current90 speed; command_mach = (250 - 15)/296.53 = 0.7925 (spec anchor 0.79257).91- Window: eta_min_s = 450000/264.09 = 1703.97 s (fastest) to eta_max_s =92 450000/228.50 = 1969.33 s (slowest, spec anchor 1969.4). An RTA of93 2000 s falls beyond eta_max_s: command mach_min 0.72, feasible False,94 remaining_error_s = 1969.33 - 2000 = -30.67 s (still early), verdict95 rta-unfeasible.9697## Verification9899- Confirm eta_s(450000, 250) returns 1800 s exactly.100- Confirm required_gs for RTA 1900 s is 236.84 m/s within 0.01 and the101 required Mach for the 221.84 m/s TAS is within 1e-4 of 0.74818.102- Confirm the window eta bounds land within 0.5 s of 1704.1 s and103 1969.4 s and that gs = M * a + wind holds for both envelope bounds.104- Confirm the hold branch keeps the current-speed Mach 0.7925 command105 whenever |time error| <= 5 s and the feasible branch reports zero106 remaining error with predicted_eta_s equal to the RTA time.107- Confirm the unfeasible fast case (RTA 1200 s) reports remaining_error_s108 +504.1 s within 0.5 and the verdict rta-unfeasible.109- Confirm every negative distance, non-positive ground speed, RTA time at110 or before t_now, non-positive mach_min, inverted envelope, negative111 altitude and headwind above the minimum-cruise TAS raises ValueError.112- Run the contract test offline: python3113 scripts/test_rta_time_control.py (42 tests, deterministic).114115## Related leaves116117- avionics/flight-management/performance-computation: the cruise speed118 selection context that supplies the speed the RTA function adjusts.119- avionics/flight-management/vertical-navigation: the descent path that120 carries the aircraft to the constrained waypoint.121- avionics/flight-management/flight-planning: the route structure whose122 legs carry the remaining-distance input.123- avionics/flight-management/lateral-navigation: the lateral guidance the124 time-based operation runs alongside.125126## Pitfalls127128- Dropping the wind from the Mach conversion: GS = TAS + V_wind with129 a tailwind positive, so required Mach is (GS_req - V_wind) / a -130 converting the 236.84 m/s required ground speed directly to Mach131 without removing the +15 m/s tailwind commands roughly 0.05 Mach132 high instead of the correct 0.7481.133- Flipping the time-error sign: e = (t_now + eta) - t_RTA is positive134 when the aircraft is LATE, so an RTA of 1200 s against an 1800 s135 ETA means speed up, while -100 s (early) means slow down - swap the136 sign and every command drives the aircraft the wrong way.137- Commanding M_req outside the envelope: the command law clamps to138 the nearer of mach_min and mach_max and reports the unfeasible139 verdict with the remaining error of the best achievable arrival -140 an RTA of 1200 s needs Mach 1.214 but the aircraft delivers141 Mach 0.84 and arrives +503.97 s late, so the report must carry that142 residual, not a silent clamp.143- Ignoring the achievable window: arrivals can only fall in144 [d_rem / GS_max, d_rem / GS_min], so an RTA of 2000 s beyond145 eta_max_s 1969.33 s is unmeetable at any cruise speed - check the146 window before computing a required speed, and still report the147 best-case remaining error of -30.67 s (early).148- Holding speed outside the tolerance: the hold branch applies only149 when |e| <= TIME_TOL_S (5 s); outside it the command is M_req150 inside the envelope, never the current speed, however close the151 arrival looks.152- Using the wrong speed of sound or presentation: a is153 sqrt(GAMMA * R * T) at the cruise altitude (296.53 m/s at154 10668 m, not the sea-level value), and the command is a Mach155 number - the calibrated-airspeed presentation of the same command156 is a display-layer conversion outside this leaf.157158## Behavior contract (gate 3)159160Run the deterministic contract test (stdlib unittest, offline):161162 python3 scripts/test_rta_time_control.py163164The test covers the ISA speed of sound at sea level, cruise altitude and165in the isothermal stratosphere, the ETA division, the time error sign166convention for early, late and on-time arrivals, the required ground167speed anchor, the TAS from ground speed and wind with headwind rejection,168the Mach conversion anchors and round trip, the achievable window values169with internal consistency, the feasible slow-down command, the hold170branch on time and within tolerance, the unfeasible fast and slow cases171with their remaining error values, the nonzero t_now clock handling, the172verdict strings and the ValueError rejection of non-physical inputs.173174## Compliance175176- Standards referenced, not reproduced: DO-178C is the software177 considerations context for FMS functions and is cited reference-only;178 the RTA relations above are standard engineering methodology,179 summary-only per standards-map.yaml. No proprietary FMS documentation180 is reproduced.181- compliance: STANDARDS-REF, gated: false.