Skip to content

docs: describe how PyNEATS really uses AO performance inputs - #75

Merged
ramondalmau merged 1 commit into
devfrom
docs/performance-input-logic
Oct 21, 2026
Merged

ramondalmau merged 1 commit into
devfrom
docs/performance-input-logic

Conversation

@ramondalmau

Copy link
Copy Markdown
Collaborator

Docs only, no code change.

The decision tree (input-prioritization.md) and rules 1–5 (mrv-specification.md) described
exclusive cases the code does not follow. They now describe the code:

  • every flight needs its aircraft type in the BADA mapping (wingspan, engine count);
  • BADA thrust/fuel flow is skipped only when fuel flow, engine efficiency AND aircraft mass
    are all provided;
  • otherwise mass = AO mass, else AO TOW, else the iterative estimate;
  • fuel flow = AO, else derived from the AO mass decrease, else BADA;
    efficiency = AO, else BADA thrust and BADA fuel flow;
  • notes: mass with AO fuel flow, empty points, fuel-burn check, low-speed points
    (to update when the low-speed filter work is done).

Also corrected on the same pages: modelled take-off weight, BADA type mapping and engine UID,
accuracy-table notes, "missing points are filled by interpolation", "TAS is set to 0 below
840 hPa".

Evidence: a golden flight run with each input combination; every statement checked by
independent review against the code. Units audit updated (Section 9, A13, new item I9,
status table).

The decision tree in input-prioritization.md and rules 1-5 in
mrv-specification.md described exclusive cases that the code does not
follow. They now describe the code:

- every flight needs its type in the BADA mapping (wingspan, engines);
- the BADA thrust and fuel-flow calculation is skipped only when fuel
  flow, engine efficiency and aircraft mass are all provided;
- otherwise the mass is the AO mass, else the AO TOW, else the iterative
  estimate, whatever fuel flow or efficiency were provided;
- fuel flow is the AO value, else derived from the AO mass decrease,
  else BADA; efficiency is the AO value, else from BADA thrust and fuel
  flow;
- notes on mass with AO fuel flow, empty points, the fuel-burn check and
  the low-speed filter (to update when the filter work is done).

Also corrects, on the same pages: the modelled take-off weight (the
iterated value, not the first guess), the BADA type mapping and engine
UID text, the accuracy-table notes, "missing points are filled by
interpolation", and "TAS is set to 0 below 840 hPa" (the wind is set to
0). Checked by running a golden flight with each input combination.

Units audit: Section 9 rows, A13 note, new item I9 (segment_duration
not recomputed after the speed filter), follow-up status table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ramondalmau
ramondalmau merged commit f408b5a into dev Oct 21, 2026
6 checks passed
@ramondalmau
ramondalmau deleted the docs/performance-input-logic branch October 21, 2026 09:40
ramondalmau added a commit that referenced this pull request Oct 21, 2026
…ry; fuel-burn rejections are retried (#76)

* fix(performance): a failed attempt no longer leaks columns into the retry

run() passes the same preprocessed DataFrame to the first attempt and to
the BADA3 retry, and the altitude fallback does the same for its two
attempts. run_by_bada_version writes aircraft_mass, thrust, fuel_flow and
other columns into it before the fuel-burn guardrail. After a guardrail
rejection on BADA4, the BADA3 retry took those columns as AO data. With
AO fuel flow and engine efficiency, it then saw "fuel flow + efficiency
+ mass provided", skipped BADA and returned the flight without the
guardrail.

Each attempt now works on its own copy of the DataFrame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(audit): record I10, the column leak into the BADA3 retry

Also points the rows of the merged docs PR to #75.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(performance): the speed filter receives a copy of the attempt DataFrame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(performance): a fuel-burn rejection is final, with no BADA3 retry

With the column leak fixed, a flight rejected by the fuel-burn guardrail
on BADA4 would be computed again with BADA3 and could be accepted with
BADA3 numbers. Before, that retry always failed (it reused the rejected
BADA4 fuel). An impossible total fuel points to bad trajectory or AO
data, not to the BADA version (maintainer decision).

A failure raised with retryable=False now ends the fallback chain: no
BADA3 retry in run() and none inside the altitude fallback. Besides the
guardrail, only "BADA file without MTOW or OEW" and "missing initial
mass" carry that flag; neither occurs with the files and data in use.

Tests: the rejection is final (AO fuel flow + efficiency, no AO data,
efficiency only); a retryable BADA4 failure still retries with BADA3 and
the retry starts clean; same rule inside the altitude fallback. All fail
on the previous code.

Docs: run() docstring, user docs (fallback chain, fuel-burn check note),
units audit I10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(performance): retry fuel-burn rejections with BADA3 and the altitude fallback

Maintainer decision, replacing the previous commit's "rejection is
final": the fuel-burn guardrail error is now retryable. A rejected
flight is retried with BADA3 (now clean, see the column-leak fix), then
with the altitude fallback (points below FL20 removed), and fails only
if every attempt is rejected.

run() and the altitude fallback keep honouring retryable=False before
their BADA3 retries; on this path only two internal consistency errors
carry that flag (no MTOW/OEW when the take-off mass is estimated, no
initial mass), and neither occurs with the BADA files in use.

Tests: a rejection is retried with BADA3 and accepted when BADA3 is
plausible (no AO data, AO efficiency only); with impossible AO fuel the
altitude fallback runs. All fail on the code before the fix.

Docs: run() docstring, user docs (fuel-burn check note, fallback chain,
mrv-specification rule 2), units audit I10 with a before/after table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: state when the FL20 retry runs; record two pre-existing retry quirks in I10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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