Skip to content

Commit

Permalink
Release 0.13.0 (#163)
Browse files Browse the repository at this point in the history
* rinex: only rinex-qc needs sp3 dependency
* Remove unused Error types
* improve Version parssing errors
* RINEX type parsing errors
* improve marker type parsing
* Improving Parsing Error ecosystem
* improve coordinates parsing
* improve coordinates parsing
* prepare next releases
* Improve sv parsing errors
* datetime parsing improvements
* preliminary work for High Precision Phase Data
* parse formatted month: check possible error, do not use a macro
* PCVs and DCBs compensations
* DCBs, PCVs and Scaling factors parsing
* improve ionex grid parsing and related erors
* need to bump cli to v0.9.1 too
* apply suggestion
* apply some clippy suggestions

---------

Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres authored Sep 9, 2023
1 parent d064898 commit 2bd3165
Show file tree
Hide file tree
Showing 30 changed files with 804 additions and 550 deletions.
2 changes: 1 addition & 1 deletion rinex-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rinex-cli"
version = "0.9.0"
version = "0.9.1"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Command line tool parse and analyze RINEX data"
Expand Down
11 changes: 5 additions & 6 deletions rinex-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ impl Cli {
.long("quiet")
.action(ArgAction::SetTrue)
.help("Disable all terminal output. Also disables auto HTML reports opener."))
.arg(Arg::new("pretty")
.short('p')
.long("pretty")
.arg(Arg::new("readable")
.short('r')
.action(ArgAction::SetTrue)
.help("Make terminal output more readable."))
.arg(Arg::new("workspace")
Expand Down Expand Up @@ -400,9 +399,9 @@ Refer to README"))
fn get_flag(&self, flag: &str) -> bool {
self.matches.get_flag(flag)
}
/// returns true if --pretty was passed
pub fn pretty(&self) -> bool {
self.get_flag("pretty")
/// returns true if pretty JSON is requested
pub fn readable_json(&self) -> bool {
self.get_flag("readable")
}
/// Returns true if quiet mode is activated
pub fn quiet(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion rinex-cli/src/identification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rinex_qc::QcContext;
* Basic identification operations
*/
pub fn rinex_identification(ctx: &QcContext, cli: &Cli) {
let pretty = cli.pretty();
let pretty = cli.readable_json();
let ops = cli.identification_ops();

identification(&ctx.primary_data(), pretty, ops.clone());
Expand Down
2 changes: 1 addition & 1 deletion rinex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rinex"
version = "0.12.0"
version = "0.13.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Package to parse and analyze RINEX data"
Expand Down
10 changes: 4 additions & 6 deletions rinex/src/algorithm/filters/mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,10 @@ impl std::str::FromStr for MaskFilter {
operand_offset = Some(i);
break;
}
} else {
if let Ok(op) = MaskOperand::from_str(&cleanedup[i..i + 1]) {
operand = Some(op.clone());
operand_offset = Some(i);
break;
}
} else if let Ok(op) = MaskOperand::from_str(&cleanedup[i..i + 1]) {
operand = Some(op.clone());
operand_offset = Some(i);
break;
}
}

Expand Down
20 changes: 11 additions & 9 deletions rinex/src/algorithm/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ pub enum Error {
InvalidAzimuthAngleDescription,
#[error("bad snr description")]
InvalidSNRDescription,
#[error("failed to parse sv")]
SvParingError(#[from] sv::Error),
#[error("failed to parse constellation")]
ConstellationParingError(#[from] constellation::Error),
#[error("sv parsing error")]
SvParing(#[from] sv::ParsingError),
#[error("constellation parsing error")]
ConstellationParing(#[from] constellation::ParsingError),
#[error("failed to parse epoch flag")]
EpochFlagParsingError(#[from] crate::epoch::flag::Error),
#[error("failed to parse constellation")]
ConstellationParsingError,
#[error("invalid nav item")]
InvalidNavItem(#[from] crate::navigation::Error),
#[error("invalid observable item")]
InvalidObsItem(#[from] crate::observable::Error),
#[error("observable parsing error")]
ObservableParsing(#[from] observable::ParsingError),
#[error("invalid duration description")]
InvalidDurationItem(#[from] hifitime::Errors),
}
Expand Down Expand Up @@ -147,7 +147,7 @@ impl std::ops::BitOr for TargetItem {
}
}

pub(crate) fn parse_sv_list(items: Vec<&str>) -> Result<Vec<Sv>, sv::Error> {
pub(crate) fn parse_sv_list(items: Vec<&str>) -> Result<Vec<Sv>, sv::ParsingError> {
let mut ret: Vec<Sv> = Vec::with_capacity(items.len());
for item in items {
let sv = Sv::from_str(item.trim())?;
Expand All @@ -158,7 +158,7 @@ pub(crate) fn parse_sv_list(items: Vec<&str>) -> Result<Vec<Sv>, sv::Error> {

pub(crate) fn parse_gnss_list(
items: Vec<&str>,
) -> Result<Vec<Constellation>, constellation::Error> {
) -> Result<Vec<Constellation>, constellation::ParsingError> {
let mut ret: Vec<Constellation> = Vec::with_capacity(items.len());
for item in items {
let c = Constellation::from_str(item.trim())?;
Expand All @@ -167,7 +167,9 @@ pub(crate) fn parse_gnss_list(
Ok(ret)
}

pub(crate) fn parse_obs_list(items: Vec<&str>) -> Result<Vec<Observable>, observable::Error> {
pub(crate) fn parse_obs_list(
items: Vec<&str>,
) -> Result<Vec<Observable>, observable::ParsingError> {
let mut ret: Vec<Observable> = Vec::with_capacity(items.len());
for item in items {
let obs = Observable::from_str(item.trim())?;
Expand Down
4 changes: 2 additions & 2 deletions rinex/src/carrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ pub enum Error {
ParseError(String),
//#[error("unable to identify glonass channel from \"{0}\"")]
//ParseIntError(#[from] std::num::ParseIntError),
#[error("unable to identify constellation + carrier code")]
SvError(#[from] sv::Error),
#[error("sv parsing error")]
SvParsing(#[from] sv::ParsingError),
#[error("carrier::from_observable unrecognized \"{0}\"")]
UnknownObservable(String),
}
Expand Down
5 changes: 1 addition & 4 deletions rinex/src/clocks/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,7 @@ pub(crate) fn parse_epoch(
let (dtype, rem) = line.split_at(3);
let data_type = DataType::from_str(dtype.trim())?; // must pass
let mut rem = rem.clone();
let limit = Version {
major: 3,
minor: 04,
};
let limit = Version { major: 3, minor: 4 };

let system: System = match version < limit {
true => {
Expand Down
Loading

0 comments on commit 2bd3165

Please sign in to comment.