World Ocean Simulation System (WOSS) library
|
3D-Coordinates (lat, long, depth) class definitions and functions library More...
#include <coordinates-definitions.h>
Classes | |
class | CartCoords |
Class that represents cartesian coordinates. More... | |
Public Types | |
enum | CoordZSpheroidType { COORDZ_SPHERE = 0 , COORDZ_GRS80 , COORDZ_WGS84 } |
Spheroid model to use. More... | |
Public Member Functions | |
CoordZ (double lat=COORD_NOT_SET_VALUE, double lon=COORD_NOT_SET_VALUE, double z=COORD_NOT_SET_VALUE) | |
CoordZ (const Coord &coords, double depth=COORD_NOT_SET_VALUE) | |
CoordZ (const CoordZ ©) | |
void | setDepth (double d) |
double | getDepth () const |
CartCoords | getCartCoords (CoordZSpheroidType type=COORDZ_SPHERE) const |
double | getCartX (CoordZSpheroidType type=COORDZ_SPHERE) const |
double | getCartY (CoordZSpheroidType type=COORDZ_SPHERE) const |
double | getCartZ (CoordZSpheroidType type=COORDZ_SPHERE) const |
double | getSphericalRho () const |
double | getSphericalTheta () const |
double | getSphericalPhi () const |
double | getCartDistance (const CoordZ &coords, CoordZSpheroidType type=COORDZ_SPHERE) const |
double | getCartRelZenith (const CoordZ &coords) const |
double | getCartRelAzimuth (const CoordZ &coords) const |
virtual bool | isValid () const |
CoordZ & | operator= (const CoordZ &coordz) |
friend::std::ostream & | operator<< (::std::ostream &os, const CoordZ &instance) |
Public Member Functions inherited from woss::Coord | |
Coord (double lat=COORD_NOT_SET_VALUE, double lon=COORD_NOT_SET_VALUE) | |
Coord (const Coord ©) | |
void | setLatitude (double lat) |
void | setLongitude (double lon) |
double | getLatitude () const |
double | getLongitude () const |
int | getMarsdenSquare () const |
int | getMarsdenOneDegreeSquare () const |
MarsdenCoord | getMarsdenCoord () const |
double | getInitialBearing (const Coord &destination) const |
double | getFinalBearing (const Coord &destination) const |
double | getGreatCircleDistance (const Coord &destination, double depth=0) const |
Coord & | operator= (const Coord ©) |
friend::std::ostream & | operator<< (::std::ostream &os, const Coord &instance) |
Static Public Member Functions | |
static const CoordZ | getCoordZAlongCartLine (const CoordZ &start, const CoordZ &end, double distance) |
static const CoordZ | getCoordZAlongGreatCircle (const CoordZ &start, const CoordZ &end, double distance) |
static const CoordZ | getCoordZFromCartesianCoords (double x, double y, double z, CoordZSpheroidType type=COORDZ_SPHERE) |
static const CoordZ | getCoordZFromCartesianCoords (const CartCoords &cart_coords) |
static const CoordZ | getCoordZFromSphericalCoords (double rho, double theta, double phi) |
Static Public Member Functions inherited from woss::Coord | |
static const Coord | getCoordFromBearing (const Coord &start_coord, double bearing, double distance, double depth=0.0) |
static const Coord | getCoordAlongGreatCircle (const Coord &start_coord, const Coord &end_coord, double distance, double depth=0.0) |
static const Coord | getCoordFromUtmWgs84 (double easting, double northing, double utm_zone_number, UtmZoneChar utm_zone_char) |
Static Public Attributes | |
static const double | COORDZ_MIN_DEPTH = 0.0 |
Minimum valid depth. | |
Static Public Attributes inherited from woss::Coord | |
static const double | COORD_MIN_LATITUDE = -90.0 |
Minimum valid Latitude. | |
static const double | COORD_MAX_LATITUDE = 90.0 |
Maximum valid Latitude. | |
static const double | COORD_MIN_LONGITUDE = -180.0 |
Minimum valid Longitude. | |
static const double | COORD_MAX_LONGITUDE = 180.0 |
Maximum valid Longitude. | |
static const double | EARTH_RADIUS = 6371000.0 |
Mean earth radius in meters. | |
static const double | EARTH_SEMIMAJOR_AXIS = 6378137.0 |
Earth's semi-major axis in meters as defined by both GRS80 and WGS84. | |
static const double | EARTH_GRS80_POLAR_RADIUS = 6356752.3141 |
Earth's semi-major axis in meters as defined by GRS80. | |
static const double | EARTH_WGS84_POLAR_RADIUS = 6356752.314245 |
Earth's polar radius in meters as defined by WGS84. | |
static const double | EARTH_GRS80_ECCENTRICITY = 0.0818191910428158 |
Earth's first eccentricity as defined by GRS80. | |
static const double | EARTH_WGS84_ECCENTRICITY = 0.0818191908426215 |
Earth's first eccentricity as defined by WGS84. | |
Protected Attributes | |
double | depth |
Protected Attributes inherited from woss::Coord | |
double | latitude |
double | longitude |
int | marsden_square |
int | marsden_one_degree |
Friends | |
const CoordZ | operator+ (const CoordZ &left, const CoordZ &right) |
const CoordZ | operator- (const CoordZ &left, const CoordZ &right) |
CoordZ & | operator+= (CoordZ &left, const CoordZ &right) |
CoordZ & | operator-= (CoordZ &left, const CoordZ &right) |
bool | operator== (const CoordZ &left, const CoordZ &right) |
bool | operator!= (const CoordZ &left, const CoordZ &right) |
bool | operator> (const CoordZ &left, const CoordZ &right) |
bool | operator< (const CoordZ &left, const CoordZ &right) |
bool | operator>= (const CoordZ &left, const CoordZ &right) |
bool | operator<= (const CoordZ &left, const CoordZ &right) |
Additional Inherited Members | |
Protected Member Functions inherited from woss::Coord | |
void | updateMarsdenCoord () |
Static Protected Member Functions inherited from woss::Coord | |
static bool | isValidUtmZoneChar (UtmZoneChar utm_zone_char) |
3D-Coordinates (lat, long, depth) class definitions and functions library
Spheroid model to use.
Spheroid model to use: perfect sphere (COORDZ_SPHERE), Geodetic Reference System 1980 (COORDZ_GRS80), or World Geodetic System 1984 (COORDZ_WGS84)
CoordZ::CoordZ | ( | double | lat = COORD_NOT_SET_VALUE , |
double | lon = COORD_NOT_SET_VALUE , |
||
double | z = COORD_NOT_SET_VALUE |
||
) |
CoordZ constructor.
lat | decimal degree latitude value. Default value makes the instance not valid |
lon | decimal degree longitude value. Default value makes the instance not valid |
z | depth value in meters. Default value makes the instance not valid |
|
explicit |
CoordZ::CoordZ | ( | const CoordZ & | copy | ) |
CoordZ::CartCoords CoordZ::getCartCoords | ( | CoordZSpheroidType | type = COORDZ_SPHERE | ) | const |
Gets cartesian x coordinate
type | Earh Model type |
References depth, woss::Coord::EARTH_GRS80_ECCENTRICITY, woss::Coord::EARTH_RADIUS, woss::Coord::EARTH_SEMIMAJOR_AXIS, woss::Coord::EARTH_WGS84_ECCENTRICITY, woss::Coord::latitude, and woss::Coord::longitude.
Referenced by getCartDistance(), getCartRelAzimuth(), getCartRelZenith(), getCartX(), getCartY(), getCartZ(), and getCoordZAlongCartLine().
double CoordZ::getCartDistance | ( | const CoordZ & | coords, |
CoordZSpheroidType | type = COORDZ_SPHERE |
||
) | const |
Gets the distance from cartesian coordinates approximations
coords | a const reference to a valid CoordZ object |
References getCartCoords(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), woss::CoordZ::CartCoords::getZ(), and isValid().
Referenced by WossMPropagation::computeGain(), getCartRelZenith(), WossMPropagation::getGain(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::Woss::initialize(), woss::Location::isEquivalentTo(), WossWpPosition::isEquivalentTo(), and woss::CoordComparator< CompUser, CoordZ >::operator()().
double CoordZ::getCartRelAzimuth | ( | const CoordZ & | coords | ) | const |
Gets relative azimuth from cartesian coordinates approximations, assuming earth as a sphere of ray = 6371000.0 meters
References getCartCoords(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and isValid().
Referenced by getCoordZAlongCartLine().
double CoordZ::getCartRelZenith | ( | const CoordZ & | coords | ) | const |
Gets relative zenith from cartesian coordinates approximations, assuming earth as a sphere of ray = 6371000.0 meters
References getCartCoords(), getCartDistance(), woss::CoordZ::CartCoords::getZ(), and isValid().
Referenced by getCoordZAlongCartLine().
double CoordZ::getCartX | ( | CoordZSpheroidType | type = COORDZ_SPHERE | ) | const |
Gets cartesian x coordinate
type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getX().
Referenced by woss::Location::getX(), and woss::Transducer::writeVertBeamPattern().
double CoordZ::getCartY | ( | CoordZSpheroidType | type = COORDZ_SPHERE | ) | const |
Gets cartesian y coordinate
type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getY().
Referenced by woss::Location::getY(), and woss::Transducer::writeVertBeamPattern().
double CoordZ::getCartZ | ( | CoordZSpheroidType | type = COORDZ_SPHERE | ) | const |
Gets cartesian z coordinate
type | Earh Model type |
References getCartCoords(), and woss::CoordZ::CartCoords::getZ().
Referenced by woss::Location::getZ(), and woss::Transducer::writeVertBeamPattern().
|
static |
Gets The CoordZ at given distance along the line in cartesian coordinates, assuming earth as a sphere of ray = 6371000.0 meters that ties start and end CoordZ
start | a const reference to a valid CoordZ object |
end | a const reference to a valid CoordZ object |
distance | travel distance in meters |
References depth, woss::Coord::EARTH_RADIUS, getCartCoords(), getCartRelAzimuth(), getCartRelZenith(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and woss::CoordZ::CartCoords::getZ().
|
static |
Gets The CoordZ at given distance along the great circle at starting CoordZ depth. The output depth is calculated uniformly between start and end depth that ties start and end CoordZ
start | a const reference to a valid CoordZ object |
end | a const reference to a valid CoordZ object |
distance | travel distance in meters |
References woss::Coord::getCoordAlongGreatCircle(), getDepth(), and woss::Coord::getGreatCircleDistance().
|
static |
Gets the CoordZ converted from given cartesian coordinates
cart_coords | const reference to a valid CoordZ::CartCoords object |
References getCoordZFromCartesianCoords(), woss::CoordZ::CartCoords::getType(), woss::CoordZ::CartCoords::getX(), woss::CoordZ::CartCoords::getY(), and woss::CoordZ::CartCoords::getZ().
|
static |
Gets the CoordZ converted from given cartesian coordinates
x | x axis |
y | y axis |
z | z axis |
type | Earth model type |
References woss::Coord::EARTH_GRS80_POLAR_RADIUS, woss::Coord::EARTH_RADIUS, woss::Coord::EARTH_SEMIMAJOR_AXIS, woss::Coord::EARTH_WGS84_POLAR_RADIUS, woss::Coord::latitude, and woss::Coord::longitude.
Referenced by getCoordZFromCartesianCoords().
|
static |
Gets the CoordZ converted from given spherical coordinates
rho | radius |
theta | theta angle |
phi | phi angle |
References woss::Coord::EARTH_RADIUS.
|
inline |
Gets depth
References depth.
Referenced by woss::BellhopWoss::checkBoundaries(), woss::BellhopWoss::checkDepthOffsets(), getCoordZAlongGreatCircle(), woss::Location::getDepth(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManager::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::Location::operator<<(), woss::BellhopWoss::writeReceiver(), and woss::BellhopWoss::writeTransmitter().
double CoordZ::getSphericalPhi | ( | ) | const |
Gets spherical phi coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References woss::Coord::longitude.
Referenced by woss::Transducer::writeVertBeamPattern().
double CoordZ::getSphericalRho | ( | ) | const |
Gets spherical rho coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References depth, and woss::Coord::EARTH_RADIUS.
double CoordZ::getSphericalTheta | ( | ) | const |
Gets spherical theta coordinate, assuming earth as a sphere of ray = 6371000.0 meters
References woss::Coord::latitude.
Referenced by woss::Transducer::writeVertBeamPattern().
|
inlinevirtual |
Checks the validity of coordinates and depth provided
Reimplemented from woss::Coord.
References COORDZ_MIN_DEPTH, depth, and woss::Coord::isValid().
Referenced by getCartDistance(), getCartRelAzimuth(), getCartRelZenith(), woss::ACToolboxWoss::initCoordZVector(), woss::Location::isEquivalentTo(), woss::ACToolboxWoss::isValid(), woss::Location::isValid(), woss::operator+=(), woss::operator-=(), and woss::Woss::Woss().
friend::std::ostream & woss::CoordZ::operator<< | ( | ::std::ostream & | os, |
const CoordZ & | instance | ||
) |
<< operator
os | left operand ostream reference |
instance | right operand const CoordZ reference |
Assignment operator
copy | const reference to a CoordZ object to be copied |
References depth, woss::Coord::latitude, woss::Coord::longitude, woss::Coord::marsden_one_degree, and woss::Coord::marsden_square.
|
inline |
Sets depth
d | depth in meters |
References depth.
Referenced by woss::ACToolboxWoss::initCoordZVector(), and woss::Location::setDepth().
Inequality operator
left | left operand const reference |
right | right operand const reference |
Sum operator
left | left operand const reference |
right | right operand const reference |
Compound assignment sum operator
left | left operand reference |
right | right operand const reference |
Subtraction operator
left | left operand const reference |
right | right operand const reference |
Compound assignment subtraction operator
left | left operand reference |
right | right operand const reference |
Less than operator
left | left operand const reference |
right | right operand const reference |
Less than or equal to operator
left | left operand const reference |
right | right operand const reference |
Equality operator
left | left operand const reference |
right | right operand const reference |
Greater than operator
left | left operand const reference |
right | right operand const reference |
Greater than or equal to operator
left | left operand const reference |
right | right operand const reference |
|
protected |
Depth value
Referenced by getCartCoords(), getCoordZAlongCartLine(), getDepth(), getSphericalRho(), isValid(), woss::operator+=(), woss::operator-=(), operator=(), and setDepth().