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.new(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 setteroverride
- 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 thestart
point, heading towards theend
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
andother
position) crosses the givenlatitude
. -
crossTrackDistanceTo(
{required Geographic start, required Geographic end, double radius = 6371000.0}) → double -
Returns (signed) distance from the current
position
to great circle defined bystart
andend
points. -
destinationPoint(
{required double distance, required double bearing, double radius = 6371000.0}) → Geographic -
Returns the destination point from the current
position
having travelled the givendistance
on the given initialbearing
(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
todestination
. -
finalBearingTo(
Geographic destination) → double -
Returns the final bearing arriving at
destination
from the currentposition
. -
initialBearingTo(
Geographic destination) → double -
Returns the initial bearing from the current
position
todestination
. -
intermediatePointTo(
Geographic destination, {required double fraction}) → Geographic -
Returns the intermediate point at the given fraction between the current
position
anddestination
. -
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 currentposition
. -
midPointTo(
Geographic destination) → Geographic -
Returns the midpoint between the current
position
anddestination
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override