STK ObjectsSend comments on this topic.
ComputeSurfaceDistance Method (IAgStkCentralBodyEllipsoid)
See Also
StartLat
StartLon
EndLat
EndLon
Windows





Windows & Linux

Description

Computes the distance between two points on the surface of the central body. Distance is measured along a great arc path.

Syntax

[Visual Basic .NET]
Public Function ComputeSurfaceDistance( _
    ByVal StartLat As System.Object, _
    ByVal StartLon As System.Object, _
    ByVal EndLat As System.Object, _
    ByVal EndLon As System.Object _
) As Double
[C#]
public double ComputeSurfaceDistance(
    System.Object StartLat,
    System.Object StartLon,
    System.Object EndLat,
    System.Object EndLon
);
[Managed C++]
public: double ComputeSurfaceDistance(
    VARIANT StartLat,
    VARIANT StartLon,
    VARIANT EndLat,
    VARIANT EndLon
);
[Unmanaged C++]
public: HRESULT ComputeSurfaceDistance(
    VARIANT StartLat,
    VARIANT StartLon,
    VARIANT EndLat,
    VARIANT EndLon,
    double * pRetVal
);
[Java]
public double computeSurfaceDistance(
    AgVariant StartLat,
    AgVariant StartLon,
    AgVariant EndLat,
    AgVariant EndLon
);
[Python - STK API ]
def ComputeSurfaceDistance(self, StartLat:typing.Any, StartLon:typing.Any, EndLat:typing.Any, EndLon:typing.Any) -> float:

Parameters

StartLat
StartLon
EndLat
EndLon

See Also

Example

Computes the distance between two locations.
[C#]
IAgStkCentralBodyEllipsoid centralBodyEllipsoid = root.CentralBodies["Earth"].Ellipsoid;

// Compute the distance between Philadelphia and London.
// The code snippet assumes the latitude and longitude unit preference is set to degrees.
double distance = centralBodyEllipsoid.ComputeSurfaceDistance(40.0068, -75.1347, 51.4879, -0.1780);
Console.WriteLine("The distance between Philadelphia and London is: {0}", distance);
Computes the distance between two locations.
[Visual Basic .NET]
Dim centralBodyEllipsoid As IAgStkCentralBodyEllipsoid = root.CentralBodies("Earth").Ellipsoid

' Compute the distance between Philadelphia and London.
' The code snippet assumes the latitude and longitude unit preference is set to degrees.
Dim distance As Double = centralBodyEllipsoid.ComputeSurfaceDistance(40.0068, -75.1347, 51.4879, -0.178)
Console.WriteLine("The distance between Philadelphia and London is: {0}", distance)
© 2024 Analytical Graphics, Inc. All Rights Reserved.