Skip to content

Commit 7bb808a

Browse files
authored
Ublox (#381)
* Introducing ublox option * update to ublox v0.6 * MGA-EPH * needs msrv bump --------- Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent 0cf6701 commit 7bb808a

File tree

17 files changed

+1256
-9
lines changed

17 files changed

+1256
-9
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install Rust
3838
uses: dtolnay/rust-toolchain@master
3939
with:
40-
toolchain: 1.82.0
40+
toolchain: 1.83.0
4141
override: true
4242

4343
- name: Bench

.github/workflows/daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions-rs/toolchain@v1
2323
name: Install Rust
2424
with:
25-
toolchain: 1.82.0
25+
toolchain: 1.83.0
2626
override: true
2727

2828
- uses: actions-rs/cargo@v1

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- uses: actions-rs/toolchain@v1
3434
name: Install Rust
3535
with:
36-
toolchain: 1.82.0
36+
toolchain: 1.83.0
3737
override: true
3838

3939
- uses: actions-rs/cargo@v1

Cargo.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exclude = [
1515
]
1616

1717
[package.metadata]
18-
msrv = "1.82"
18+
msrv = "1.83"
1919

2020
[package.metadata.docs.rs]
2121
all-features = true
@@ -77,6 +77,17 @@ rtcm = [
7777
"dep:rtcm-rs",
7878
]
7979

80+
# RINEX to GNSS protos
81+
protos = [
82+
"dep:gnss-protos",
83+
]
84+
85+
# RINEX to UBX serializer and UBX helpers
86+
ublox = [
87+
"dep:ublox",
88+
"dep:gnss-protos",
89+
]
90+
8091
# Unlock Quality Check and TEQC like methods & traits.
8192
qc = [
8293
"dep:gnss-qc-traits",
@@ -102,6 +113,7 @@ full = [
102113
"binex",
103114
"rtcm",
104115
"ut1",
116+
"ublox",
105117
]
106118

107119
[build-dependencies]
@@ -141,6 +153,13 @@ binex = { version = "0.5", optional = true }
141153
# RTCM
142154
rtcm-rs = { version = "0.11", optional = true }
143155

156+
# RINEX to GNSS protos
157+
gnss-protos = { version = "0.0.2", optional = true, features = ["gps"] }
158+
159+
# U-Blox
160+
# ublox = { version = "0.6", optional = true, features = ["std", "sfrbx-gps"] }
161+
ublox = { git = "https://github.com/ublox-rs/ublox", rev = "d43c425ee2904d577d06e70d7fbd80d98132a8a6", optional = true, features = ["std", "sfrbx-gps"] }
162+
144163
# TODO: see if we can get rid of FromPrimitive ?
145164
num-traits = "0.2.15"
146165

@@ -153,6 +172,7 @@ rand = "0.8.4"
153172
serde_json = "1"
154173
criterion = "0.7"
155174
env_logger = "0.11"
175+
ublox = { git = "https://github.com/ublox-rs/ublox", rev = "d43c425ee2904d577d06e70d7fbd80d98132a8a6", features = ["std", "sfrbx-gps"] }
156176

157177
[[bench]]
158178
name = "parsing"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RINEX
66
[![crates.io](https://docs.rs/rinex/badge.svg)](https://docs.rs/rinex/)
77
[![crates.io](https://img.shields.io/crates/d/rinex.svg)](https://crates.io/crates/rinex)
88

9-
[![MRSV](https://img.shields.io/badge/MSRV-1.82.0-orange?style=for-the-badge)](https://github.com/rust-lang/rust/releases/tag/1.82.0)
9+
[![MRSV](https://img.shields.io/badge/MSRV-1.83.0-orange?style=for-the-badge)](https://github.com/rust-lang/rust/releases/tag/1.83.0)
1010
[![License](https://img.shields.io/badge/license-MPL_2.0-orange?style=for-the-badge&logo=mozilla)](https://github.com/nav-solutions/rinex/blob/main/LICENSE)
1111

1212
[RINEX (Receiver Independent EXchange)](https://en.wikipedia.org/wiki/RINEX) parser and formatter.

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ mod binex;
7070
#[cfg_attr(docsrs, doc(cfg(feature = "rtcm")))]
7171
mod rtcm;
7272

73+
#[cfg(feature = "ublox")]
74+
#[cfg_attr(docsrs, doc(cfg(feature = "ublox")))]
75+
mod ublox;
76+
7377
#[cfg(test)]
7478
mod tests;
7579

@@ -197,6 +201,10 @@ pub mod prelude {
197201
#[cfg(feature = "rtcm")]
198202
#[cfg_attr(docsrs, doc(cfg(feature = "rtcm")))]
199203
pub use crate::rtcm::RTCM2RNX;
204+
205+
#[cfg(feature = "ublox")]
206+
#[cfg_attr(docsrs, doc(cfg(feature = "ublox")))]
207+
pub use crate::ublox::RNX2UBX;
200208
}
201209

202210
/// Package dedicated to file production.

src/navigation/ephemeris/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ pub mod kepler;
2323
#[cfg(feature = "nav")]
2424
use crate::prelude::nav::Almanac;
2525

26-
use crate::prelude::{Constellation, Duration, Epoch, TimeScale, SV};
26+
#[cfg(feature = "ublox")]
27+
mod ublox;
2728

2829
#[cfg(feature = "nav")]
2930
use anise::{
@@ -34,6 +35,8 @@ use anise::{
3435

3536
use std::collections::HashMap;
3637

38+
use crate::prelude::{Constellation, Duration, Epoch, TimeScale, SV};
39+
3740
/// Ephemeris Navigation message. May be found in all RINEX revisions.
3841
/// Describes the content of the radio message at publication time.
3942
/// Usually published at midnight and regularly updated with respect

0 commit comments

Comments
 (0)