pub struct Metric {
pub relative: Option<f64>,
pub absolute: Option<f64>,
pub not_scored: Option<String>,
}Expand description
One metric of a case: how far hpr may be from the reference, or why it is not scored.
In a case file that is a table of one or both bounds:
[metrics.descent_time_s]
relative = 0.03
[metrics.drift_north_m]
relative = 0.03
absolute = 0.002 # this component passes through zero, so a fraction alone means nothingA metric whose table sets neither is refused, because that is the “ungated metric” of Loft lesson L79 by another name.
The one alternative to a gate is to say, in the case file, that the metric is not scored and why:
[metrics.drift_north_m]
not_scored = "hpr and RocketPy differ by 28x on 0.5 mm and the cause is not established (#27)"Such a metric is still measured and still printed, with both numbers, the difference and the
reason: it is a gap on the face of the report, not a quiet omission and not a pass. Loft
excused its two largest misses as “no single target” (Loft lesson L82), so the reason
has to be written down, and
hpr_validate::tests::the_metrics_that_are_not_scored_are_these_and_no_others pins the whole
set: a new excuse has to be argued in a test whose name says what it is.
Fields§
§relative: Option<f64>How far hpr may be from the reference, as a fraction of it (0.03 for 3%).
absolute: Option<f64>How far hpr may be from the reference, in the metric’s own unit.
not_scored: Option<String>Why the metric is measured and reported but not scored. Mutually exclusive with a bound.