pub fn compare(
tool: &Tool,
metric: FlightMetric,
reference: ReferenceReading,
measured: Option<f64>,
) -> MetricOutcomeExpand description
Compares hpr’s measured value of metric with a reference reading from tool.
- A metric whose meaning in
tool’s version is not measured is withheld (Loft lesson L80), and so is every metric of an aborted reference flight. - A reference
NoneorNaNmeans its flight has no value; hpr’sNonemeans the same, but aNaNor infinity from hpr, or an infinity from the reference, is a failure. - For a metric taken at an event, no value on both sides withholds it; on one side only, it fails, since the flights disagree about what happened (Loft lesson L81: never 0).
- For a metric every complete flight has, such as the apogee, a missing value fails.
measured must be taken by the Definition that definition gives for tool: the last
deployment, say, not the first.