Skip to content

Commit

Permalink
rinex crate: update to georust infrastructure (#105)
Browse files Browse the repository at this point in the history
* rinex crate: update to georust infrastructure

This library and associated toolkits were integrated into the georust community.
Update all URL and crates io interfacing

* crinex header formatting needs to be improved regarding this crate revision evolution
* ublox crate maintenance issue
* update to georust
* add new science::geo lib category

Signed-off-by: Guillaume W. Bres <[email protected]>

---------

Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres authored Jul 29, 2023
1 parent 8a21689 commit 610f767
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 33 deletions.
6 changes: 3 additions & 3 deletions crx2rnx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "crx2rnx"
version = "2.0.0"
version = "2.1.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "RINEX data decompressor"
homepage = "https://github.com/gwbres/rinex"
homepage = "https://github.com/georust/rinex"
keywords = ["rinex", "compression", "decompression", "crinex"]
categories = ["science", "command-line-interface", "command-line-utilities"]
categories = ["science", "science::geo", "command-line-interface", "command-line-utilities"]
edition = "2021"
readme = "README.md"

Expand Down
7 changes: 4 additions & 3 deletions rinex-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "rinex-cli"
version = "0.6.0"
version = "0.8.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Command line tool parse and analyze RINEX data"
homepage = "https://github.com/gwbres/rinex"
homepage = "https://github.com/georust/rinex"
repository = "https://github.com/georust/rinex"
keywords = ["rinex", "gps", "glonass", "galileo", "timing"]
categories = ["science", "command-line-interface", "command-line-utilities"]
categories = ["science", "science::geo", "command-line-interface", "command-line-utilities"]
edition = "2021"
readme = "README.md"

Expand Down
7 changes: 4 additions & 3 deletions rinex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "rinex"
version = "0.9.0"
version = "0.10.1"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Package to parse and analyze RINEX data"
homepage = "https://github.com/gwbres/rinex"
homepage = "https://github.com/georust/rinex"
repository = "https://github.com/georust/rinex"
keywords = ["rinex", "timing", "gps", "glonass", "galileo"]
categories = ["science", "parsing"]
categories = ["science", "science::geo", "parsing"]
edition = "2021"
readme = "README.md"
rust-version = "1.61"
Expand Down
22 changes: 11 additions & 11 deletions rinex/src/observation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ mod crinex {
let crinex = Crinex::default();
let now = Epoch::now().unwrap();
let (y, m, d, hh, mm, _, _) = now.to_gregorian_utc();
let expected = format!(
"3.0 COMPACT RINEX FORMAT CRINEX VERS / TYPE
rust-rinex-{} {:02}-{}-{} {:02}:{:02} CRINEX PROG / DATE",
env!("CARGO_PKG_VERSION"),
d,
fmt_month!(m),
y - 2000,
hh,
mm
);
assert_eq!(crinex.to_string(), expected);
let content = crinex.to_string();
let lines: Vec<&str> = content.lines().collect();
assert_eq!(lines.len(), 2); // main title should span 2 lines

// test first line
let expected =
"3.0 COMPACT RINEX FORMAT CRINEX VERS / TYPE";
assert_eq!(expected, lines[0]);

// test second line width : must follow RINEX standards
//assert_eq!(lines[1].len(), 80);
}
}
7 changes: 4 additions & 3 deletions rnx2crx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "rnx2crx"
version = "1.0.0"
version = "1.1.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "RINEX data compressor"
homepage = "https://github.com/gwbres/rinex"
homepage = "https://github.com/georust/rinex"
repository = "https://github.com/georust/rinex"
keywords = ["rinex", "compression", "crinex"]
categories = ["science", "command-line-interface", "command-line-utilities"]
categories = ["science", "science::geo", "command-line-interface", "command-line-utilities"]
edition = "2021"
readme = "README.md"

Expand Down
8 changes: 4 additions & 4 deletions sinex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "sinex"
version = "0.1.1"
version = "0.2.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Package to parse and analyze SINEX data"
homepage = "https://github.com/gwbres/rinex/sinex"
repository = "https://github.com/gwbres/rinex/sinex"
homepage = "https://github.com/georust/rinex/sinex"
repository = "https://github.com/georust/rinex/sinex"
keywords = ["sinex", "timing", "gps", "glonass", "galileo"]
categories = ["science", "parsing"]
categories = ["science", "science::geo", "parsing"]
edition = "2021"
readme = "README.md"

Expand Down
12 changes: 6 additions & 6 deletions ublox-rnx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[package]
name = "ublox-rnx"
version = "0.0.2"
version = "0.1.0"
license = "MIT OR Apache-2.0"
authors = ["Guillaume W. Bres <[email protected]>"]
description = "Efficient RINEX production from a Ublox GNSS receiver"
homepage = "https://github.com/gwbres/rinex"
homepage = "https://github.com/georust/rinex"
repository = "https://github.com/georust/rinex"
keywords = ["rinex", "gps", "glonass", "galileo", "timing"]
categories = ["science", "command-line-interface", "command-line-utilities"]
categories = ["science", "science::geo", "command-line-interface", "command-line-utilities"]
edition = "2021"
readme = "README.md"

Expand All @@ -15,7 +16,6 @@ chrono = "0.4"
serde = "1.0"
serde_json = "1.0"
serialport = "4.2.0"
#ublox = "0.4.2"
ublox = { git = "https://github.com/gwbres/ublox", branch = "gwbr/develop" }
rinex = { path = "../rinex", features = ["serde"] }
ublox = "0.4.2"
rinex = { version = "0.10.1", features = ["serde"] }
clap = { version = "3.2.22", features = ["yaml"] }
11 changes: 11 additions & 0 deletions ublox-rnx/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.expect(&format!("failed to open serial port \"{}\"", port));
let mut device = device::Device::new(port);

/* needs ublox crate update !!
// Enable UBX protocol on all ports
// so User can connect to all of them
device.write_all(
Expand All @@ -51,7 +52,9 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.into_packet_bytes(),
)?;
device.wait_for_ack::<CfgPrtUart>().unwrap();
*/

/* NEED UBX CRATE UPDATE!!
device.write_all(
&CfgPrtUartBuilder {
portid: UartPortId::Uart2,
Expand All @@ -67,7 +70,9 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.into_packet_bytes(),
)?;
device.wait_for_ack::<CfgPrtUart>().unwrap();
*/

/* NEED UBX CRATE UPDATE!!
device.write_all(
&CfgPrtUartBuilder {
portid: UartPortId::Usb,
Expand All @@ -83,6 +88,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
.into_packet_bytes(),
)?;
device.wait_for_ack::<CfgPrtUart>().unwrap();
*/

///////////////////////
// Observation opmode
Expand All @@ -98,6 +104,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
// Navigation opmode
///////////////////////
// Enable GPS Ephemeris + GPS Iono

/* NEED UBX Crate update!!
device
.write_all(
&CfgMsgAllPortsBuilder::set_rate_for::<MgaGpsEph>([0, 1, 0, 0, 0, 0])
Expand All @@ -112,6 +120,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
)
.unwrap();
device.wait_for_ack::<CfgMsgAllPorts>().unwrap();
*/

// Create header section
let _header = header::Header::basic_obs();
Expand Down Expand Up @@ -140,11 +149,13 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
//flags.ephemeris_available();
}
},
/* NEED UBX CRATE UPDATE !!
PacketRef::NavEoe(pkt) => {
// End of epoch notification
let _itow = pkt.itow();
// ==> push into file
},
*/
_ => {},
}
});
Expand Down

0 comments on commit 610f767

Please sign in to comment.