コンテンツにスキップ

IcgemParseError

このコンテンツはまだ日本語訳がありません。

Defined in: icgem.rs:91

Available on crate feature alloc only.

pub enum IcgemParseError {
MissingEndOfHead,
MissingHeader(&'static str),
DuplicateHeader(&'static str),
InvalidHeader(&'static str, alloc::string::String),
NotAGravityField(alloc::string::String),
UnsupportedNormalization(alloc::string::String),
DegreeUnavailable { requested: usize, available: usize },
TimeVariableUnsupported { line: usize, kind: alloc::string::String },
UnknownRecord { line: usize, kind: alloc::string::String },
MalformedRecord { line: usize, reason: alloc::string::String },
IndexOutOfRange { line: usize, degree: usize, order: usize },
DuplicateCoefficient { line: usize, degree: usize, order: usize },
NonFiniteCoefficient { line: usize, degree: usize, order: usize },
UnexpectedC00(f64),
NonZeroDegreeOne { degree: usize, order: usize },
MissingCoefficient { degree: usize, order: usize },
}

Why an ICGEM text could not be parsed into SphericalHarmonicCoefficients(super::SphericalHarmonicCoefficients).

Reading a file adds I/O failures on top; that is IcgemFileError(super::IcgemFileError).

end_of_head never appeared.


MissingHeader(&‘static str)

A required header keyword is absent.


DuplicateHeader(&‘static str)

A header keyword the parser uses appeared twice.


InvalidHeader(&‘static str, alloc::string::String)

A header value did not parse (keyword, value).


NotAGravityField(alloc::string::String)

product_type was present but not gravity_field.


UnsupportedNormalization(alloc::string::String)

norm was something other than fully_normalized.


requested: usize available: usize

The caller asked for a degree above the file’s max_degree.


line: usize kind: alloc::string::String

A time-variable record kind (gfct, trnd, dot, asin, acos).


line: usize kind: alloc::string::String

A data record kind this parser does not know.


line: usize reason: alloc::string::String

A gfc record with the wrong number of columns or an unparsable field.


line: usize degree: usize order: usize

n > max_degree or m > n.


line: usize degree: usize order: usize

The same (n, m) appeared twice.


line: usize degree: usize order: usize

A coefficient value was NaN or infinite.


UnexpectedC00(f64)

C̄00 was present and not 1 (the point-mass term is modelled separately).


degree: usize order: usize

A degree-1 coefficient was non-zero: that encodes an offset between the coordinate origin and the centre of mass, which this evaluator does not model (it starts at degree 2).


degree: usize order: usize

A coefficient with 2 ≤ n ≤ max_degree never appeared.