Inherits Eaagles::Basic::LcComponent.
Inherited by Eaagles::Terrain::DataFile, and Eaagles::Terrain::QuadMap.
Inheritance diagram for Eaagles::Simulation::Terrain:


Public Member Functions | |
| Terrain () | |
| const char * | getFilename () const |
| virtual bool | setFilename (const Basic::LcString *const msg) |
| const char * | getPathname () const |
| virtual bool | setPathname (const Basic::LcString *const msg) |
| LCreal | getMinElevation () const |
| LCreal | getMaxElevation () const |
| double | getLatitudeSW () const |
| double | getLongitudeSW () const |
| double | getLatitudeNE () const |
| double | getLongitudeNE () const |
| virtual bool | isDataLoaded () const=0 |
| virtual unsigned int | getElevations (LCreal *const elevations, bool *const validFlags, const unsigned int n, const double lat, const double lon, const LCreal direction, const LCreal maxRng, const bool interp=false) const =0 |
| virtual bool | getElevation (LCreal *const elev, const double lat, const double lon, const bool interp=false) const=0 |
| virtual bool | targetOcculting (const double refLat, const double refLon, const LCreal refAlt, const double tgtLat, const double tgtLon, const LCreal tgtAlt) const |
| virtual void | reset () |
Static Public Member Functions | |
| static bool | occultCheck (const LCreal *const elevations, const bool *const validFlags, const unsigned int n, const LCreal range, const LCreal refAlt, const LCreal tgtAlt) |
| static bool | vbwShadowChecker (bool *const maskFlags, const LCreal *const elevations, const bool *const validFlags, const unsigned int n, const LCreal range, const LCreal refAlt, const LCreal beamAngle=0, const LCreal beamWidth=180) |
| static bool | aac (LCreal *const aacData, const LCreal *const elevData, const bool *const maskFlags, const unsigned int n, const LCreal range, const LCreal refAlt) |
| static bool | getElevationColor (const LCreal elevation, const LCreal minz, const LCreal maxz, const Basic::LcHsva **colorTable, const unsigned int numColors, osg::Vec3 &rgb) |
Protected Member Functions | |
| virtual void | clearData ()=0 |
| virtual bool | setMinElevation (const LCreal v) |
| virtual bool | setMaxElevation (const LCreal v) |
| virtual bool | setLatitudeSW (const double v) |
| virtual bool | setLongitudeSW (const double v) |
| virtual bool | setLatitudeNE (const double v) |
| virtual bool | setLongitudeNE (const double v) |
Private Member Functions | |
| virtual bool | loadData ()=0 |
Private Attributes | |
| const Basic::LcString * | path |
| const Basic::LcString * | file |
| double | neLat |
| double | neLon |
| double | swLat |
| double | swLon |
| LCreal | minElev |
| LCreal | maxElev |
used by the simulation. Database specific, derived classes will
| Eaagles::Simulation::Terrain::Terrain | ( | ) |
| const char * Eaagles::Simulation::Terrain::getFilename | ( | ) | const |
Returns the name of the datafile.
| bool Eaagles::Simulation::Terrain::setFilename | ( | const Basic::LcString *const | msg | ) | [virtual] |
Sets the name of the datafile.
| const char * Eaagles::Simulation::Terrain::getPathname | ( | ) | const |
Returns the path to the datafiles.
| bool Eaagles::Simulation::Terrain::setPathname | ( | const Basic::LcString *const | msg | ) | [virtual] |
Sets the path to the datafiles.
| LCreal Eaagles::Simulation::Terrain::getMinElevation | ( | ) | const [inline] |
Minimum elevation in this database (meters).
| LCreal Eaagles::Simulation::Terrain::getMaxElevation | ( | ) | const [inline] |
Maximum elevation in this database (meters).
| double Eaagles::Simulation::Terrain::getLatitudeSW | ( | ) | const [inline] |
Southwest corner latitude of this database (degs).
| double Eaagles::Simulation::Terrain::getLongitudeSW | ( | ) | const [inline] |
Southwest corner longitude of this database (degs).
| double Eaagles::Simulation::Terrain::getLatitudeNE | ( | ) | const [inline] |
Northeast corner latitude of this database (degs).
| double Eaagles::Simulation::Terrain::getLongitudeNE | ( | ) | const [inline] |
Northeast corner longitude of this database (degs).
| virtual bool Eaagles::Simulation::Terrain::isDataLoaded | ( | ) | const [pure virtual] |
Has the data been loaded.
Implemented in Eaagles::Terrain::DataFile, Eaagles::Terrain::DedFile, and Eaagles::Terrain::QuadMap.
| virtual unsigned int Eaagles::Simulation::Terrain::getElevations | ( | LCreal *const | elevations, | |
| bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const double | lat, | |||
| const double | lon, | |||
| const LCreal | direction, | |||
| const LCreal | maxRng, | |||
| const bool | interp = false | |||
| ) | const [pure virtual] |
Locates an array of (at least two) elevation points (and sets valid flags if found) returns the number of points found within this DataFile
| elevations | The elevation array (meters) |
| validFlags | Valid elevation flag array (true if elevation was found) |
| n | Size of elevation and valdFlags arrays |
| lat | Starting latitude (degs) |
| lon | Starting longitude (degs) |
| direction | True direction (heading) angle of the data (degs) |
| maxRng | Range to last elevation point (meters) |
| interp | Interpolate between elevation posts (default: false) |
Implemented in Eaagles::Terrain::DataFile.
| virtual bool Eaagles::Simulation::Terrain::getElevation | ( | LCreal *const | elev, | |
| const double | lat, | |||
| const double | lon, | |||
| const bool | interp = false | |||
| ) | const [pure virtual] |
Locates an elevation value (meters) for a given reference point and returns it in 'elev'. Function returns true if successfull, otherwise 'elev' is unchanged.
| elev | The elevation value (meters) |
| lat | Reference latitude (degs) |
| lon | Reference longitude (degs) |
| interp | Interpolate between elevation posts (default: false) |
Implemented in Eaagles::Terrain::QuadMap.
| bool Eaagles::Simulation::Terrain::targetOcculting | ( | const double | refLat, | |
| const double | refLon, | |||
| const LCreal | refAlt, | |||
| const double | tgtLat, | |||
| const double | tgtLon, | |||
| const LCreal | tgtAlt | |||
| ) | const [virtual] |
Returns true if a target point is occulted by the terrain as seen from the ref point.
| refLat | Ref latitude (degs) |
| refLon | Ref longitude (degs) |
| refAlt | Ref altitude (meters) |
| tgtLat | Target latitude (degs) |
| tgtLon | Target longitde (degs) |
| tgtAlt | Target altitude (meters) |
| bool Eaagles::Simulation::Terrain::occultCheck | ( | const LCreal *const | elevations, | |
| const bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt, | |||
| const LCreal | tgtAlt | |||
| ) | [static] |
Returns true if a target altitude is occulted by the terrain as seen from the ref altitude.
| elevations | The elevation array (meters) |
| validFlags | (Optional) Valid elevation flag array (true if elevation was found) |
| n | Size of elevation and valdFlags arrays |
| range | Range (meters) |
| refAlt | Ref altitude (meters) |
| tgtAlt | Target altitude (meters) |
| bool Eaagles::Simulation::Terrain::vbwShadowChecker | ( | bool *const | maskFlags, | |
| const LCreal *const | elevations, | |||
| const bool *const | validFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt, | |||
| const LCreal | beamAngle = 0, |
|||
| const LCreal | beamWidth = 180 | |||
| ) | [static] |
Vertical Beam Width and Shadow Check -- Sets an array of mask flags; the flags are set true if the point is masked (in shadow or out of beam) as seen from the refereance altitude over the first point. Returns true if successful
| maskFlags | The array of mask flags |
| elevations | The elevation array (meters) |
| validFlags | (Optional) Valid elevation flag array (true if elevation was found) |
| n | Size of elevation and valdFlags arrays |
| range | Range (meters) |
| refAlt | Ref altitude (meters) |
| beamAngle | (optional) Center beam elevation angle (degs) |
| beamWidth | (optional) Total beam width angle (degs) |
| bool Eaagles::Simulation::Terrain::aac | ( | LCreal *const | aacData, | |
| const LCreal *const | elevData, | |||
| const bool *const | maskFlags, | |||
| const unsigned int | n, | |||
| const LCreal | range, | |||
| const LCreal | refAlt | |||
| ) | [static] |
Compute Aspect Angle Cosines; computes the cosine of the angle inwhich the beam hits the terrain.
| aacData | The array for the aspect angle cosines |
| elevData | The elevation array (meters) |
| maskFlags | (Optional) The array of mask flags |
| n | Size of the arrays |
| range | Range (meters) |
| refAlt | Ref altitude (meters) |
| bool Eaagles::Simulation::Terrain::getElevationColor | ( | const LCreal | elevation, | |
| const LCreal | minz, | |||
| const LCreal | maxz, | |||
| const Basic::LcHsva ** | colorTable, | |||
| const unsigned int | numColors, | |||
| osg::Vec3 & | rgb | |||
| ) | [static] |
Converts an elevation to a color (or gray scale) gray scale (colorScale flag = false): black @ minz; white @ maxz; color scale (colorScale flag = true): blue @ <= minz cyan @ 1/6 of maxz green @ 2/6 of maxz yellow @ 3/6 of maxz red @ 4/6 of maxz megenta @ 5/6 of maxz white @ >= maxz
| elevation | Elevation |
| minz | Min elevation (units: same as elevation) |
| maxz | Max elevtion (units: same as elevation) |
| colorTable | Color table |
| numColors | Number of colors |
| rgb | Color |
| void Eaagles::Simulation::Terrain::reset | ( | ) | [virtual] |
Reinitialize this component to its state at the beginning of the simulation.
Reimplemented from Eaagles::Basic::LcComponent.
Reimplemented in Eaagles::Terrain::QuadMap.
| virtual void Eaagles::Simulation::Terrain::clearData | ( | ) | [protected, pure virtual] |
| bool Eaagles::Simulation::Terrain::setMinElevation | ( | const LCreal | v | ) | [protected, virtual] |
Minimum elevation in this database (meters).
| bool Eaagles::Simulation::Terrain::setMaxElevation | ( | const LCreal | v | ) | [protected, virtual] |
Maximum elevation in this database (meters).
| bool Eaagles::Simulation::Terrain::setLatitudeSW | ( | const double | v | ) | [protected, virtual] |
Southwest corner latitude of this database (degs: +/-90).
| bool Eaagles::Simulation::Terrain::setLongitudeSW | ( | const double | v | ) | [protected, virtual] |
Southwest corner longitude of this database (degs: +/-180).
| bool Eaagles::Simulation::Terrain::setLatitudeNE | ( | const double | v | ) | [protected, virtual] |
Northeast corner latitude of this database (degs: +/-90).
| bool Eaagles::Simulation::Terrain::setLongitudeNE | ( | const double | v | ) | [protected, virtual] |
Northeast corner longitude of this database (degs: +/-180).
| virtual bool Eaagles::Simulation::Terrain::loadData | ( | ) | [private, pure virtual] |
Load the data file.
Implemented in Eaagles::Terrain::DedFile, Eaagles::Terrain::DtedFile, and Eaagles::Terrain::QuadMap.
const Basic::LcString* Eaagles::Simulation::Terrain::path [private] |
Data path name.
const Basic::LcString* Eaagles::Simulation::Terrain::file [private] |
Data file name.
double Eaagles::Simulation::Terrain::neLat [private] |
Northeast lat/lon (degs).
double Eaagles::Simulation::Terrain::neLon [private] |
double Eaagles::Simulation::Terrain::swLat [private] |
Southwest lat/lon (degs).
double Eaagles::Simulation::Terrain::swLon [private] |
LCreal Eaagles::Simulation::Terrain::minElev [private] |
Minimum elevation (m).
LCreal Eaagles::Simulation::Terrain::maxElev [private] |
Maximum elevation (m).
1.5.0