GM_CalcBearing |
Calculates the bearing in radians between two points.
GM_Error_t32 GM_CalcBearing ( double aFromX, // IN: start X/longitude coordinate double aFromY, // IN: start Y/latitude coordinate double aToX, // IN: stop X/longitude coordinate double aToY, // IN: stop Y/latitude coordinate boolean aLatLon, // IN: TRUE - coordinates are lat/lon, FALSE - coordinates are in the current projection? double* aBearing // OUT: bearing in radians between the 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.
Copyright © 2020 Blue Marble Geographics. All Rights Reserved