GreatCircle.DistAndDir Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
Returns the distance and direction between two points on the globe
public static void DistAndDir (Iot.Device.Common.GeographicPosition position1, Iot.Device.Common.GeographicPosition position2, out UnitsNet.Length distance, out UnitsNet.Angle direction);
static member DistAndDir : Iot.Device.Common.GeographicPosition * Iot.Device.Common.GeographicPosition * Length * Angle -> unit
Public Shared Sub DistAndDir (position1 As GeographicPosition, position2 As GeographicPosition, ByRef distance As Length, ByRef direction As Angle)
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 |
Returns the distance and direction between two points on the globe
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);
static member DistAndDir : Iot.Device.Common.GeographicPosition * Iot.Device.Common.GeographicPosition * Length * Angle * Angle -> unit
Public Shared Sub DistAndDir (position1 As GeographicPosition, position2 As GeographicPosition, ByRef distance As Length, ByRef directionAtStart As Angle, ByRef directionAtEnd As Angle)
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 |
Returns the distance and direction between two points on the globe
public static void DistAndDir (double latitude1, double longitude1, double latitude2, double longitude2, out double distance, out double direction);
static member DistAndDir : double * double * double * double * double * double -> unit
Public Shared Sub DistAndDir (latitude1 As Double, longitude1 As Double, latitude2 As Double, longitude2 As Double, ByRef distance As Double, ByRef direction As Double)
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 |