tripkit-android / com.skedgo.tripkit.common.util / SphericalUtil

SphericalUtil

open class SphericalUtil

Functions

Name Summary
computeArea Returns the area of a closed path on Earth.open static fun computeArea(path:MutableList<TripKitLatLng!>!):Double
computeDistanceBetween Returns the distance between two TripKitLatLngs, in meters.open static fun computeDistanceBetween(from:TripKitLatLng!, to:TripKitLatLng!):Double
computeHeading Returns the heading from one TripKitLatLng to another TripKitLatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).open static fun computeHeading(from:TripKitLatLng!, to:TripKitLatLng!):Double
computeLength Returns the length of the given path, in meters, on Earth.open static fun computeLength(path:MutableList<TripKitLatLng!>!):Double
computeOffset Returns the TripKitLatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).open static fun computeOffset(from:TripKitLatLng!, distance:Double, heading:Double):TripKitLatLng!
computeOffsetOrigin Returns the location of origin when provided with a TripKitLatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.open static fun computeOffsetOrigin(to:TripKitLatLng!, distance:Double, heading:Double):TripKitLatLng!
computeSignedArea Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. "inside" is the surface that does not contain the South Pole.open static fun computeSignedArea(path:MutableList<TripKitLatLng!>!):Double
interpolate Returns the TripKitLatLng which lies the given fraction of the way between the origin TripKitLatLng and the destination TripKitLatLng.open static fun interpolate(from:TripKitLatLng!, to:TripKitLatLng!, fraction:Double):TripKitLatLng!