Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.apo.nmsu.edu/Telescopes/coordConv/html/namespacecoord_conv.html
Дата изменения: Thu May 7 21:42:46 2015 Дата индексирования: Sun Apr 10 03:06:08 2016 Кодировка: Поисковые слова: infrared |
lsst.coordConv
unknown
|
Namespaces | |
testUtils | |
version | |
Classes | |
class | Coord |
class | CoordSys |
class | MeanCoordSys |
class | ApparentCoordSys |
class | ICRSCoordSys |
class | FK5CoordSys |
class | FK4CoordSys |
class | GalCoordSys |
class | AppGeoCoordSys |
class | AppTopoCoordSys |
class | ObsCoordSys |
class | OtherCoordSys |
class | NoneCoordSys |
class | PVT |
class | PVTCoord |
class | Site |
Enumerations | |
enum | DateTypeEnum { DateType_Julian, DateType_Besselian, DateType_TAI, DateType_None } |
Functions | |
bool | angSideAng (double &angA, double &sideB, double &angC, double sideA, double angB, double sideC) |
Coord | appGeoFromAppTopo (Coord const &appTopoCoord, Site const &site, double tai) |
Coord | appTopoFromAppGeo (Coord const &appGeoCoord, Site const &site, double tai) |
Coord | appTopoFromObs (Coord const &obsCoord, Site const &site) |
void | azAltFromHADec (Eigen::Vector3d &azAlt, Eigen::Vector3d const &haDec, double lat) |
double | distanceFromParallax (double parallax) |
double | parallaxFromDistance (double dist) |
std::ostream & | operator<< (std::ostream &out, Coord const &coord) |
CoordSys::Ptr | makeCoordSys (std::string const &name, double date) |
std::ostream & | operator<< (std::ostream &out, CoordSys const &coordSys) |
void | haDecFromAzAlt (Eigen::Vector3d &haDec, Eigen::Vector3d const &azAlt, double lat) |
void | rot2D (double &rotX, double &rotY, double x, double y, double ang) |
double | wrapPos (double ang) |
double | wrapCtr (double ang) |
double | wrapNear (double ang, double refAng) |
double | hypot (double x, double y) |
double | sind (double ang) |
sine of angle in degrees More... | |
double | cosd (double ang) |
cosine of angle in degrees More... | |
double | tand (double ang) |
tangent of angle in degrees More... | |
double | asind (double x) |
arcsine in degrees More... | |
double | acosd (double x) |
arccosine in degrees More... | |
double | atand (double x) |
arctangent in degrees More... | |
double | atan2d (double x, double y) |
arctangent2 in degrees More... | |
bool | polarFromXY (double &r, double &theta, double x, double y) |
void | xyFromPolar (double &x, double &y, double r, double theta) |
void | computeRotationMatrix (Eigen::Matrix3d &rotMat, Eigen::Vector3d const &axis, double rotAngle) |
Coord | obsFromAppTopo (Coord const &appTopoCoord, Site const &site) |
bool | polarFromXY (PVT &r, PVT &theta, PVT const &x, PVT const &y, double tai) |
void | xyFromPolar (PVT &x, PVT &y, PVT const &r, PVT const &theta, double tai) |
void | rot2D (PVT &rotX, PVT &rotY, PVT const &x, PVT const &y, double ang, double tai) |
PVT | wrapPos (PVT const &pvt) |
PVT | wrapCtr (PVT const &pvt) |
std::ostream & | operator<< (std::ostream &os, PVT const &pvt) |
std::ostream & | operator<< (std::ostream &os, PVTCoord const &pvtCoord) |
void | rotEqPol (Eigen::Vector3d &toVec, Eigen::Vector3d const &fromVec, double eqAng, double polarAng) |
void | rotXY (Eigen::Vector3d &toVec, Eigen::Vector3d const &fromVec, double xAng, double yAng) |
std::ostream & | operator<< (std::ostream &out, Site const &site) |
double | lastFromTAI (double tai, Site const &site) |
double | julianEpochFromTAI (double mjdSec) |
double | taiFromJulianEpoch (double julianEpoch) |
double | besselianEpochFromTAI (double mjdSec) |
double | taiFromBesselianEpoch (double besselianEpoch) |
Variables | |
const double | MinParallax = 1e-7 |
const double | DeltaTForPos = 0.01 |
by computing position at two nearby times (sec) More... | |
const double | DoubleEpsilon = std::numeric_limits<double>::epsilon() |
const double | DoubleMax = std::numeric_limits<double>::max() |
const double | DoubleMin = std::numeric_limits<double>::min() |
const double | DoubleNaN = std::numeric_limits<double>::quiet_NaN() |
const double | Pi = std::atan(1.0)*4 |
const double | HoursPerDeg = 24.0 / 360.0 |
const double | RadPerDeg = Pi / 180.0 |
const double | KmPerAU = 149597871.0 |
const double | AUPerParsec = 206264.8062470964 |
const double | ArcsecPerDeg = 3600.0 |
const double | SecPerDay = 24.0 * 3600.0 |
const double | DaysPerYear = 365.25 |
const double | VLight = 299792.458 / KmPerAU |
const double | DegK_DegC = 273.15 |
const double | MJD_UnixTime = 40587 * SecPerDay |
const double | MJDJ2000 = 51544.5 |
const double | AngstromsPerMicron = 1.0e4 |
const double | PascalsPerMillibar = 100.0 |
const double | TT_TAI = 32.184 |
const double | SiderealPerSolar = 1.00273790934 |
Enumerator | |
---|---|
DateType_Julian |
Julian years. |
DateType_Besselian |
Besselian years. |
DateType_TAI |
TAI (MJD, seconds) |
DateType_None |
date is irrelevant |
Definition at line 18 of file coordSys.h.
|
inline |
arccosine in degrees
Definition at line 64 of file mathUtils.h.
bool coordConv::angSideAng | ( | double & | angA, |
double & | sideB, | ||
double & | angC, | ||
double | sideA, | ||
double | angB, | ||
double | sideC | ||
) |
Solve for two sides and the included angle of a spherical triangle
[out] | angA | interior angle opposite side A (deg) |
[out] | sideB | length of side B (deg) |
[out] | angC | interior angle opposite side C (deg) |
[in] | sideA | length of side A (deg) |
[in] | angB | interior angle opposite side B (deg) |
[in] | sideC | length of side C (deg) |
runtime_error | if the inputs are too small to allow computation |
Special Cases (in the order they are handled):
~0 any ~0 unknown(90) 0 unknown(90) ~0 any ~180 unknown(90) 180 unknown(90) ~0 any !pole 0 sideC 180-angB
~180 any ~0 unknown(90) 180 unknown(90) ~180 any ~180 unknown(90) 0 unknown(90) ~180 any !pole 180 180-sideC angB
!pole any ~0 180-angB sideA 0 !pole any ~180 angB 180-sideA 180
any ~0 ~=sideA unknown(90) 0 unknown(90) any ~0 <sideA 180 sideA-sideC 0 any ~0 >sideA 0 sideC-sideA 180
where:
References: Selby, Standard Math Tables, crc, 15th ed, 1967, p161 (Spherical Trig.)
Definition at line 9 of file angSideAng.cc.
Coord coordConv::appGeoFromAppTopo | ( | Coord const & | appTopoCoord, |
Site const & | site, | ||
double | tai | ||
) |
Convert apparent geocentric coordinates to apparent topocentric at a specified date
[in] | appTopoCoord | apparent topocentric coord at the specified TAI date |
[in] | site | site information |
[in] | tai | TAI date (MJD, sec) |
Definition at line 8 of file appGeoFromAppTopo.cc.
Coord coordConv::appTopoFromAppGeo | ( | Coord const & | appGeoCoord, |
Site const & | site, | ||
double | tai | ||
) |
Convert apparent geocentric coordinates to apparent topocentric at a specified date
[in] | appGeoCoord | apparent geocentric coord at the specified TAI date |
[in] | site | site information |
[in] | tai | TAI date (MJD, sec) |
Definition at line 8 of file appTopoFromAppGeo.cc.
Coord coordConv::appTopoFromObs | ( | Coord const & | obsCoord, |
Site const & | site | ||
) |
Convert observed coordinates (refracted apparent topocentric) to apparent topocentric coordinates
[in] | obsCoord | observed (refracted apparent topocentric) coord |
[in] | site | site information; refCoA and refCoB are read |
Definition at line 7 of file appTopoFromObs.cc.
|
inline |
arcsine in degrees
Definition at line 61 of file mathUtils.h.
|
inline |
arctangent2 in degrees
Definition at line 70 of file mathUtils.h.
|
inline |
arctangent in degrees
Definition at line 67 of file mathUtils.h.
void coordConv::azAltFromHADec | ( | Eigen::Vector3d & | azAlt, |
Eigen::Vector3d const & | haDec, | ||
double | lat | ||
) |
Convert HA/Dec position to Alt/Az.
[out] | azAlt | cartesian Az/Alt (same units as haDec); Sign convention: (1,0,0) is south, (0,1,0) is east. |
[in] | haDec | cartesian -HA, Dec (any units) |
[in] | lat | latitude (degrees) |
Definition at line 6 of file azAltFromHADec.cc.
double coordConv::besselianEpochFromTAI | ( | double | mjdSec | ) |
void coordConv::computeRotationMatrix | ( | Eigen::Matrix3d & | rotMat, |
Eigen::Vector3d const & | axis, | ||
double | rotAngle | ||
) |
Compute a rotation matrix given an axis and rotation angle
[out] | rotMat | rotation matrix |
[in] | axis | axis of rotation (magnitude is ignored, but must be finite and nonzero) |
[in] | rotAngle | rotation angle (deg) |
Definition at line 33 of file mathUtils.cc.
|
inline |
cosine of angle in degrees
Definition at line 55 of file mathUtils.h.
void coordConv::haDecFromAzAlt | ( | Eigen::Vector3d & | haDec, |
Eigen::Vector3d const & | azAlt, | ||
double | lat | ||
) |
Convert Az/Alt position to HA/Dec
[out] | haDec | cartesian -HA, Dec (same units as azAlt) |
[in] | azAlt | cartesian Az/Alt (any units) Sign convention: (1,0,0) is south, (0,1,0) is east. |
[in] | lat | latitude (degrees) |
Compute HA/Dec position from alt/az position
[out] | haDec | cartesian -HA, Dec (same units as azAlt) |
[in] | lat | latitude (degrees) |
[in] | azAlt | cartesian Az/Alt (any units) Sign convention: (1,0,0) is south, (0,1,0) is east. |
Definition at line 14 of file haDecFromAzAlt.cc.
double coordConv::hypot | ( | double | x, |
double | y | ||
) |
Hypotenuse function (also present in C++11, which I'm not using yet)
[in] | x,y: | sides of right triangle |
Definition at line 8 of file mathUtils.cc.
double coordConv::julianEpochFromTAI | ( | double | mjdSec | ) |
double coordConv::lastFromTAI | ( | double | tai, |
Site const & | site | ||
) |
CoordSys::Ptr coordConv::makeCoordSys | ( | std::string const & | name, |
double | date | ||
) |
Return a coordinate system given its name
[in] | name | name of coordinate system (case matters) |
[in] | date | date of coordinate system (units depend on the coordinate system); if 0 then the coordSys is current, except FK4 defaults to 1950 and FK5 defaults to 2000 |
std::invalid_argument | (ValueError in python) if name is not recognized. |
Definition at line 74 of file coordSys.cc.
Coord coordConv::obsFromAppTopo | ( | Coord const & | appTopoCoord, |
Site const & | site | ||
) |
Convert apparent topocentric coordinates to observed (refracted apparent topocentric)
[in] | appTopoCoord | apparent topocentric coord |
[in] | site | site information; refCoA and refCoB are read |
Definition at line 7 of file obsFromAppTopo.cc.
std::ostream & coordConv::operator<< | ( | std::ostream & | out, |
Site const & | site | ||
) |
std::ostream & coordConv::operator<< | ( | std::ostream & | os, |
PVTCoord const & | pvtCoord | ||
) |
Definition at line 191 of file pvtCoord.cc.
std::ostream & coordConv::operator<< | ( | std::ostream & | out, |
Coord const & | coord | ||
) |
std::ostream & coordConv::operator<< | ( | std::ostream & | os, |
PVT const & | pvt | ||
) |
Append a formatted PVT to a stream
The format is:
PVT(pos, vel, time)
where all values are shown in decimal format (rather than exponential notation):
[in,out] | os | stream to which to append the formatted value |
[in] | pvt | PVT to format and append to the stream |
std::ostream & coordConv::operator<< | ( | std::ostream & | out, |
CoordSys const & | coordSys | ||
) |
Definition at line 98 of file coordSys.cc.
bool coordConv::polarFromXY | ( | double & | r, |
double & | theta, | ||
double | x, | ||
double | y | ||
) |
Convert cartesian coordinates to polar coordinates.
[out] | r | magnitude of vector (same units as "x" and "y") |
[out] | theta | angle of vector (degrees) 0 along x, 90 along y and in the range (-180, 180) |
[in] | x | x component of vector (arbitrary units) |
[in] | y | y component of vector (same units as "x") |
Definition at line 14 of file mathUtils.cc.
bool coordConv::polarFromXY | ( | PVT & | r, |
PVT & | theta, | ||
PVT const & | x, | ||
PVT const & | y, | ||
double | tai | ||
) |
Convert cartesian coordinates to polar coordinates.
[out] | r | magnitude of vector (same units as "x" and "y") |
[out] | theta | angle of vector (degrees) 0 along x, 90 along y and in the range (-180, 180) |
[in] | x | x component of vector (arbitrary units) |
[in] | y | y component of vector (same units as "x") |
[in] | tai | TAI date (MJD, sec) |
|
inline |
Rotate a 2-dimensional vector by a given angle.
[out] | rotX | rotated x value |
[out] | rotY | rotated y value |
[in] | x: | unrotated x value |
[in] | y: | unrotated y value |
[in] | ang: | angle by which to rotate (deg) |
Using rot2D to change coordinate systems: Given a coordinate system A and a coordinate system B, such that:
Definition at line 12 of file mathUtils.cc.
void coordConv::rot2D | ( | PVT & | rotX, |
PVT & | rotY, | ||
PVT const & | x, | ||
PVT const & | y, | ||
double | ang, | ||
double | tai | ||
) |
Rotate a 2-dimensional PVT vector by a given angle.
[out] | rotX | rotated x value |
[out] | rotY | rotated y value |
[in] | x: | unrotated x value |
[in] | y: | unrotated y value |
[in] | ang: | angle by which to rotate (deg) |
[in] | tai | TAI date (MJD, sec) |
Using rot2D to change coordinate systems: Given a coordinate system A and a coordinate system B, such that:
void coordConv::rotEqPol | ( | Eigen::Vector3d & | toVec, |
Eigen::Vector3d const & | fromVec, | ||
double | eqAng, | ||
double | polarAng | ||
) |
Rotate a 3-vector described by equatorial and polar angles, as follows: The plane of rotation contains the z axis and a line in the x-y plane at angle eqAng from the x axis towards y. The amount of rotation is angle polarAng from the z axis towards the line in the x-y plane.
[out] | toVec | rotated 3-vector |
[in] | fromVec | input 3-vector |
[in] | eqAng | angle of line in x-y plane (from x to y); the plane of rotation includes this line and z |
[in] | polarAng | angle of rotation (from z axis to line in x-y plane) |
Definition at line 5 of file rotEqPol.cc.
void coordConv::rotXY | ( | Eigen::Vector3d & | toVec, |
Eigen::Vector3d const & | fromVec, | ||
double | xAng, | ||
double | yAng | ||
) |
Rotate a 3-vector, first about the x axis, then about the y axis. Warning: toVec cannot replace fromVec
Inputs:
[out] | toVec | rotated 3-vector |
[in] | fromVec | input 3-vector |
[in] | xAng | angle about x axis (deg); positive rotation is from y to z. |
[in] | yAng | angle about original y axis (deg); positive rotation is from z to x. |
|
inline |
sine of angle in degrees
Definition at line 52 of file mathUtils.h.
double coordConv::taiFromBesselianEpoch | ( | double | besselianEpoch | ) |
double coordConv::taiFromJulianEpoch | ( | double | julianEpoch | ) |
|
inline |
tangent of angle in degrees
Definition at line 58 of file mathUtils.h.
|
inline |
Compute angle wrapped into range: -180 <= wrapped ang < 180 deg
[in] | ang | angle to wrap (deg) |
Definition at line 33 of file mathUtils.cc.
|
inline |
|
inline |
Wrap one angle to be within 180 degrees of a reference angle: 180 <= wrapped ang - refAng < 180
[in] | ang | angle to wrap (deg) |
[in] | refAng | result is wrapped to be near this reference angle (deg) |
Definition at line 52 of file mathUtils.cc.
|
inline |
Compute angle wrapped into range: 0 <= wrapped ang < 360 deg
[in] | ang | angle to wrap (deg) |
Definition at line 20 of file mathUtils.cc.
|
inline |
void coordConv::xyFromPolar | ( | double & | x, |
double & | y, | ||
double | r, | ||
double | theta | ||
) |
Convert polar coordinates to cartesian coordinates.
[out] | x | x component of vector (same units as "r") |
[out] | y | y component of vector (same units as "r") |
[in] | r | magnitude of vector (arbitrary units) |
[in] | theta | angle of vector from x axis (degrees) |
Definition at line 28 of file mathUtils.cc.
void coordConv::xyFromPolar | ( | PVT & | x, |
PVT & | y, | ||
PVT const & | r, | ||
PVT const & | theta, | ||
double | tai | ||
) |
Convert polar coordinates to cartesian coordinates.
[out] | x | x component of vector (same units as "r") |
[out] | y | y component of vector (same units as "r") |
[in] | r | magnitude of vector (arbitrary units) |
[in] | theta | angle of vector from x axis (degrees) |
[in] | tai | TAI date (MJD, sec) |
const double coordConv::AngstromsPerMicron = 1.0e4 |
Definition at line 31 of file physConst.h.
const double coordConv::ArcsecPerDeg = 3600.0 |
Definition at line 22 of file physConst.h.
const double coordConv::AUPerParsec = 206264.8062470964 |
Definition at line 21 of file physConst.h.
const double coordConv::DaysPerYear = 365.25 |
Definition at line 24 of file physConst.h.
const double coordConv::DegK_DegC = 273.15 |
Definition at line 26 of file physConst.h.
const double coordConv::DeltaTForPos = 0.01 |
by computing position at two nearby times (sec)
delta time to use when computing velocity
Definition at line 15 of file coordSys.h.
const double coordConv::DoubleEpsilon = std::numeric_limits<double>::epsilon() |
Definition at line 13 of file mathUtils.h.
const double coordConv::DoubleMax = std::numeric_limits<double>::max() |
Definition at line 14 of file mathUtils.h.
const double coordConv::DoubleMin = std::numeric_limits<double>::min() |
Definition at line 15 of file mathUtils.h.
const double coordConv::DoubleNaN = std::numeric_limits<double>::quiet_NaN() |
Definition at line 16 of file mathUtils.h.
const double coordConv::HoursPerDeg = 24.0 / 360.0 |
Definition at line 18 of file physConst.h.
const double coordConv::KmPerAU = 149597871.0 |
Definition at line 20 of file physConst.h.
const double coordConv::MJD_UnixTime = 40587 * SecPerDay |
Definition at line 27 of file physConst.h.
const double coordConv::MJDJ2000 = 51544.5 |
Definition at line 30 of file physConst.h.
const double coordConv::PascalsPerMillibar = 100.0 |
Definition at line 32 of file physConst.h.
const double coordConv::Pi = std::atan(1.0)*4 |
Definition at line 17 of file physConst.h.
const double coordConv::RadPerDeg = Pi / 180.0 |
Definition at line 19 of file physConst.h.
const double coordConv::SecPerDay = 24.0 * 3600.0 |
Definition at line 23 of file physConst.h.
const double coordConv::SiderealPerSolar = 1.00273790934 |
Definition at line 39 of file physConst.h.
const double coordConv::TT_TAI = 32.184 |
Definition at line 35 of file physConst.h.
const double coordConv::VLight = 299792.458 / KmPerAU |
Definition at line 25 of file physConst.h.