globalmapper.CalcBearing

globalmapper.CalcBearing(float aFromX, float aFromY, float aToX, float aToY, GM_CalcBearingFlags_t8 aFlags) GM_Error_t32, float[source]

Calculates the bearing in radians between two points. The points can either be specified as lat/lon values or in the current projection. The bearing retrieved is a cartographic bearing, with 0 being north, PI / 2 being east, PI being south, and 3 * PI / 2 being west.

Parameters
  • aFromX (float) – start X/longitude coordinate

  • aFromY (float) – start Y/latitude coordinate

  • aToX (float) – stop X/longitude coordinate

  • aToY (float) – stop Y/latitude coordinate

  • aFlags (GM_CalcBearingFlags_t8) – flags controlling coordinate projection and returned bearing sense

Returns

Error Code

Return type

GM_Error_t32

Returns

Bearing in radians between the points

Return type

float