Go to the documentation of this file.
41 opts.AddProgramDescription(std::string() +
42 "Converts from CIRS coordinates to observed altitude and zenith " +
43 "coordinates for a given Julian date. Additional observing conditions " +
44 "an also be specified to allow more accurate coordinate values.");
48 opts.AddObserverPars();
63 std::printf(
"******************************************\n");
64 std::printf(
"* Results of CIRS -> Observed conversion *\n");
65 std::printf(
"******************************************\n");
66 std::printf(
"Observed Coordinates (output)\n");
67 std::printf(
" Azimuth : %f degrees\n", obs_coords.
XCoord().
Deg());
68 std::printf(
" Zenith : %+f degrees\n", obs_coords.
YCoord().
Deg());
69 std::printf(
" Altitude : %+f degrees\n", 90.0-obs_coords.
YCoord().
Deg());
70 std::printf(
"CIRS Coordinates (input)\n");
71 std::printf(
" Right Ascension: %f degrees\n", inputs.AsDouble(
"ra"));
72 std::printf(
" Declination : %+f degrees\n", inputs.AsDouble(
"dec"));
73 std::printf(
" Julian Date : %f\n", inputs.AsDouble(
"juliandate"));
74 std::printf(
"Apparent CIRS Coordinates\n");
75 std::printf(
" Right Ascension: %f\n", obs_cirs_coords.
XCoord().
Deg());
76 std::printf(
" Declination : %+f\n", obs_cirs_coords.
YCoord().
Deg());
77 std::printf(
" Hour Angle : %+f\n", hour_angle.
Deg());
78 std::printf(
"Observer Info\n");
79 std::printf(
" Longitude : %f deg\n", inputs.AsDouble(
"longitude"));
80 std::printf(
" Latitude : %+f deg\n", inputs.AsDouble(
"latitude"));
81 std::printf(
" Elevation : %f meters\n", inputs.AsDouble(
"elevation"));
82 std::printf(
" Pressure : %f hPa\n", inputs.AsDouble(
"pressure"));
83 std::printf(
" Temperature : %f Celsius\n", inputs.AsDouble(
"temperature"));
84 std::printf(
" Relative Humid.: %f\n", inputs.AsDouble(
"humidity"));
90 int main(
int argc,
char** argv) {
94 if (opts.ParseCommandLine(argc, argv))
return 0;
97 std::map<std::string, double> results;
98 results[
"azimuth"] = 0.0;
99 results[
"zenith"] = 0.0;
100 results[
"observed_ra"] = 0.0;
101 results[
"observed_dec"] = 0.0;
102 results[
"hour_angle"] = 0.0;
109 opts.AsDouble(
"latitude"),
110 opts.AsDouble(
"elevation"),
113 obs.SetPressure_hPa(opts.AsDouble(
"pressure"));
114 obs.SetWavelength_um(opts.AsDouble(
"wavelength"));
124 &obs_cirs_coord, &hour_angle);
127 PrintResults(opts, obs_coord, obs_cirs_coord, hour_angle);
void PrintResults(CEExecOptions &inputs, const CESkyCoord &obs_coords, const CESkyCoord &obs_cirs_coords, const CEAngle &hour_angle)
RA, Dec (referenced at the center of the Earth)
static void CIRS2Observed(const CESkyCoord &in_cirs, CESkyCoord *out_observed, const CEDate &date, const CEObserver &observer, CESkyCoord *observed_cirs=nullptr, CEAngle *hour_angle=nullptr)
CIRS -> Observed (or observer specific) coordinate conversion.
void SetRelativeHumidity(const double &humidity=0.0)
Set the observer's relative humidity.
CEExecOptions DefineOpts()
Define the command line options for this program.
int main(int argc, char **argv)
double Deg(void) const
Return angle in degrees as a double.
static CEAngle Deg(const double &angle)
Return angle (radians) constructed from a degree angle.
virtual CEAngle XCoord(const CEDate &jd=CppEphem::julian_date_J2000()) const
Return x coordinate at given Julian date.
virtual CEAngle YCoord(const CEDate &jd=CppEphem::julian_date_J2000()) const
Return y coordinate at given Julian date.