geodesy
geodesy copied to clipboard
how can i verify the destination point is right?
Hi, I use this repo to calculate the destination point, the process as follow:
const distance = new LatLon(122.028758, 29.789461)
.distanceTo(new LatLon(122.011392, 29.7752625))
.toFixed() // >> print the 2105 m, this is right
// then i cal the initialBearing
const bearing = new LatLon(122.028758, 29.789461)
.initialBearingTo(new LatLon(122.011392, 29.7752625))
.toFixed(1) // >> it print the 336.6 degree, but i can not verify it
// than i use the destination method to prove the above two method result is right ?
const destPoint = new LatLon(122.028758, 29.789461)
.destinationPoint(distance, bearing)
.toString()
// it print the '57.9713°N, 029.7895°E', but this result it not equal the `122.011392, 29.7752625`
so something i went wrong ?