Manages requests for earth elevation. More...
Public Member Functions | |
sc_earth_elevation (const char *pathToDemFiles) | |
constructor | |
~sc_earth_elevation () | |
destructor | |
double | elevationForLatLon (double lat, double lon) |
Return an approximate land elevation for the given actual lat & lon (degrees) - return value in km. | |
double | elevationForEFPos (const ml_matrix &efPos, double f=FLATTENING_FACTOR) |
Return an approximate land elevation for the given EF coordinate position - return value in km. | |
bool | hasLandInGridSquare (double lat, double lon, ElevationPrecision gridSize) |
Returns true if there is any land in the grid square containing the lat/lon. | |
Static Public Member Functions | |
static sc_earth_elevation * | default_manager () |
Get a default singleton manager which uses the maps at the default location kDefaultElevationMapsPath. |
sc_earth_elevation manages requests for land elevation at particular lat/lon locations by passing the request to the correct sc_earth_elevation_square. Can also determine if there is land at a particular location.
sc_earth_elevation::sc_earth_elevation | ( | const char * | pathToDemFiles ) |
Constructor.
pathToDemFiles | path where DEM files can be found |
Referenced by default_manager().
sc_earth_elevation::~sc_earth_elevation | ( | ) |
Destructor.
sc_earth_elevation * sc_earth_elevation::default_manager | ( | ) | [static] |
Return the singleton elevation manager object.
References sc_earth_elevation().
Referenced by earth_surface_ef_pos(), and earth_surface_elevation().
double sc_earth_elevation::elevationForLatLon | ( | double | lat, |
double | lon | ||
) |
lat | latitude (degrees -90 to 90) |
lon | longitude (degrees -180 to 180) |
References sc_earth_elevation_square::elevationForLatLon().
Referenced by earth_surface_elevation(), and elevationForEFPos().
double sc_earth_elevation::elevationForEFPos | ( | const ml_matrix & | efPos, |
double | f = FLATTENING_FACTOR |
||
) |
efPos | a 3x1 position in the EF coordinate system (Earth Fixed) |
f | Flattening factor |
References elevationForLatLon().
Referenced by earth_surface_ef_pos(), and earth_surface_elevation().
bool sc_earth_elevation::hasLandInGridSquare | ( | double | lat, |
double | lon, | ||
ElevationPrecision | gridSize | ||
) |
lat | latitude (degrees -90 to 90) |
lon | longitude (degrees -180 to 180) |
gridSize | size of grid square |
References sc_earth_elevation_square::hasLandInGridSquare().