pub fn read(text: &str) -> Result<FlightLog, LogError>Expand description
Reads a log in this layout.
§Errors
LogError::NotThisFormatif the file doesn’t open with*** Configuration ***and a*** Raw data ***line within its first 200 lines.LogError::Syntaxfor a configuration line the reader can’t take (a sample rate that isn’t a positive number, an input it doesn’t know or listed twice, a rate or a list stated twice), a table header that doesn’t open withTimeor doesn’t name the inputs the configuration lists, a row not as wide as the header, aTimethat isn’t a number greater than the row before’s, or a count that is a number but not a whole one from 0 to 1,023.LogError::NoDatawithout a row.LogError::Unitwhere the configuration states no sample rate or lists no inputs, the file holds a single row, or the clock’s average step isn’t the stated rate’s within 1%: then nothing in the file says the clock counts seconds.