GreatCircle.DistAndDir Method

Definition

Overloads

DistAndDir(GeographicPosition, GeographicPosition, Length, Angle)

Returns the distance and direction between two points on the globe

DistAndDir(GeographicPosition, GeographicPosition, Length, Angle, Angle)

Returns the distance and direction between two points on the globe

DistAndDir(Double, Double, Double, Double, Double, Double)

Returns the distance and direction between two points on the globe

DistAndDir(GeographicPosition, GeographicPosition, Length, Angle)

Returns the distance and direction between two points on the globe

C#
public static void DistAndDir (Iot.Device.Common.GeographicPosition position1, Iot.Device.Common.GeographicPosition position2, out UnitsNet.Length distance, out UnitsNet.Angle direction);

Parameters

position1
GeographicPosition

Input position 1

position2
GeographicPosition

Input position 2

distance
UnitsNet.Length

Great circle distance between the positions

direction
UnitsNet.Angle

Initial direction to travel, in degrees true

Exceptions

Either position1 or position2 are null.

Remarks

The distance and direction are calculated for the great circle. That is the shortest distance between two points on the globe. This path does not follow a constant direction (for large distances)

Applies to

.NET IoT Libraries 2.2.0 a .NET IoT Libraries 2.1.0
Produkt Verzie
.NET IoT Libraries 2.1.0, 2.2.0

DistAndDir(GeographicPosition, GeographicPosition, Length, Angle, Angle)

Returns the distance and direction between two points on the globe

C#
public static void DistAndDir (Iot.Device.Common.GeographicPosition position1, Iot.Device.Common.GeographicPosition position2, out UnitsNet.Length distance, out UnitsNet.Angle directionAtStart, out UnitsNet.Angle directionAtEnd);

Parameters

position1
GeographicPosition

Input position 1

position2
GeographicPosition

Input position 2

distance
UnitsNet.Length

Great circle distance between the positions

directionAtStart
UnitsNet.Angle

Initial direction to travel, in degrees true

directionAtEnd
UnitsNet.Angle

Angle in which the voyage should start. True angle in which the direction lies when standing at the start position.

Exceptions

Either position1 or position2 are null.

Remarks

This path does not follow a constant direction (for large distances)

Applies to

.NET IoT Libraries 2.2.0 a .NET IoT Libraries 2.1.0
Produkt Verzie
.NET IoT Libraries 2.1.0, 2.2.0

DistAndDir(Double, Double, Double, Double, Double, Double)

Returns the distance and direction between two points on the globe

C#
public static void DistAndDir (double latitude1, double longitude1, double latitude2, double longitude2, out double distance, out double direction);

Parameters

latitude1
Double

Input latitude 1, in degrees

longitude1
Double

Input longitude 1, in degrees

latitude2
Double

Input latitude 2, in degrees

longitude2
Double

Input longitude 2, in degrees

distance
Double

Distance between points, on the great circle, in meters.

direction
Double

Angle in which the voyage should start. True angle in which the direction lies when standing at the start position.

Remarks

This path does not follow a constant direction (for large distances). Prefer using the method DistAndDir(GeographicPosition, GeographicPosition, Length, Angle) instead, to avoid errors from exchanged parameters or wrong units

Applies to

.NET IoT Libraries 2.2.0 a .NET IoT Libraries 2.1.0
Produkt Verzie
.NET IoT Libraries 2.1.0, 2.2.0