GreatCircle class

A great circle, also known as an orthodrome, of a sphere is the intersection of the sphere and a plane that passes through the center point of the sphere. A great circle is the largest circle that can be drawn on any given sphere. (Wikipedia) This library contains functions about great circle for calculation, bearings, distances or midpoints. All these functions are taken from Chris Veness(https://github.com/chrisveness)'s amazing work Geodesy Functions(https://github.com/chrisveness/geodesy) and ported to Kotlin. Some of comments are copied from original library

Constructors

GreatCircle()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

alongTrackDistanceTo({required Coordinate currentPoint, required Coordinate startPoint, required Coordinate endPoint}) double
This function returns how far currentPoint is along a path from from startPoint, heading towards endPoint. That is, if a perpendicular is drawn from currentPoint point to the (great circle) path, the along-track distance is the distance from the start point to where the perpendicular crosses the path.
bearing(Coordinate startPoint, Coordinate endPoint) double
This function is for the initial bearing (sometimes referred to as forward azimuth) which if followed in a straight line along a great-circle arc will take you from the start point to the end point
crossingParallels({required Coordinate startPoint, required Coordinate endPoint, required double latitude}) List<double>
This function returns the pair of meridians at which a great circle defined by two points crosses the given latitude. If the great circle doesn't reach the given latitude, empty list is returned.
crossTrackDistance({required Coordinate currentPoint, required Coordinate startPoint, required Coordinate endPoint}) double
This function returns distance from currentPoint to great circle between startPoint and endPoint
destination({required Coordinate startPoint, required double bearing, required double distance}) Coordinate
This function calculates the destination point and final bearing travelling along a (shortest distance) great circle arc for a given start point, initial bearing and distance
distance(Coordinate startPoint, Coordinate endPoint) double
Haversine formula. Giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical "triangles".
distanceInNm(Coordinate startPoint, Coordinate endPoint) double
Haversine formula. Giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical "triangles".
finalBearing(Coordinate startPoint, Coordinate endPoint) double
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
intermediate({required Coordinate startPoint, required Coordinate endPoint, required double fraction}) Coordinate
This function returns the point at given fraction between startPoint and endPoint
intersection({required Coordinate firstPoint, required double firstBearing, required Coordinate secondPoint, required double secondBearing}) Coordinate?
This function returns the point of intersection of two paths which one starts from firstPoint with firstBearing and the other one starts from secondPoint with secondBearing
maxLatitude({required Coordinate startPoint, required double bearing}) double
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).
midpoint(Coordinate startPoint, Coordinate endPoint) Coordinate
This function calculates the midpoint between startPoint and endPoint
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited