Skip to content

Commit

Permalink
Handle drift in variation
Browse files Browse the repository at this point in the history
Test was failing because of change in variation value (mag north drifting). Check now using expectedRange/closeTo with delta.
  • Loading branch information
davidsanner authored Nov 12, 2021
1 parent 7b7bf96 commit a876523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calcs/magneticVariation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = function (app, plugin) {
tests: [
{
input: [{ latitude: 39.0631232, longitude: -76.4872768 }],
expected: [
{ path: 'navigation.magneticVariation', value: -0.19355701404617112 }
expectedRange: [
{ path: 'navigation.magneticVariation', value: -0.19338248112097173, delta: .05 }
]
}
]
Expand Down

0 comments on commit a876523

Please sign in to comment.