I am writing a javascript program which requires calculation of a terminal lat/lng coordinate given:
- source lat/lng coordinates
- bearing
- direction
signature required:
const getTerminalCoords(startCoords, bearing, distance) = () => {
// mapping here
}
I have found lots of solutions in other languages even some using third party libraries but nothing cleanly using pure Javascript Math functions.
Any help or advice much appreciated.
You could try the very useful geolib.computeDestinationPoint, this will give you a destination point, given a bearing and distance: