Skip to content

Commit

Permalink
Merge pull request #347 from nyx-space/gh-346
Browse files Browse the repository at this point in the history
Allow up to 100 ns of leeway on Hermite and Lagrange querying
  • Loading branch information
ChristopherRabotin authored Nov 4, 2024
2 parents 4b0edf3 + a43e1ce commit 2086cc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions anise/src/naif/daf/datatypes/hermite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ impl<'a> NAIFDataSet<'a> for HermiteSetType13<'a> {
// Start by doing a binary search on the epoch registry to limit the search space in the total number of epochs.
// TODO: use the epoch registry to reduce the search space
// Check that we even have interpolation data for that time
if epoch.to_et_seconds() + 1e-9 < self.epoch_data[0]
|| epoch.to_et_seconds() - 1e-9 > *self.epoch_data.last().unwrap()
if epoch.to_et_seconds() < self.epoch_data[0] - 1e-7
|| epoch.to_et_seconds() > *self.epoch_data.last().unwrap() + 1e-7
{
return Err(InterpolationError::NoInterpolationData {
req: epoch,
Expand Down
4 changes: 2 additions & 2 deletions anise/src/naif/daf/datatypes/lagrange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ impl<'a> NAIFDataSet<'a> for LagrangeSetType9<'a> {
// Start by doing a binary search on the epoch registry to limit the search space in the total number of epochs.
// TODO: use the epoch registry to reduce the search space
// Check that we even have interpolation data for that time
if epoch.to_et_seconds() + 1e-9 < self.epoch_data[0]
|| epoch.to_et_seconds() - 1e-9 > *self.epoch_data.last().unwrap()
if epoch.to_et_seconds() < self.epoch_data[0] - 1e-7
|| epoch.to_et_seconds() > *self.epoch_data.last().unwrap() + 1e-7
{
return Err(InterpolationError::NoInterpolationData {
req: epoch,
Expand Down

0 comments on commit 2086cc6

Please sign in to comment.