![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cGeospatial.h>
Public Types | |
typedef cVecT2< double > | VEC_t |
Static Public Member Functions | |
static double GRAYCALL | GetDistMeters (const cGeoPos &p1, const cGeoPos &p2) |
static cGeoPos GRAYCALL | AddDistMeters (const cGeoPos &p1, double dx, double dy) |
![]() | |
static bool | isNumSigned () noexcept |
Static Public Attributes | |
static const double | k_EarthRadiusMeters = 6371000.0 |
= 6371000.0; More... | |
static const double | k_SunDia = 0.53 |
= 0.53; // Sun radius degrees. (for daylight time) More... | |
static const double | k_AirRefr = 34.0 / 60.0 |
= 34.0 / 60.0; // atmospheric refraction degrees (for daylight time) More... | |
![]() | |
static const double | k_MinPos |
The min value that is positive and > 0. AKA FLT_MIN and DBL_MIN. More... | |
static const double | k_MaxSqrt |
The square root of <= k_Max. Not Max+1. More... | |
static const double | k_Epsilon |
smallest positive value such that (1.0+FLT_EPSILON != 1.0) More... | |
static const double | k_PI |
PI as a float or double. like M_PI, D3DX_PI. More... | |
static const double | k_PI2 |
PI times 2. M_PI. More... | |
static const double | k_PIHalf |
Half PI. More... | |
static const double | k_e |
M_E = 2.718281828... More... | |
static const double | k_Log2e |
M_LOG2E = log2(e) = 1/ln(2) More... | |
static const double | k_Log10e |
M_LOG10E = log10(e) = 1/ln(10) More... | |
static const double | k_Ln2 |
M_LN2 = ln(2) = 1/log2(e) More... | |
static const double | k_Ln10 |
M_LN10 = ln(10) = 1/log10(e) More... | |
![]() | |
static const double | k_Min |
Min value TYPE can represent. negative if signed type. NOT EPSILON (near zero). e.g. INT_MIN, -FLT_MAX. More... | |
static const double | k_Max |
Max positive value. Can equal this value. inclusive. AKA INT_MAX, FLT_MAX, DBL_MAX. More... | |
static const BYTE | k_TypeFlags |
CTYPE_FLAG_TYPE_ = float, signed, etc ? More... | |
Additional Inherited Members | |
![]() | |
const float | k_MinPos |
const double | k_MinPos |
const float | k_MaxSqrt |
const double | k_MaxSqrt |
const float | k_Epsilon |
const double | k_Epsilon |
const float | k_PI |
const double | k_PI |
const float | k_PI2 |
const double | k_PI2 |
const float | k_PIHalf |
const double | k_PIHalf |
const float | k_e |
const double | k_e |
const float | k_Log2e |
const double | k_Log2e |
const float | k_Log10e |
const double | k_Log10e |
const float | k_Ln2 |
const double | k_Ln2 |
const float | k_Ln10 |
const double | k_Ln10 |
Calculate position on Earth.
typedef cVecT2<double> GrayLib::cGeospatial::VEC_t |
|
static |
Calculate new position after adding meters. As long as dx and dy are small compared to the radius of the earth and you don't get too close to the poles. Latitude: 1 deg = 110.574 km Longitude : 1 deg = 111.320*cos(latitude) km
|
static |
Returns the distance between two points on the Earth. (in Meters) Convert spherical units lat/long to distance in Meters. http://www.nhc.noaa.gov/gccalc.shtml Direct translation from http://en.wikipedia.org/wiki/Haversine_formula
|
static |
= 34.0 / 60.0; // atmospheric refraction degrees (for daylight time)
|
static |
= 6371000.0;
|
static |
= 0.53; // Sun radius degrees. (for daylight time)