SphericalGreatCircle class

Latitude/longitude points on a spherical model earth, and methods for calculating distances, bearings, destinations, etc on (orthodromic) great-circle paths.

Annotations
  • @immutable

Constructors

SphericalGreatCircle(Geographic position)
Create an object calculating distances, bearings, destinations, etc on (orthodromic) great-circle paths with position as the current position.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
position Geographic
The current geographic position for calculations.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

alongTrackDistanceTo({required Geographic start, required Geographic end, double radius = 6371000.0}) double
Returns how far the current position is along a path from the start point, heading towards the end point.
copyWith({Geographic? position}) SphericalGreatCircle
Copy this geodetic object with an optional position changed.
crossingParallels({required Geographic other, required double latitude}) List<double>?
Returns the pair of meridians at which a great circle defined by two points (the current position and other position) crosses the given latitude.
crossTrackDistanceTo({required Geographic start, required Geographic end, double radius = 6371000.0}) double
Returns (signed) distance from the current position to great circle defined by start and end points.
destinationPoint({required double distance, required double bearing, double radius = 6371000.0}) Geographic
Returns the destination point from the current position having travelled the given distance on the given initial bearing (bearing normally varies around path followed).
distanceTo(Geographic destination, {double radius = 6371000.0}) double
Returns the distance along the surface of the earth from the current position to destination.
finalBearingTo(Geographic destination) double
Returns the final bearing arriving at destination from the current position.
initialBearingTo(Geographic destination) double
Returns the initial bearing from the current position to destination.
intermediatePointTo(Geographic destination, {required double fraction}) Geographic
Returns the intermediate point at the given fraction between the current position and destination.
intersectionWith({required double bearing, required Geographic other, required double otherBearing}) Geographic?
Returns the point of intersection of two paths both defined by a position and a bearing.
maxLatitude({required double bearing}) double
Returns the maximum latitude reached when travelling on a great circle on the given bearing from the current position.
midPointTo(Geographic destination) Geographic
Returns the midpoint between the current position and destination.
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