A class representing an arbtrary position on the sky.
astro::SkyPos::SkyPos | ( | ) |
Default constructor, creates a SkyPos object with ra, dec and epoch set to 0.
References setDec(), setEpoch(), and setRA().
astro::SkyPos::SkyPos | ( | const double | ra, | |
const double | dec, | |||
const double | epoch = 2000. | |||
) |
Construct a SkyPos object from double ra and dec if ra not in [0;24] it is transformed to fall into that range. the same is done for dec values outside [-90;90]
References setDec(), setEpoch(), and setRA().
astro::SkyPos::SkyPos | ( | const std::string & | raStr, | |
const std::string & | decStr, | |||
const double | epoch = 2000. | |||
) |
Construct a SkyPos object from double ra and dec. The given strings can either be the string representation of a double or a coordinate in the form [+-]dd:dd:dd[.dd] . If the format is not one of the two an SkyPosException is thrown.
if ra not in [0;24] it is transformed to fall into that range. the same is done for dec values outside [-90;90]
References setDec(), setEpoch(), and setRA().
void astro::SkyPos::setRA | ( | double | ra | ) |
References ra_.
Referenced by setRA_rad(), and SkyPos().
void astro::SkyPos::setRA_rad | ( | double | ra_rad | ) |
References astro::rad_per_hour, and setRA().
void astro::SkyPos::setRA | ( | const std::string & | raStr | ) | [inline] |
References astro::hms2dbl(), ra_, and astro::str2hms().
double astro::SkyPos::ra_deg | ( | ) | const |
References ra_.
Referenced by hourAngleDeg().
double astro::SkyPos::ra_rad | ( | ) | const |
References ra_, and astro::rad_per_hour.
std::string astro::SkyPos::raString | ( | const int | prec = 2 |
) | const |
References astro::hms2str(), and ra_.
Referenced by main().
void astro::SkyPos::setDec | ( | double | dec | ) |
References dec_.
Referenced by setDec_rad(), and SkyPos().
void astro::SkyPos::setDec_rad | ( | double | dec_rad | ) |
References astro::rad_per_deg, and setDec().
void astro::SkyPos::setDec | ( | const std::string & | decStr | ) | [inline] |
References dec_, astro::dms2dbl(), and astro::str2dms().
double astro::SkyPos::dec | ( | ) | const |
References dec_.
double astro::SkyPos::dec_rad | ( | ) | const |
References dec_, and astro::rad_per_deg.
std::string astro::SkyPos::decString | ( | const int | prec = 2 |
) | const |
References dec_, and astro::dms2str().
Referenced by main().
double astro::SkyPos::hourAngle | ( | const util::UTDate & | date, | |
const ObsSite & | obs | |||
) | const |
References hourAngleDeg().
Referenced by hourAngleStr().
double astro::SkyPos::hourAngleDeg | ( | const util::UTDate & | date, | |
const ObsSite & | obs | |||
) | const |
References astro::ObsSite::lon(), and ra_deg().
Referenced by altitude(), azimuth(), and hourAngle().
double astro::SkyPos::altitude | ( | const util::UTDate & | date, | |
const ObsSite & | obs | |||
) | const |
References astro::asindeg(), astro::cosdeg(), dec_, hourAngleDeg(), astro::ObsSite::lat(), and astro::sindeg().
Referenced by airmass(), altitudeStr(), and azimuth().
double astro::SkyPos::azimuth | ( | const util::UTDate & | date, | |
const ObsSite & | obs | |||
) | const |
References a, altitude(), astro::atan2deg(), astro::cosdeg(), dec_, hourAngleDeg(), astro::ObsSite::lat(), and astro::sindeg().
Referenced by azimuthStr().
std::string astro::SkyPos::hourAngleStr | ( | const util::UTDate & | date, | |
const ObsSite & | obs, | |||
const int | prec = 2 | |||
) | const |
References astro::hms2str(), and hourAngle().
std::string astro::SkyPos::altitudeStr | ( | const util::UTDate & | date, | |
const ObsSite & | obs, | |||
const int | prec = 2 | |||
) | const |
References altitude(), and astro::dms2str().
std::string astro::SkyPos::azimuthStr | ( | const util::UTDate & | date, | |
const ObsSite & | obs, | |||
const int | prec = 2 | |||
) | const |
References azimuth(), and astro::hms2str().
double astro::SkyPos::airmass | ( | const util::UTDate & | date, | |
const ObsSite & | obs | |||
) | const |
Return the airmass for the SkyPos sp at date. If the altitude of the object is smaller than 3., or negative (i.e under the horizon) -1 is returned.
References altitude(), and astro::sindeg().
Referenced by main().
double astro::SkyPos::epoch_ [protected] |
Referenced by epoch(), setEpoch(), and SkyPos().
double astro::SkyPos::ra_ [protected] |
double astro::SkyPos::dec_ [protected] |
Referenced by altitude(), azimuth(), dec(), dec_rad(), decString(), setDec(), and SkyPos().