OmniSciDB
a5dc49c757
|
Go to the source code of this file.
Functions | |
EXTENSION_NOINLINE double | _posAngleRads (double rads) |
EXTENSION_INLINE double H3_EXPORT() | degsToRads (double degrees) |
converts degrees to radians More... | |
EXTENSION_INLINE double H3_EXPORT() | radsToDegs (double radians) |
converts radians to degrees More... | |
EXTENSION_INLINE double | constrainLng (double lng) |
EXTENSION_NOINLINE double | _geoAzimuthRads (const GeoCoord(p1), const GeoCoord(p2)) |
EXTENSION_NOINLINE bool | _geoAzDistanceRads (const GeoCoord(p1), double az, double distance, GeoCoord(p2)) |
EXTENSION_NOINLINE bool _geoAzDistanceRads | ( | const | GeoCoordp1, |
double | az, | ||
double | distance, | ||
GeoCoord(p2) | |||
) |
Computes the point on the sphere a specified azimuth and distance from another point.
p1 | The first spherical coordinates. |
az | The desired azimuth from p1. |
distance | The desired distance from p1, must be non-negative. |
p2 | The spherical coordinates at the desired azimuth and distance from p1. |
Definition at line 204 of file geoCoord.hpp.
References _posAngleRads(), constrainLng(), EPSILON, GeoCoordCopy, LAT_INDEX, LON_INDEX, M_PI, and M_PI_2.
Referenced by _hex2dToGeo().
EXTENSION_NOINLINE double _geoAzimuthRads | ( | const | GeoCoordp1, |
const | GeoCoordp2 | ||
) |
The great circle distance in radians between two spherical coordinates.
This function uses the Haversine formula. For math details, see: https://en.wikipedia.org/wiki/Haversine_formula https://www.movable-type.co.uk/scripts/latlong.html
a | the first lat/lng pair (in radians) |
b | the second lat/lng pair (in radians) |
p1 | The first spherical coordinates. |
p2 | The second spherical coordinates. |
Definition at line 187 of file geoCoord.hpp.
References LAT_INDEX, and LON_INDEX.
Referenced by _geoToHex2d().
EXTENSION_NOINLINE double _posAngleRads | ( | double | rads | ) |
Normalizes radians to a value between 0.0 and two PI.
rads | The input radians value. |
Definition at line 35 of file geoCoord.hpp.
References M_2PI.
Referenced by _geoAzDistanceRads(), _geoToHex2d(), and _hex2dToGeo().
EXTENSION_INLINE double constrainLng | ( | double | lng | ) |
constrainLat makes sure latitudes are in the proper bounds
lat | The original lat value |
lng | The origin lng value |
Definition at line 134 of file geoCoord.hpp.
References M_PI.
Referenced by _geoAzDistanceRads().