Skip to content

Commit 92f52af

Browse files
authored
Frequencies (#330)
* Fix QZSS LEX frequency, improve BDS definitions * Fix a few warnings --------- Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent 91c63dc commit 92f52af

File tree

10 files changed

+172
-180
lines changed

10 files changed

+172
-180
lines changed

src/carrier.rs

Lines changed: 151 additions & 160 deletions
Large diffs are not rendered by default.

src/hatanaka/compressor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
epoch::epoch_decompose as epoch_decomposition,
55
error::FormattingError,
66
hatanaka::{NumDiff, TextDiff},
7-
observation::{HeaderFields, LliFlags, Record},
7+
observation::{HeaderFields, Record},
88
prelude::{Observable, SV},
99
BufWriter,
1010
};

src/hatanaka/textdiff.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ impl TextDiff {
7070
pub fn compress(&mut self, data: &str) -> &str {
7171
let len = data.len();
7272
let mut buf_len = self.buffer.len();
73-
let min_len = std::cmp::min(len, buf_len);
7473

7574
if buf_len > len {
7675
// special case: shrink history
@@ -87,7 +86,7 @@ impl TextDiff {
8786

8887
while let Some(buffered) = buffered.next() {
8988
let byte = bytes.next().unwrap();
90-
let mut compressed = compressed.next().unwrap();
89+
let compressed = compressed.next().unwrap();
9190
if byte == buffered {
9291
*compressed = b' ';
9392
} else {

src/header/formatting.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! RINEX header formatting
22
3-
use gnss::constellation;
4-
53
use crate::{
64
fmt_comment, fmt_rinex,
75
header::Header,

src/ionex/formatting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ pub fn format<W: Write>(
4242
grid.longitude.spacing,
4343
);
4444

45-
let mut nth_map = 0;
46-
let mut has_h = false;
45+
let nth_map = 0;
46+
let has_h = false;
4747
let mut has_rms = false;
4848

4949
for t in record.keys().map(|k| k.epoch).unique().sorted() {

src/meteo/header.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//! Meteo specific Header fields
2-
use std::{
3-
io::{BufWriter, Write},
4-
str::FromStr,
5-
};
2+
use std::io::{BufWriter, Write};
63

74
use crate::prelude::FormattingError;
85

@@ -12,6 +9,9 @@ use serde::{Deserialize, Serialize};
129
#[cfg(feature = "processing")]
1310
use qc_traits::{FilterItem, MaskFilter, MaskOperand};
1411

12+
#[cfg(feature = "processing")]
13+
use std::str::FromStr;
14+
1515
use crate::{meteo::Sensor, prelude::Observable};
1616

1717
/// Meteo specific header fields

src/navigation/ionosphere/bdgim.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
use crate::{
22
epoch::parse_in_timescale as parse_epoch_in_timescale,
3-
error::FormattingError,
43
prelude::{Epoch, ParsingError, TimeScale},
54
};
65

7-
use std::{
8-
io::{BufWriter, Write},
9-
str::FromStr,
10-
};
6+
use std::str::FromStr;
117

128
/// BDGIM Model payload
139
#[derive(Debug, Copy, Clone, Default, PartialEq, PartialOrd)]

src/observable.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,12 @@ impl Observable {
316316
if let Ok(carrier) = self.carrier(constellation) {
317317
matches!(
318318
carrier,
319-
Carrier::L1 | Carrier::E1 | Carrier::G1(_) | Carrier::S1 | Carrier::B2I
319+
Carrier::L1
320+
| Carrier::E1
321+
| Carrier::G1(_)
322+
| Carrier::S1
323+
| Carrier::B1c
324+
| Carrier::B1a
320325
)
321326
} else {
322327
false

src/sampling.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ impl Rinex {
179179
}
180180

181181
#[cfg(test)]
182+
#[cfg(feature = "flate2")]
182183
mod test {
183184
use crate::prelude::Rinex;
184185

185186
#[test]
186-
#[cfg(feature = "flate2")]
187187
fn glacier_20240506_dominant_sample_rate() {
188188
let rnx = Rinex::from_gzip_file(format!(
189189
"{}/data/OBS/V3/240506_glacier_station.obs.gz",

src/tests/antex.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ mod test {
3838
assert_eq!(antenna.calibration.method, CalibrationMethod::Chamber);
3939
assert_eq!(antenna.calibration.agency, "IGG, Univ. Bonn");
4040
assert_eq!(antenna.calibration.number, 1);
41+
4142
assert_eq!(
4243
antenna.calibration.date,
4344
Epoch::from_str("2023-09-20T00:00:00 UTC").unwrap()
4445
);
46+
4547
assert_eq!(
4648
antenna.zenith_grid,
4749
Linspace {
@@ -80,10 +82,11 @@ mod test {
8082

8183
// B2B frequency
8284
assert!(
83-
freq_data.get(&Carrier::B2B).is_some(),
85+
freq_data.get(&Carrier::B2b).is_some(),
8486
"missing specs for B2B frequency"
8587
);
86-
let b2b_specs = freq_data.get(&Carrier::B2B).unwrap();
88+
89+
let b2b_specs = freq_data.get(&Carrier::B2b).unwrap();
8790
assert_eq!(
8891
b2b_specs.apc_eccentricity,
8992
(0.32, -0.63, 160.39),

0 commit comments

Comments
 (0)