Skip to content

Commit 41cd554

Browse files
authored
update ANISE v0.8 (#113)
* update anise v0.8 * lints * update nalgebra --------- Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
1 parent bf0914f commit 41cd554

37 files changed

+144
-143
lines changed

.github/workflows/daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions-rs/toolchain@v1
2020
name: Install Rust
2121
with:
22-
toolchain: 1.82.0
22+
toolchain: 1.89.0
2323
override: true
2424

2525
- name: Build

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- uses: actions-rs/toolchain@v1
3131
name: Install Rust
3232
with:
33-
toolchain: 1.82.0
33+
toolchain: 1.89.0
3434
override: true
3535

3636
- name: Build

Cargo.toml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ homepage = "https://github.com/nav-solutions/gnss-rtk"
88
repository = "https://github.com/nav-solutions/gnss-rtk"
99
keywords = ["timing", "positioning", "gps", "glonass", "galileo"]
1010
categories = ["science", "science::geo"]
11-
edition = "2021"
11+
edition = "2024"
1212
readme = "README.md"
1313
exclude = [
1414
"examples_need_update/*",
@@ -26,21 +26,26 @@ serde = [
2626
"hifitime/serde"
2727
]
2828

29-
[dev-dependencies]
30-
rstest = "0.25"
31-
serde_json = "1"
32-
env_logger = "0.11"
33-
rand = { version = "0.9", features = ["small_rng"] }
34-
anise = { version = "0.5.3", features = ["embed_ephem"] }
29+
[dependencies.gnss-rs]
30+
git = "https://github.com/nav-solutions/gnss"
31+
rev = "dc4d4c2d413a3be90a3fa08a6ab29079eec13923"
32+
features = ["std", "domes", "cospar", "sbas"]
3533

3634
[dependencies]
3735
log = "0.4"
3836
thiserror = "2"
39-
nalgebra = "0.33"
37+
nalgebra = "0.34"
4038
itertools = "0.14"
4139
polyfit-rs = "0.2"
42-
gnss-rs = "2.5"
43-
anise = "0.5.3"
40+
anise = "0.8"
4441
num-traits = "0.2"
45-
hifitime = { version = "4.1", features = ["serde", "std"] }
42+
hifitime = { version = "4", features = ["serde", "std"] }
4643
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
44+
45+
[dev-dependencies]
46+
rstest = "0.25"
47+
serde_json = "1"
48+
env_logger = "0.11"
49+
rand = { version = "0.9", features = ["small_rng"] }
50+
anise = { version = "0.8", features = ["embed_ephem"] }
51+

src/bancroft.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl Bancroft {
134134

135135
#[cfg(test)]
136136
mod test {
137-
use super::{lorentz_4_4, Bancroft};
137+
use super::{Bancroft, lorentz_4_4};
138138
use nalgebra::Vector4;
139139

140140
#[test]

src/bias/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub mod environment;
44
/// Spaceborn (onboard) biases
55
pub mod spaceborn;
66

7-
use crate::prelude::{Epoch, Vector3, SV};
7+
use crate::prelude::{Epoch, SV, Vector3};
88

99
/// [BiasRuntime] contains everything to compute your [Bias] estimate.
1010
#[derive(Default, Copy, Clone)]

src/candidate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
bias::spaceborn::SatelliteClockCorrection,
99
constants::SPEED_OF_LIGHT_M_S,
1010
navigation::state::State,
11-
prelude::{Almanac, Config, Duration, Epoch, Error, Orbit, Vector3, SV},
11+
prelude::{Almanac, Config, Duration, Epoch, Error, Orbit, SV, Vector3},
1212
};
1313

1414
use anise::errors::AlmanacResult;

src/candidate/single_diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mod test {
8888
use crate::{
8989
constants::SPEED_OF_LIGHT_M_S,
9090
prelude::{Carrier, Epoch},
91-
tests::{init_logger, CandidatesBuilder, E01, E03, E05},
91+
tests::{CandidatesBuilder, E01, E03, E05, init_logger},
9292
};
9393

9494
#[test]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ mod tests;
3535
pub mod prelude {
3636
pub use crate::{
3737
bias::{
38+
BiasRuntime,
3839
environment::{
3940
EnvironmentalBias, IonosphereBias, IonosphereModel, KbModel, TroposphereModel,
4041
},
4142
spaceborn::{SatelliteClockCorrection, SpacebornBias},
42-
BiasRuntime,
4343
},
4444
candidate::{Candidate, Observation},
4545
carrier::{Carrier, Signal},

src/navigation/dop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl DilutionOfPrecision {
5555
pub fn new(state: &State, g_gt_inv: DMatrix<f64>) -> Self {
5656
let (nrows, ncols) = (g_gt_inv.nrows(), g_gt_inv.ncols());
5757

58-
assert!(nrows >= U3::USIZE, "incorrect (G.G)⁻¹ dimensions");
58+
assert!(nrows >= U3::DIM, "incorrect (G.G)⁻¹ dimensions");
5959
assert_eq!(nrows, ncols, "(G.G)⁻¹ is not square");
6060

6161
let (lat_rad, long_rad) = (
@@ -67,7 +67,7 @@ impl DilutionOfPrecision {
6767

6868
Self {
6969
gdop: g_gt_inv.trace().sqrt(),
70-
tdop: if nrows > U3::USIZE {
70+
tdop: if nrows > U3::DIM {
7171
g_gt_inv[(3, 3)].sqrt()
7272
} else {
7373
0.0

src/navigation/kalman.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::error::Error;
22

33
use nalgebra::{
4-
allocator::Allocator, DMatrix, DVector, DefaultAllocator, DimName, OMatrix, OVector,
4+
DMatrix, DVector, DefaultAllocator, DimName, OMatrix, OVector, allocator::Allocator,
55
};
66

77
#[derive(Clone)]
@@ -69,8 +69,8 @@ impl KfEstimate {
6969
// assert_eq!(p_rows, p_cols, "P is not square!");
7070

7171
// Self {
72-
// x: DMatrix::from_column_slice(D::USIZE, U1::USIZE, x.as_slice()),
73-
// p: DMatrix::from_column_slice(D::USIZE, D::USIZE, p.as_slice()),
72+
// x: DMatrix::from_column_slice(D::DIM, U1::DIM, x.as_slice()),
73+
// p: DMatrix::from_column_slice(D::DIM, D::DIM, p.as_slice()),
7474
// }
7575
// }
7676

@@ -89,7 +89,7 @@ impl KfEstimate {
8989

9090
Self {
9191
x: DVector::from_column_slice(x.as_slice()),
92-
p: DMatrix::from_column_slice(D::USIZE, D::USIZE, p.as_slice()),
92+
p: DMatrix::from_column_slice(D::DIM, D::DIM, p.as_slice()),
9393
}
9494
}
9595
}
@@ -133,7 +133,7 @@ impl Kalman {
133133
let p_k = f_k * estimate.p * f_k_t + q_k;
134134

135135
let x_k = DVector::<f64>::from_row_slice(x_k.as_slice());
136-
let p_k = DMatrix::<f64>::from_column_slice(D::USIZE, D::USIZE, p_k.as_slice());
136+
let p_k = DMatrix::<f64>::from_column_slice(D::DIM, D::DIM, p_k.as_slice());
137137

138138
self.predicted = KfEstimate::new(&x_k, &p_k);
139139
self.initialized = true;
@@ -311,13 +311,13 @@ mod test {
311311

312312
let kfe = KfEstimate::from_static(x, p);
313313

314-
for i in 0..U6::USIZE {
314+
for i in 0..U6::DIM {
315315
let x = kfe.x[i] as usize;
316316
assert_eq!(x, i + 1);
317317

318-
for j in 0..U6::USIZE {
318+
for j in 0..U6::DIM {
319319
let p = kfe.p[(i, j)] as usize;
320-
assert_eq!(p, i + 1 + j * U6::USIZE);
320+
assert_eq!(p, i + 1 + j * U6::DIM);
321321
}
322322
}
323323
}

0 commit comments

Comments
 (0)