Skip to main content

parse_log

Function parse_log 

Source
pub fn parse_log(
    id: &str,
    log: &Log,
    text: &str,
) -> Result<Vec<(f64, f64)>, RealFlightError>
Expand description

A log’s rows as (time, height in meters), in file order.

Each row is split at commas and the two columns trimmed and parsed; a row where either doesn’t parse as a number is skipped (NDRT 2020’s altitude columns end before its acceleration columns do). Rows past Log::until_s are not read.

§Errors

RealFlightError::Input if fewer than two rows are read, or times decrease.