This class performs conversions between several different coordinate systems.
More...
Inherits sza::util::Vector< type >.
|
void | add (double up, double east, double north) |
| Increment the LLA of this object by the specified UEN offset. More...
|
|
double & | altitude () |
|
| Coordinates () |
| Constructor. More...
|
|
| Coordinates (Angle longitude, Angle latitude, double altitude) |
| Constructor with initialization of LLA. More...
|
|
| Coordinates (Coordinates &coord) |
| Copy constructor. More...
|
|
Vector< double > | getAbsXyz (double east=0.0, double north=0.0, double up=0.0) |
| Return absolute XYZ coordinates of the given UEN point, relative to the LLA point of this object. More...
|
|
Vector< Angle > | getAzEl (Angle longitude, Angle latitude, double altitude) |
| Given a LLA coordinate, return its Az, El relative to the position of this object. More...
|
|
Vector< Angle > | getAzEl (Coordinates &coords) |
|
Vector< double > | getLla (double east=0.0, double north=0.0, double up=0.0) |
| Return LLA of the passed UEN offset point, relative to the LLA coordinates stored in this object. More...
|
|
Vector< double > | getUen (Angle longitude, Angle latitude, double altitude) |
| Return UEN coordinates of the specified LLA point, relative to the coordinates stored in this object. More...
|
|
Vector< double > | getUen (Coordinates &coords) |
|
Vector< double > | getUvw (HourAngle ha, DecAngle declination) |
| Return the UVW coordinates for the current LLA location, of a source at the requested declination and hour angle. More...
|
|
Vector< double > | getXyz (double east=0.0, double north=0.0, double up=0.0, bool geocentric=true) |
| Return XYZ coordinates of the given UEN point, relative to the LLA point of this object. More...
|
|
Angle & | latitude () |
|
Angle & | longitude () |
| Position return methods. More...
|
|
void | setAltitude (double altitude) |
| Set just the altitude. More...
|
|
void | setLatitude (Angle latitude) |
| Set just the latitude. More...
|
|
void | setLla (Angle longitude, Angle latitude, double altitude) |
| Set methods. More...
|
|
void | setLongitude (Angle longitude) |
| Set just the longitude. More...
|
|
virtual | ~Coordinates () |
| Destructor. More...
|
|
void | add (Vector< type > vec) |
|
double | magnitude () |
| Get the magnitude of a vector. More...
|
|
const type | operator* (const Vector< type > &vec) |
| Assignment void operator=(const Vector<type>& vec);. More...
|
|
const Vector< double > | operator* (double factor) |
| ...................................................................... More...
|
|
const Vector< type > | operator+ (const Vector< type > &vec) |
| Vector addition. More...
|
|
const Vector< type > | operator+ (const type offset) |
| ...................................................................... More...
|
|
const Vector< type > | operator- (const Vector< type > &vec) |
| ...................................................................... More...
|
|
const Vector< type > | operator- (const type offset) |
| ...................................................................... More...
|
|
const Vector< double > | operator/ (const type factor) |
| ...................................................................... More...
|
|
type & | operator[] (unsigned i) |
| Define an operator for accessing elements of the vector. More...
|
|
void | push_back (type el) |
|
void | resize (unsigned n) |
| Private resize operator. More...
|
|
unsigned | size () |
| Query the size of the vector. More...
|
|
| Vector (unsigned n) |
| Constructor. More...
|
|
| Vector (type el0, type el1, type el2) |
| Constructor. More...
|
|
| Vector (const Vector< type > &vec) |
| Copy constructor. More...
|
|
| Vector () |
| Private constructor with no arguments. More...
|
|
virtual | ~Vector () |
| Destructor. More...
|
|
|
static Vector< double > | absXyzAndUenToLla (double XA, double YA, double ZA, double up=0.0, double east=0.0, double north=0.0) |
| Return the LLA of the point given by the specified absolute XYZ and UEN offset. More...
|
|
static Vector< double > | absXyzToLla (double XA, double YA, double ZA) |
| Given absolute XYZ, convert to LLA. More...
|
|
static Vector< double > | azElToUen (Angle az, Angle el, double r=1.0) |
| Given Azimuth and Elevation, return the UEN coordinates. More...
|
|
static Vector< double > | dHaDdecToXyz (HourAngle dHa, Angle dDec) |
| Return the (X, Y, Z) coordinates of the specified (Ha, Dec) coordinate. More...
|
|
static Vector< double > | getd2Uvw (HourAngle ha, DecAngle declination, double X, double Y, double Z) |
| Second derivatives of the UVW coordinates wrt time. More...
|
|
static Vector< double > | getdUvw (HourAngle ha, DecAngle declination, double X, double Y, double Z) |
| First derivatives of the UVW coordinates wrt time. More...
|
|
static Delay | getGeometricDelay (HourAngle ha, DecAngle declination, double X, double Y, double Z, double X0, double Y0, double Z0, bool doMotionCorrection) |
| Get the delay for the Ha and Dec of a source, given XYZ coordinates of a baseline. More...
|
|
static Delay | getGeometricDelay (Angle latitude, Angle az, Angle el, double X, double Y, double Z) |
| Calculate the delay, in NanoSeconds, for the specified XYZ point, for a source direction given by az/el. More...
|
|
static Matrix< double > | getThetaRhoToXyzDecRot (Declination &dec) |
|
static Matrix< double > | getThetaRhoToXyzRhoRot (Angle &rho) |
|
static Matrix< double > | getThetaRhoToXyzThetaRot (Angle &theta) |
|
static Vector< double > | haDecAndXyzToUvw (HourAngle ha, DecAngle declination, double X, double Y, double Z) |
| Return the UVW coordinates, relative to a given XYZ coordinate, for the requested source position. More...
|
|
static Vector< double > | haDecToXyz (HourAngle ha, DecAngle declination, bool geocentric=true, SrcDist type=INF, double r=0.0) |
| Return the XYZ coordinate of a vector at requested (Ha, Dec) direction and of length r. More...
|
|
static Vector< Angle > | laAndHaDecToAzEl (Angle latitude, double altitude, HourAngle ha, DecAngle declination, bool geocentric=true, SrcDist type=INF, double dist=1.0) |
| Return the Az El of a source at a given HA and Dec. More...
|
|
static Vector< double > | laAndUenToXyz (Angle latitude, double altitude, double up=0.0, double east=0.0, double north=0.0, bool geocentric=true) |
| Return the XYZ coordinates of an UEN point relative to a fiducial LA. More...
|
|
static Vector< double > | llaAndLlaToUen (Angle fiducialLongitude, Angle fiducialLatitude, double fiducialAltitude, Angle longitude, Angle latitude, double altitude) |
| Return the UEN of an LLA point relative to a fiducial LLA point. More...
|
|
static Vector< double > | llaAndUenToAbsXyz (Angle longitude, Angle latitude, double altitude, double up, double east, double north, bool doTrans=true) |
| Return absolute XYZ of the point offset by UEN from a given LLA point. More...
|
|
static Vector< double > | llaAndUenToLla (Angle longitude, Angle latitude, double altitude, double up, double east, double north) |
| Return the LLA of the point given by an UEN offset relative to a fiducial LLA. More...
|
|
static Vector< double > | lngLatAndAzElToLngLat (Angle &lng, Angle &lat, Angle &az, Angle &el) |
| Return the LL of the point given by an az/el offset relative to a fiducial LL. More...
|
|
static void | raDecAndThetaRhoToRaDec (HourAngle &ra0, Declination &dec0, Angle &theta, Angle &rho, HourAngle &ra, Declination &dec) |
| ...................................................................... More...
|
|
static Vector< double > | thetaRhoToXyz (Declination &dec, Angle &theta, Angle &rho) |
|
static Vector< double > | topoXYZToUen (double X, double Y, double Z, Angle latitude) |
| Given a topocentric XYZ, return the UEN coordinates at a given latitude. More...
|
|
static Vector< Angle > | uenToAzEl (double U, double E, double N) |
| Given UEN, return the Azimuth and Elevation. More...
|
|
static Vector< Angle > | uenToAzEl (Vector< double > &uen) |
|
static void | xyzToDhaDdec (double X, double Y, double Z, HourAngle &dHa, Angle &dDec) |
| Return the dHa and dDec corresponding to the specified (X, Y, Z) coordinate. More...
|
|
static void | xyzToDhaDdec (Vector< double > &xyzVals, HourAngle &dHa, Angle &dDec) |
| Return the dHa and dDec corresponding to the specified (X, Y, Z) coordinate. More...
|
|
This class performs conversions between several different coordinate systems.
These are described below.
(L, L, A): The longiude/latitude/altitude coordinate system. I will refer to this in shorthand as LLA, and coordinates as (L, L, A). Longitude increases from 0 at Greenwich, England in an easterly direction, and decreases in a westerly direction. East longitudes are correctly described as positive sexagesimal numbers, typically between 0 and 180 degrees. West longitudes are often confusingly specified as positive numbers between 0 and 180, with a 'W' appended, e.g., +XXX:XX:XX.XX W, or even more confusingly, the W is simply dropped altogether, creating an ambiguity between E and W longitudes. West longitudes should correctly be described as negative numbers between 0 and -180, or equivalently, as positive numbers between 180 and 360. In this document, no distinction is made between E and W longitudes. Where applicable, W longitudes should be passed as negative numbers.
(X, Y, Z): Thompson, Moran and Swenson (Eq. 4.15, 1st ed.) describe a coordinate system for specifying relative antenna locations: they call it (X, Y, Z). In their system, Z lies along the North Celestial Pole, X lies in the plane passing through an arbitrary longitude/latitude point (at 0 Hour Angle), and Y lies at -6h Hour Angle. Thus to convert from a latitude, longitude point to (X, Y, Z), one has only to perform a translation and a latitude rotation. I interpret their XYZ coordinate system to have as its origin the center of the Earth, but there are differing opinions about this. Some think it should be taken to be fixed to the surface at some fiducial point. The two interpretations are simply related by a translation by the radius of the earth, and the difference is irrelevant when dealing with baseline coordinates, since those are always relative.
(U, V, W) : Coordinates tied to the source reference frame (e.g., TMS, section 4.2). These coordinates are simply related to (X, Y, Z) by a rotation of 90-dec about the X axis, followed by a rotation by 90-H about the Z axis, where dec is the source declination and H the hour angle of the source.
(XA, YA, ZA): Same as the (X, Y, Z) system described by TMS, but with X in the plane of the Greenwich meridian, i.e., it is an absolute geocentric coordinate system. getAbsXYZ() takes a longitude, latitude, altitude, and an east, north, up offset relative to that long/lat/alt point, and converts it to an absolute (XA, YA, ZA) vector, in meters. By comparison with XYZ' XYZ coordinate system, to convert from a lat/long/alt point to (XA, YA, ZA), one has to perform a translation, followed by both a longitude rotation and a latitude rotation.
(E, N, U): This coordinate system is useful for specifying locations relative to a given LLA point. Coordinates are in a tangent plane at the specified LLA point, with N pointing due north, E pointing due east, and U pointing straight up along a radial vector from the center of the earth, and passing through the given LLA point. To perform a conversion from UEN to XYZ for example, one has to perform a translation by the Earth's radius, followed by a longitude rotation and a latitude rotation.
This container will natively store coordinates in LLA, hence the constructors which initialize these parameters.
Definition at line 86 of file Coordinates.h.