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
Declaration
public record GeoLocation : IEquatable<GeoLocation>

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

Properties

EarthRadius

Idealized earth radius used for internal calculations

View Source
Declaration
public Length EarthRadius { get; }

Latitude

The latitude portion of the GeoLocation

View Source
Declaration
public double Latitude { get; set; }

Longitude

The Longitude portion of the GeoLocation

View Source
Declaration
public double Longitude { get; set; }

Methods

DistanceTo(GeoLocation)

Calculates the distance to another GeoLocation

View Source
Declaration
[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
Declaration
[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
Declaration
[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>