geodesy icon indicating copy to clipboard operation
geodesy copied to clipboard

how can i verify the destination point is right?

Open linxiaowu66 opened this issue 2 years ago • 0 comments

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 ?

linxiaowu66 avatar Jul 27 '23 02:07 linxiaowu66