Skip to content

Fix OpenAP Performance Model - #653

Open
ArsyiAziz wants to merge 1 commit into
TUDelft-CNS-ATM:masterfrom
ArsyiAziz:fix/openap
Open

Fix OpenAP Performance Model#653
ArsyiAziz wants to merge 1 commit into
TUDelft-CNS-ATM:masterfrom
ArsyiAziz:fix/openap

Conversation

@ArsyiAziz

@ArsyiAziz ArsyiAziz commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

In the OpenAP performance model, vsmin is meant to be the maximum descent rate (a negative vertical speed). Instead it is computed from the minimum climb rate (which is a positive value).

See #651

Reproduction

import bluesky as bs, numpy as np
from bluesky.tools import aero          # ft, fpm, kts, nm ...

bs.init(mode="sim", detached=True)
bs.traf.cre(acid="KL1", actype="A320", aclat=52.0, aclon=4.0, achdg=90.0,
            acalt=35000*aero.ft, acspd=250.0)
perf = bs.traf.perf
print("vsmax", perf.vsmax[0], "m/s")   # +16.04
print("vsmin", perf.vsmin[0], "m/s")   # +3.60  <-- positive, should be negative

n = bs.traf.ntraf
for cmd in (2000, 0, -1000, -2000, -3000):   # ft/min
    intent = np.full(n, cmd*aero.fpm)                       # ft/min -> m/s
    _, allow, _ = perf.limits(bs.traf.tas.copy(), intent, bs.traf.alt.copy(), np.zeros(n))
    print(f"commanded {cmd:+6d} -> allowed {allow[0]/aero.fpm:+7.0f} ft/min")

Before fix

vsmax 16.04 m/s
vsmin 3.6 m/s
commanded  +2000 -> allowed   +2000 ft/min
commanded     +0 -> allowed      +0 ft/min
commanded  -1000 -> allowed    +709 ft/min
commanded  -2000 -> allowed    +709 ft/min
commanded  -3000 -> allowed    +709 ft/min

After fix

vsmax 16.04 m/s
vsmin -14.68 m/s
commanded  +2000 -> allowed   +2000 ft/min
commanded     +0 -> allowed      +0 ft/min
commanded  -1000 -> allowed   -1000 ft/min
commanded  -2000 -> allowed   -2000 ft/min
commanded  -3000 -> allowed   -2890 ft/min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant