Skip to content

Commit 0fabfde

Browse files
authored
GnssAbsoluteTime: avoid returning None on identical timescales (#16)
Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent a8eaaa7 commit 0fabfde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/processing/time/absolute.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ impl GnssAbsoluteTime {
3737

3838
/// [Epoch] interpolation & correction attempt, into desired [TimeScale].
3939
pub fn precise_epoch_correction(&self, t: Epoch, target: TimeScale) -> Option<Epoch> {
40+
if t.time_scale == target {
41+
// nothing to be done!
42+
return Some(t);
43+
}
44+
4045
if let Some(poly) = self
4146
.polynomials
4247
.iter()

0 commit comments

Comments
 (0)