Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli (Help and Improvements) #244

Merged
merged 4 commits into from
May 14, 2024
Merged
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
67 changes: 58 additions & 9 deletions rinex-cli/src/cli/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn subcommand() -> Command {
.long_flag("graph")
.arg_required_else_help(true)
.about(
"RINEX data analysis and visualization, rendered as HTML or CSV in the workspace.",
"RINEX data analysis and visualization, rendered as HTML or CSV in the workspace. See -g --help.",
)
.long_about("Analysis and plots (in HTML).
When Observations are present, whether they come from Observation RINEX, Meteo or DORIS RINEX,
Expand Down Expand Up @@ -35,7 +35,7 @@ using our toolbox as data parser and preprocessor and inject the results to thir
OBS RINEX gives GNSS signals observations, but we also support Meteo RINEX and DORIS (special observation) RINEX.

Example (1): render GNSS signals (all of them, whether it be Phase or PR) for GPS.
Use CSV for extract as well:
Extract as CSV at the same time:

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
Expand Down Expand Up @@ -68,48 +68,97 @@ In graph mode, this means we can render both in a single run.
Arg::new("dcb")
.long("dcb")
.action(ArgAction::SetTrue)
.help("Plot Differential Code Bias."),
.help("Plot Differential Code Bias.")
.long_help(
"Plot Differential Code bias of the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --dcb")
)
.arg(
Arg::new("mp")
.long("mp")
.action(ArgAction::SetTrue)
.help("Plot Code Multipath."),
.help("Plot Code Multipath.")
.long_help(
"Plot Code Multipath bias from the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --mp")
)
.arg(
Arg::new("if")
.short('i')
.long("if")
.action(ArgAction::SetTrue)
.help("Plot Ionosphere Free (IF) signal combination."),
.help("Plot Ionosphere Free (IF) signal combination.")
.long_help(
"Plot Ionosphere free signal combination, for the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --if")
)
.arg(
Arg::new("gf")
.long("gf")
.short('g')
.action(ArgAction::SetTrue)
.help("Plot Geometry Free (GF) signal combination."),
.help("Plot Geometry Free (GF) signal combination.")
.long_help(
"Plot Geometry free signal combination, for the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --gf")
)
.arg(
Arg::new("wl")
.long("wl")
.short('w')
.action(ArgAction::SetTrue)
.help("Plot Wide Lane (WL) signal combination."),
.help("Plot Wide Lane (WL) signal combination.")
.long_help(
"Plot Widelane signal combination, for the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --wl")
)
.arg(
Arg::new("nl")
.long("nl")
.short('n')
.action(ArgAction::SetTrue)
.help("Plot Narrow Lane (WL) signal combination."),
.help("Plot Narrow Lane (WL) signal combination.")
.long_help(
"Plot Narrowlane signal combination, for the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --nl")
)
.arg(
Arg::new("mw")
.long("mw")
.short('m')
.action(ArgAction::SetTrue)
.help("Plot Melbourne-Wübbena (MW) signal combination."),
.help("Plot Melbourne-Wübbena (MW) signal combination.")
.long_help(
"Plot Melbourne-Wubbena signal combination for the 5 following spacecrafts

./target/release/rinex-cli \\
-f test_resources/CRNX/V3/ESBC00DNK_R_20201770000_01D_30S_MO.crx.gz \\
-P G06,E13,C14,G15,E31 \\
-g --mw")
)
.arg(Arg::new("cs").long("cs").action(ArgAction::SetTrue).help(
"Phase / Cycle Slip graph.
Expand Down
13 changes: 5 additions & 8 deletions rinex-cli/src/cli/positioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub fn subcommand() -> Command {
.short_flag('p')
.arg_required_else_help(false)
.about("Precise Positioning opmode.
Use this mode to resolve Position Velocity and Time (PVT) solutions from one GNSS context.")
Use this mode to resolve Position Velocity and Time (PVT) solutions from one GNSS context. See -p --help.")
.arg(Arg::new("cfg")
.short('c')
.long("cfg")
Expand All @@ -16,9 +16,10 @@ Use this mode to resolve Position Velocity and Time (PVT) solutions from one GNS
.action(ArgAction::Append)
.help("Pass a Position Solver configuration file (JSON). See --help.")
.long_help("
Read the [https://github.com/georust/rinex/wiki/Positioning] tutorial.
Use [https://github.com/georust/rinex/rinex-cli/config.rtk] as a starting point.
[https://docs.rs/gnss-rtk/latest/gnss_rtk/prelude/struct.Config.html] is the structure to represent in JSON.
Our Wiki pages contains several examples."))
"))
.arg(Arg::new("gpx")
.long("gpx")
.action(ArgAction::SetTrue)
Expand All @@ -32,18 +33,14 @@ Our Wiki pages contains several examples."))
.long("cggtts")
.action(ArgAction::SetTrue)
.help("Activate CGGTTS special solver. See --help.")
.long_help("In CGGTTS opmode, we're only interested in resolving the local offset to the constellation.
Navigation mode is set to [TimeOnly] and we navigate using every single vehicle in sight fitting criteria.
CGGTTS opmode is therefore more demanding as it runs the algorithm many more times than regular PPP.
The PVT solutions are then formatted as a CGGTTS file which is used to compare remote clocks to one another, from a common GNSS constellation."))
.long_help("Refer to the [https://github.com/georust/rinex/wiki/CGGTTS] tutorial."))
.arg(Arg::new("tracking")
.long("trk")
.short('t')
.value_parser(value_parser!(Duration))
.action(ArgAction::Set)
.help("CGGTTS custom tracking duration.
Otherwise, the default tracking duration is used.
Refer to []"))
Otherwise, the default tracking duration is used. Refer to [https://docs.rs/cggtts/latest/cggtts/track/struct.Scheduler.html]."))
.arg(Arg::new("lab")
.long("lab")
.action(ArgAction::Set)
Expand Down
8 changes: 4 additions & 4 deletions rinex-cli/src/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ pub fn graph_opmode(ctx: &Context, matches: &ArgMatches) -> Result<(), Error> {
plot_gnss_combination(
&combination,
&mut plot_ctx,
"Ionosphere Free combination",
"Geometry Free combination",
"Meters of delay",
);
}
Expand All @@ -585,7 +585,7 @@ pub fn graph_opmode(ctx: &Context, matches: &ArgMatches) -> Result<(), Error> {
plot_gnss_combination(
&combination,
&mut plot_ctx,
"Ionosphere Free combination",
"Wide Lane combination",
"Meters of delay",
);
}
Expand All @@ -594,7 +594,7 @@ pub fn graph_opmode(ctx: &Context, matches: &ArgMatches) -> Result<(), Error> {
plot_gnss_combination(
&combination,
&mut plot_ctx,
"Ionosphere Free combination",
"Narrow Lane combination",
"Meters of delay",
);
}
Expand All @@ -603,7 +603,7 @@ pub fn graph_opmode(ctx: &Context, matches: &ArgMatches) -> Result<(), Error> {
plot_gnss_combination(
&combination,
&mut plot_ctx,
"Ionosphere Free combination",
"Melbourne Wubbena combination",
"Meters of delay",
);
}
Expand Down
6 changes: 3 additions & 3 deletions rinex-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub fn main() -> Result<(), Error> {
lat = rad2deg(lat);
lon = rad2deg(lon);
info!(
"manually defined position: {:?} [ECEF] (lat={:.5}°, lon={:.5}°",
"Manually defined position: {:?} [ECEF] (lat={:.5}°, lon={:.5}°)",
(x, y, z),
lat,
lon
Expand All @@ -217,7 +217,7 @@ pub fn main() -> Result<(), Error> {
lat = rad2deg(lat);
lon = rad2deg(lon);
info!(
"position defined in dataset: {:?} [ECEF] (lat={:.5}°, lon={:.5}°",
"Position defined in dataset: {:?} [ECEF] (lat={:.5}°, lon={:.5}°)",
(x, y, z),
lat,
lon
Expand All @@ -230,7 +230,7 @@ pub fn main() -> Result<(), Error> {
* This is not problematic unless user is interested in
* advanced operations, which will most likely fail soon or later.
*/
warn!("no RX position defined");
warn!("No RX position defined");
None
}
},
Expand Down
Loading