pub fn read(text: &str) -> Result<FlightLog, LogError>Expand description
Reads an AltOS CSV flight log from its text.
§Errors
LogError::NotThisFormat if the first line that isn’t a # comment isn’t AltOS’s header
(version,serial,flight,…, with or without a leading #) or a header of AltOS’s own names
that names time, state and state_name; LogError::Syntax for a header without a
time column, a row with more cells than the header names, a row whose state and
state_name aren’t the number and the name AltOS gives one state, a header-only table none of
whose rows gives a state AltOS’s exports name, or a pressure in hPa too large to convert to
pascals; LogError::NoData if no row has a time.