/tripkit/CommonCoreLegacy/com.skedgo.tripkit.common.util/SphericalUtil

SphericalUtil

\ open class SphericalUtil

Functions

Name Summary
computeAngleBetween open fun computeAngleBetween(fromLatitude: Double, fromLongitude: Double, toLatitude: Double, toLongitude: Double): Double
computeArea open fun computeArea(path: List<TripKitLatLng>): Double
Returns the area of a closed path on Earth.
computeDistanceBetween open fun computeDistanceBetween(from: TripKitLatLng, to: TripKitLatLng): Double
Returns the distance between two TripKitLatLngs, in meters.
open fun computeDistanceBetween(fromLatitude: Double, fromLongitude: Double, toLatitude: Double, toLongitude: Double): Double
computeHeading open fun computeHeading(from: TripKitLatLng, to: TripKitLatLng): Double
Returns the heading from one TripKitLatLng to another TripKitLatLng.
computeLength open fun computeLength(path: List<TripKitLatLng>): Double
Returns the length of the given path, in meters, on Earth.
computeOffset open fun computeOffset(from: TripKitLatLng, distance: Double, heading: Double): TripKitLatLng
Returns the TripKitLatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).
computeOffsetOrigin open fun computeOffsetOrigin(to: TripKitLatLng, distance: Double, heading: Double): TripKitLatLng
Returns the location of origin when provided with a TripKitLatLng destination, meters travelled and original heading.
computeSignedArea open fun computeSignedArea(path: List<TripKitLatLng>): Double
Returns the signed area of a closed path on Earth.
interpolate open fun interpolate(from: TripKitLatLng, to: TripKitLatLng, fraction: Double): TripKitLatLng
Returns the TripKitLatLng which lies the given fraction of the way between the origin TripKitLatLng and the destination TripKitLatLng.