maxLatitude method
This function returns maximum latitude reached when travelling on a great circle on given bearing from startPoint point (‘Clairaut’s formula’). Negate the result for the minimum latitude (in the southern hemisphere).
The maximum latitude is independent of longitude; it will be the same for all points on a given latitude.
startPoint
Initial coordinates
bearing
Bearing
Returns Destination coordinates
final istCoordinates = Coordinate(41.28111111, 28.75333333); // The coordinates of Istanbul Airport
final bearingFromIstanbulToWest = 270.0;
final maxLatitude = greatCircle.maxLatitude(istCoordinates, bearingFromIstanbulToWest);
Implementation
double maxLatitude(
{required Coordinate startPoint, required double bearing}) {
return acos(sin(bearing.toRadians()) * cos(startPoint.latitude.toRadians()))
.toDegrees();
}