finalBearing method

double finalBearing(
  1. Coordinate startPoint,
  2. Coordinate endPoint
)

This function returns final bearing arriving at destination point from startPoint; the final bearing will differ from the initial bearing by varying degrees according to distance and latitude

startPoint Initial coordinates endPoint Final coordinates Returns Bearing in degrees from North, 0° ... 360°

Implementation

double finalBearing(Coordinate startPoint, Coordinate endPoint) {
  final bearingValue = bearing(endPoint, startPoint) + 180;
  return bearingValue.wrap360();
}