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
Parameters
Type | Name |
---|---|
Meadow.Units.GeoLocation | other |
BearingTo(GeoLocation)
Calculates the bearing to another GeoLocation
View Source
[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
[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>