Skip to content

Commit

Permalink
Epoch comparison issue
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres committed Mar 6, 2024
1 parent 4873a56 commit b2a47bd
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions rinex-cli/src/positioning/ppp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,46 @@ where
* 3. Radio last option: always feasible
*/
let clock_state = if let Some(clk) = clk_data {
//if ctx.needs_clock_interpolation {
if let Some((_, profile)) = clk.precise_sv_clock_interpolate(*t, *sv) {
(
profile.bias,
profile.drift.unwrap_or(0.0),
profile.drift_change.unwrap_or(0.0),
)
if ctx.needs_clock_interpolation {
if let Some((_, profile)) = clk.precise_sv_clock_interpolate(*t, *sv) {
(
profile.bias,
profile.drift.unwrap_or(0.0),
profile.drift_change.unwrap_or(0.0),
)
} else {
/*
* interpolation failure.
* Do not interpolate other products: SV will not be presented.
*/
continue;
}
} else {
/*
* interpolation failure.
* Do not interpolate other products: SV will not be presented.
*/
continue;
if let Some(profile) = clk
.precise_sv_clock()
.filter_map(|(clk_t, clk_sv, _, profile)| {
if clk_t == *t && clk_sv == *sv {
Some(profile)
} else {
None
}
})
.reduce(|k, _| k)
{
(
profile.bias,
profile.drift.unwrap_or(0.0),
profile.drift_change.unwrap_or(0.0),
)
} else {
/*
* When using high precision products it's better not to attempt
* this in other products, which would mix high and low precision products
* in the solution. We simply abort.
*/
continue;
}
}
//} else {
// if let Some(profile) = clk.precise_sv_clock()
// .filter_map(|(clk_t, clk_sv, _, profile)| {
// if clk_t == *t && clk_sv == *sv {
// Some(profile)
// } else {
// None
// }
// }).reduce(|k, _| k)
// {
// (
// profile.bias,
// profile.drift.unwrap_or(0.0),
// profile.drift_change.unwrap_or(0.0),
// )
// } else {
// /*
// * When using high precision products it's better not to attempt
// * this in other products, which would mix high and low precision products
// * in the solution. We simply abort.
// */
// continue;
// }
//}
} else if sp3_has_clock {
panic!("sp3 (clock) not ready yet: prefer broadcast or clk product");
} else {
Expand Down

0 comments on commit b2a47bd

Please sign in to comment.