Skip to main content

Class GeoLocation

Represents a location on the surface of an ideal Earth (latitude and longitude)

Assembly: Meadow.Units.dll
View Source
public record GeoLocation : IEquatable<GeoLocation>

Implements:
System.IEquatable<Meadow.Units.GeoLocation>

Properties

EarthRadius

Idealized earth radius used for internal calculations

View Source
public Length EarthRadius { get; }

Latitude

The latitude portion of the GeoLocation

View Source
public double Latitude { get; set; }

Longitude

The Longitude portion of the GeoLocation

View Source
public double Longitude { get; set; }

Methods

DistanceTo(GeoLocation)

Calculates the distance to another GeoLocation

View Source
[Pure]
public Length DistanceTo(GeoLocation other)
Returns

Meadow.Units.Length

Parameters
TypeName
Meadow.Units.GeoLocationother

BearingTo(GeoLocation)

Calculates the bearing to another GeoLocation

View Source
[Pure]
public Azimuth BearingTo(GeoLocation other)
Returns

Meadow.Units.Azimuth

Parameters
TypeName
Meadow.Units.GeoLocationother

Move(Azimuth, Length)

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

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

Meadow.Units.GeoLocation

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

Implements

  • System.IEquatable<Meadow.Units.GeoLocation>