Go to the documentation of this file.
40 opts.AddProgramDescription(std::string() +
41 "Takes observed positions (azimuth,zenith angle) and computes the ICRS " +
42 "RA,Dec positions based on the observer location and atmospheric " +
43 "properties. The only values necessary to get rough coordinates are " +
44 "'longitude', 'latitude', 'azimuth', 'zenith', and 'juliandate'.") ;
47 opts.AddObservedPars();
48 opts.AddObserverPars();
60 std::printf(
"******************************************\n") ;
61 std::printf(
"* Results of Observed -> ICRS conversion *\n") ;
62 std::printf(
"******************************************\n") ;
63 std::printf(
"Observed Coordinates (input)\n") ;
64 std::printf(
" Azimuth : %f degrees\n", inputs.AsDouble(
"azimuth")) ;
65 std::printf(
" Zenith : %+f degrees\n", inputs.AsDouble(
"zenith")) ;
66 std::printf(
" Altitude : %+f degrees\n", 90.0-inputs.AsDouble(
"zenith")) ;
67 std::printf(
"ICRS Coordinates (output)\n") ;
68 std::printf(
" Right Ascension: %f degrees\n", results.
XCoord().
Deg()) ;
69 std::printf(
" Declination : %+f degrees\n", results.
YCoord().
Deg()) ;
70 std::printf(
"Observer Info\n") ;
71 std::printf(
" Julian Date : %f\n", inputs.AsDouble(
"juliandate")) ;
72 std::printf(
" Longitude : %f deg\n", inputs.AsDouble(
"longitude")) ;
73 std::printf(
" Latitude : %+f deg\n", inputs.AsDouble(
"latitude")) ;
74 std::printf(
" Elevation : %f meters\n", inputs.AsDouble(
"elevation")) ;
75 std::printf(
" Pressure : %f hPa\n", inputs.AsDouble(
"pressure")) ;
76 std::printf(
" Temperature : %f Celsius\n", inputs.AsDouble(
"temperature")) ;
77 std::printf(
" Relative Humid.: %f\n", inputs.AsDouble(
"humidity")) ;
83 int main(
int argc,
char** argv) {
87 if (opts.ParseCommandLine(argc, argv))
return 0;
90 CEObserver observer(opts.AsDouble(
"longitude"),
91 opts.AsDouble(
"latitude"),
92 opts.AsDouble(
"elevation"),
95 observer.SetTemperature_C(opts.AsDouble(
"temperature"));
96 observer.SetRelativeHumidity(opts.AsDouble(
"humidity"));
97 observer.SetWavelength_um(opts.AsDouble(
"wavelength"));
CEExecOptions DefineOpts()
void SetPressure_hPa(const double &pressure=CppEphem::EstimatePressure_hPa(CppEphem::SeaLevelTemp_C()))
Set the observer's pressure.
double Deg(void) const
Return angle in degrees as a double.
int main(int argc, char **argv)
static CEAngle Deg(const double &angle)
Return angle (radians) constructed from a degree angle.
void PrintResults(CEExecOptions &inputs, const CESkyCoord &results)
CESkyCoord ConvertToICRS(const CEDate &date=CEDate(), const CEObserver &observer=CEObserver())
Convert this coordinate to ICRS coordinates.
virtual CEAngle XCoord(const CEDate &jd=CppEphem::julian_date_J2000()) const
Return x coordinate at given Julian date.
Azimuth, Zenith (requires additional observer information)
virtual CEAngle YCoord(const CEDate &jd=CppEphem::julian_date_J2000()) const
Return y coordinate at given Julian date.