Skip to main content

Class GeoLocationExtensions

Extension methods for the GeoLocation struct

Assembly: Meadow.Units.dll
View Source
Declaration
public static class GeoLocationExtensions

Methods

DistanceTo(GeoLocation, GeoLocation)

Calculates the distance to another GeoLocation

View Source
Declaration
[Pure]
public static Length DistanceTo(this GeoLocation self, GeoLocation other)
Returns

Meadow.Units.Length

Parameters
TypeNameDescription
Meadow.Units.GeoLocationselfA Geolocation
Meadow.Units.GeoLocationotherA second GeoLocation

BearingTo(GeoLocation, GeoLocation)

Calculates the bearing to another GeoLocation

View Source
Declaration
[Pure]
public static Azimuth BearingTo(this GeoLocation self, GeoLocation other)
Returns

Meadow.Units.Azimuth

Parameters
TypeNameDescription
Meadow.Units.GeoLocationselfA Geolocation
Meadow.Units.GeoLocationotherA second GeoLocation

Move(GeoLocation, Azimuth, Length)

Creates a new GeoLocation a given bearing and distance from the current GeoLocation

View Source
Declaration
[Pure]
public static GeoLocation Move(this GeoLocation self, Azimuth bearing, Length distance)
Returns

Meadow.Units.GeoLocation

Parameters
TypeNameDescription
Meadow.Units.GeoLocationselfA Geolocation
Meadow.Units.AzimuthbearingBearing angle to the new location
Meadow.Units.LengthdistanceDistance to the new location