Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/sentences/fix_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ pub enum FixType {
Estimated,
Manual,
Simulation,
WAAS,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Could you please document in which manufacturers and devices this is know to exist.

if there's any information about datasheet and protocol or similar to document it's use, this would be perfect.

}

impl FixType {
#[inline]
pub fn is_valid(self) -> bool {
match self {
FixType::Simulation | FixType::Manual | FixType::Estimated | FixType::Invalid => false,
FixType::DGps | FixType::Gps | FixType::Rtk | FixType::FloatRtk | FixType::Pps => true,
FixType::DGps
| FixType::Gps
| FixType::Rtk
| FixType::FloatRtk
| FixType::Pps
| FixType::WAAS => true,
}
}
}
Expand All @@ -37,6 +43,7 @@ impl From<char> for FixType {
'6' => FixType::Estimated,
'7' => FixType::Manual,
'8' => FixType::Simulation,
'9' => FixType::WAAS,
_ => FixType::Invalid,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/sentences/gga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn do_parse_gga(i: &str) -> IResult<&str, GgaData> {
let (i, _) = char(',').parse(i)?;
let (i, lat_lon) = parse_lat_lon(i)?;
let (i, _) = char(',').parse(i)?;
let (i, fix_quality) = one_of("012345678").parse(i)?;
let (i, fix_quality) = one_of("0123456789").parse(i)?;
let (i, _) = char(',').parse(i)?;
let (i, fix_satellites) = opt(number::<u32>).parse(i)?;
let (i, _) = char(',').parse(i)?;
Expand Down