Skip to content

Commit

Permalink
estimatedTimeOfArrival, timeToGo and eta are calculated incorrectly i…
Browse files Browse the repository at this point in the history
…n eta.js - Issue #133 (#134)

the calculation uses:
distance / (velocityMadeGood * 0.514444) * 1000

this assumes that VMG is in kts when it is (and should be) in m/s.

The 0.514444 should be removed from the calc on line 22
  • Loading branch information
Techstyleuk authored Jul 12, 2024
1 parent 85762e8 commit f49d09f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion calcs/eta.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (app) {

var datems = date.getTime()
var timetopoint = Math.floor(
distance / (velocityMadeGood * 0.514444) * 1000
distance / velocityMadeGood * 1000
)

// app.debug(`Using datetime: ${date} ms to point : ${timetopoint} currentms: ${datems}`)
Expand Down

0 comments on commit f49d09f

Please sign in to comment.