tmm_elev_point_get()
Note: Requires Terrain Modeling Module functionality
Abstract
Returns the height of the terrain at a specified position.
Syntax
tmm_elev_point_get (latitude, longitude)
| Argument | Type | Description |
|---|---|---|
latitude |
float |
the latitude of the position, in degrees |
longitude |
float |
the longitude of the position, in degrees |
Return Value
terrain_height
The height of the terrain at the specified position, in meters above sea level. If the height cannot be obtained, returns one of the constants in Table 88 “TMM Elevation Data Status Symbolic Constants“ on page 27.
Header
tmm.h
Example
terrain_height = tmm_elev_point_get (tx_lat, tx_long);
if (terrain_height == TMMC_ELEV_UNKNOWN)
{
terrain_height = 0.0;
}
if (terrain_height == TMMC_ELEV_DATA_MISSING)
{
terrain_height = 0.0;
}
total_height = terrain_height + tx_alt;
Details
None.
Purpose
This function is used to get the height of the terrain at a specified latitude and longitude.
Errors
- The terrain data directory (
<name>) is invalid. Unable to open terrain file.
Reference
- Use the function tmm_elev_profile_get() to obtain terrain heights at specified intervals along a path.
- Use the function tmm_elev_profile_destroy() to destroy the profile data array.