Skip to content

Commit

Permalink
Fix CGGTTS, reset the tracker after it is released. (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicalloy authored Jan 6, 2025
1 parent 03d6a49 commit 8ddccae
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions rinex-cli/src/positioning/cggtts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@ pub fn resolve<'a, 'b, CK: ClockStateProvider, O: OrbitSource>(

// TODO: RTK
//candidate.set_remote_observations(remote);
let target = &(*sv, observable.clone());

let tracker = match trackers.get_mut(target) {
None => {
// initialize new tracker
trackers.insert((*sv, observable.clone()), SVTracker::default());
trackers.get_mut(target).unwrap()
},
Some(tracker) => tracker,
};

match solver.resolve(*t, &vec![candidate]) {
Ok((t, pvt_solution)) => {
Expand Down Expand Up @@ -297,18 +307,6 @@ pub fn resolve<'a, 'b, CK: ClockStateProvider, O: OrbitSource>(
elevation,
};

let target = &(*sv, observable.clone());

let tracker = match trackers.get_mut(target) {
None => {
// initialize new tracker
trackers
.insert((*sv, observable.clone()), SVTracker::default());
trackers.get_mut(target).unwrap()
},
Some(tracker) => tracker,
};

// // verify buffer continuity
// if !tracker.no_gaps(dominant_sampling_period) {
// // on any discontinuity we need to reset
Expand Down Expand Up @@ -398,9 +396,6 @@ pub fn resolve<'a, 'b, CK: ClockStateProvider, O: OrbitSource>(
// TODO: most likely we should reset the SV signal tracker here
},
} //.fit()

// reset so we start a new track
tracker.reset();
}
// time to release a track
else {
Expand All @@ -423,6 +418,10 @@ pub fn resolve<'a, 'b, CK: ClockStateProvider, O: OrbitSource>(
// }
},
} //.pvt resolve
// after release, reset so we start a new track
if should_release {
tracker.reset();
}
} // for all OBS
} //.sv()
}
Expand Down

0 comments on commit 8ddccae

Please sign in to comment.