Global

Methods

# greatCircleEndBearing(carto1, carto2) → {number}

Calculates the end bearing of a trajectory that would go from one point to another using the Harvesine formulae.

Parameters:
Name Type Description
carto1 Cesium.Cartographic

The first cartographic coordinate

carto2 Cesium.Cartographic

The second cartographic coordinate

Returns:

The end bearing in radians (0° = North, 90° = East, 270° = West)

Type
number

# greatCircleGroundDistance(carto1, carto2, radius) → {number}

Calculates the ground distance between two geographic coordinates using the Harvesine formulae.

Parameters:
Name Type Description
carto1 Cesium.Cartographic

The first cartographic coordinate.

carto2 Cesium.Cartographic

The second cartographic coordinate.

radius number

The radius in meters (defaults to MEAN_EARTH_RADIUS)

Returns:

The distance in meters

Type
number

# greatCircleInitialBearing(carto1, carto2) → {number}

Calculates the initial bearing to take to navigate from a point to another using the Harvesine formulae.

Parameters:
Name Type Description
carto1 Cesium.Cartographic

The first cartographic coordinate

carto2 Cesium.Cartographic

The second cartographic coordinate

Returns:

The initial bearing in radians (0° = North, 90° = East, 270° = West)

Type
number

# greatCircleTranslate(carto, translation, radius) → {Cesium.Cartographic}

Travels a distance from a given point with a given translation using the Harvesine formulae. The translation is a tuple containing the ground distance as first element and the initial bearing as second element, as returned by the greatCircleTranslation() function.

This function shares the following quasi-equality with greatCircleTranslation():

// given a and b, two Cartographic

greatCircleTranslate(a, greatCircleTranslation(a, b)) ~= b

Parameters:
Name Type Description
carto Cesium.Cartographic

The initial cartographic coordinate

translation Array

The translation to apply. It is a tuple where the first element is the ground distance in meters and the second element is the initial bearing in radians (0° = North, 90° = East, 270° = West)

radius number

The radius in meters (defaults to MEAN_EARTH_RADIUS)

Returns:

The new position

Type
Cesium.Cartographic

# greatCircleTranslation(carto1, carto2, radius) → {Array}

Calculates the translation from one point to another using the Harvesine formulae. The translation is a tuple containing the ground distance as first element and the initial bearing as second element. This function returns the same results than greatCircleDistance() and greatCircleInitialBearing() but requires less computation than calling both functions in succession.

This function shares the following quasi-equality with greatCircleTranslate():

// given a and b, two Cartographic

greatCircleTranslate(a, greatCircleTranslation(a, b)) ~= b

Parameters:
Name Type Description
carto1 Cesium.Cartographic

The first cartographic coordinate.

carto2 Cesium.Cartographic

The second cartographic coordinate.

radius number

The radius in meters (defaults to MEAN_EARTH_RADIUS)

Returns:

A tuple containing the distance in meters between the two points as first element and the initial bearing in radians from first point to second point as second element (0° = North, 90° = East, 270° = West)

Type
Array