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
Parameters
Type | Name |
---|---|
Meadow.Units.GeoLocation | other |
BearingTo(GeoLocation)
Calculates the bearing to another GeoLocation
View Source
Declaration
[Pure]
public Azimuth BearingTo(GeoLocation other)
Returns
Parameters
Type | Name |
---|---|
Meadow.Units.GeoLocation | other |
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
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Azimuth | bearing | Bearing angle to the new location |
Meadow.Units.Length | distance | Distance to the new location |
Implements
System.IEquatable<Meadow.Units.GeoLocation>