Skip to content

Commit 2086cc6

Browse files
Merge pull request #347 from nyx-space/gh-346
Allow up to 100 ns of leeway on Hermite and Lagrange querying
2 parents 4b0edf3 + a43e1ce commit 2086cc6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

anise/src/naif/daf/datatypes/hermite.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ impl<'a> NAIFDataSet<'a> for HermiteSetType13<'a> {
269269
// Start by doing a binary search on the epoch registry to limit the search space in the total number of epochs.
270270
// TODO: use the epoch registry to reduce the search space
271271
// Check that we even have interpolation data for that time
272-
if epoch.to_et_seconds() + 1e-9 < self.epoch_data[0]
273-
|| epoch.to_et_seconds() - 1e-9 > *self.epoch_data.last().unwrap()
272+
if epoch.to_et_seconds() < self.epoch_data[0] - 1e-7
273+
|| epoch.to_et_seconds() > *self.epoch_data.last().unwrap() + 1e-7
274274
{
275275
return Err(InterpolationError::NoInterpolationData {
276276
req: epoch,

anise/src/naif/daf/datatypes/lagrange.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ impl<'a> NAIFDataSet<'a> for LagrangeSetType9<'a> {
215215
// Start by doing a binary search on the epoch registry to limit the search space in the total number of epochs.
216216
// TODO: use the epoch registry to reduce the search space
217217
// Check that we even have interpolation data for that time
218-
if epoch.to_et_seconds() + 1e-9 < self.epoch_data[0]
219-
|| epoch.to_et_seconds() - 1e-9 > *self.epoch_data.last().unwrap()
218+
if epoch.to_et_seconds() < self.epoch_data[0] - 1e-7
219+
|| epoch.to_et_seconds() > *self.epoch_data.last().unwrap() + 1e-7
220220
{
221221
return Err(InterpolationError::NoInterpolationData {
222222
req: epoch,

0 commit comments

Comments
 (0)