CppEphem
|
The CEObservation class serves as a constant link between an observer, a specified time, and a celestial body. This makes for a more convenient way of getting the current observed coordinates of an object. It also makes it easier when using a CERunningDate object as the input "date" object.
Definition at line 33 of file CEObservation.h.
Public Member Functions | |
CEBody * | Body () |
Access underlying CEBody object. More... | |
CEObservation () | |
Default constructor. More... | |
CEObservation (CEObserver *observer, CEBody *body, CEDate *date) | |
Constructor from a known observer, object, and date. More... | |
CEObservation (const CEObservation &other) | |
Copy constructor. More... | |
CEDate * | Date () |
Access underlying CEDate object. More... | |
virtual double | GetAltitude_Deg () |
virtual double | GetAltitude_Rad () |
virtual double | GetApparentXCoordinate_Deg () |
virtual double | GetApparentXCoordinate_Rad () |
virtual void | GetApparentXYCoordinate_Deg (double *apparent_X, double *apparent_Y) |
Returns both the observed x,y coordinates of a given 'body_' as observed by 'observer_' on the date given by 'date_'. More... | |
virtual void | GetApparentXYCoordinate_Rad (double *apparent_X, double *apparent_Y) |
Returns both the observed x,y coordinates of a given 'body_' as observed by 'observer_' on the date given by 'date_'. More... | |
virtual double | GetApparentYCoordinate_Deg () |
virtual double | GetApparentYCoordinate_Rad () |
virtual double | GetAzimuth_Deg () |
virtual double | GetAzimuth_Rad () |
virtual void | GetAzimuthZenith_Deg (double *azimuth, double *zenith) |
Returns both the azimuth and zenith angle of a given 'body_' as observed by 'observer_' on the date given by 'date_'. More... | |
virtual void | GetAzimuthZenith_Rad (double *azimuth, double *zenith) |
Returns both the azimuth and zenith angle of a given 'body_' as observed by 'observer_' on the date given by 'date_'. More... | |
virtual double | GetHourAngle_Deg () |
virtual double | GetHourAngle_Rad () |
virtual double | GetZenith_Deg () |
virtual double | GetZenith_Rad () |
CEObserver * | Observer () |
Access the underlying objects. More... | |
CEObservation & | operator= (const CEObservation &other) |
Copy assignment operator. More... | |
virtual void | SetBody (CEBody *new_body) |
Set underlying CEBody object. More... | |
virtual void | SetDate (CEDate *new_date) |
Set underlying CEDate object. More... | |
virtual void | SetObserver (CEObserver *new_observer) |
Set underlying CEObserver object. More... | |
bool | UpdateCoordinates () |
Update the stored coordinates. More... | |
virtual | ~CEObservation () |
Destructor. More... | |
Private Member Functions | |
void | copy_members (const CEObservation &other) |
Copy data members from another object. More... | |
void | free_members (void) |
Deallocate memory. More... | |
void | init_members (void) |
Initialize the data members. More... | |
bool | NeedsUpdate (void) |
Check whether the date has changed since the last time all of the parameters were updated (i.e. More... | |
Private Attributes | |
CEBody * | body_ |
double | cached_apparentxcoord_ |
double | cached_apparentycoord_ |
CESkyCoord | cached_coords_ |
double | cached_date_ |
double | cached_hour_angle_ |
CEDate * | date_ |
CEObserver * | observer_ |
#include <CEObservation.h>
CEObservation::CEObservation | ( | ) |
Default constructor.
Definition at line 36 of file CEObservation.cpp.
CEObservation::CEObservation | ( | CEObserver * | observer, |
CEBody * | body, | ||
CEDate * | date | ||
) |
Constructor from a known observer, object, and date.
If no date is provided, the date of the observer will be used instead.
observer | CEObserver linked with these coordinates |
body | CEBody being observed |
date | CEDate object linked with these coordinates. |
Definition at line 48 of file CEObservation.cpp.
CEObservation::CEObservation | ( | const CEObservation & | other | ) |
Copy constructor.
[in] | other | CEObservation object to be copied |
Definition at line 64 of file CEObservation.cpp.
|
virtual |
Destructor.
Definition at line 74 of file CEObservation.cpp.
|
inline |
Access underlying CEBody object.
Definition at line 113 of file CEObservation.h.
|
private |
Copy data members from another object.
[in] | other | CEObservation object to copy from |
Definition at line 179 of file CEObservation.cpp.
|
inline |
Access underlying CEDate object.
Definition at line 124 of file CEObservation.h.
|
private |
Deallocate memory.
Definition at line 219 of file CEObservation.cpp.
|
inlinevirtual |
Definition at line 220 of file CEObservation.h.
|
inlinevirtual |
Definition at line 209 of file CEObservation.h.
|
inlinevirtual |
Definition at line 261 of file CEObservation.h.
|
inlinevirtual |
Definition at line 250 of file CEObservation.h.
|
virtual |
Returns both the observed x,y coordinates of a given 'body_' as observed by 'observer_' on the date given by 'date_'.
This method is the safest way of obtaining these values when using a CERunningDate object for 'date_'.
[out] | apparent_X | Observed value of 'body_' x-coordinate (degrees) |
[out] | apparent_Y | Observed value of 'body_' y-coordinate (degrees) |
Definition at line 150 of file CEObservation.cpp.
|
virtual |
Returns both the observed x,y coordinates of a given 'body_' as observed by 'observer_' on the date given by 'date_'.
This method is the safest way of obtaining these values when using a CERunningDate object for 'date_'.
[out] | apparent_X | Observed value of 'body_' x-coordinate (radians) |
[out] | apparent_Y | Observed value of 'body_' y-coordinate (radians) |
Definition at line 135 of file CEObservation.cpp.
|
inlinevirtual |
Definition at line 282 of file CEObservation.h.
|
inlinevirtual |
Definition at line 271 of file CEObservation.h.
|
inlinevirtual |
Definition at line 178 of file CEObservation.h.
|
inlinevirtual |
Definition at line 167 of file CEObservation.h.
|
virtual |
Returns both the azimuth and zenith angle of a given 'body_' as observed by 'observer_' on the date given by 'date_'.
This method is the safest way of obtaining the azimuth,zenith coordinates when using a CERunningDate object for 'date_'.
[out] | azimuth | Azimuth in degrees (degrees) |
[out] | zenith | Zenith in degrees (degrees) |
Definition at line 119 of file CEObservation.cpp.
|
virtual |
Returns both the azimuth and zenith angle of a given 'body_' as observed by 'observer_' on the date given by 'date_'.
This method is the safest way of obtaining the azimuth,zenith coordinates when using a CERunningDate object for 'date_'.
[out] | azimuth | Azimuth in degrees (radians) |
[out] | zenith | Zenith in degrees (radians) |
Definition at line 105 of file CEObservation.cpp.
|
inlinevirtual |
Definition at line 241 of file CEObservation.h.
|
inlinevirtual |
Definition at line 230 of file CEObservation.h.
|
inlinevirtual |
Definition at line 199 of file CEObservation.h.
|
inlinevirtual |
Definition at line 188 of file CEObservation.h.
|
private |
Initialize the data members.
Definition at line 198 of file CEObservation.cpp.
|
private |
Check whether the date has changed since the last time all of the parameters were updated (i.e.
since the last time UpdateCoordinates() was called)
Definition at line 230 of file CEObservation.cpp.
|
inline |
Access the underlying objects.
Definition at line 103 of file CEObservation.h.
CEObservation & CEObservation::operator= | ( | const CEObservation & | other | ) |
Copy assignment operator.
[in] | other | CEObservation object to be copied |
Definition at line 86 of file CEObservation.cpp.
|
inlinevirtual |
Set underlying CEBody object.
[in] | new_body | Pointer to new CEBody object |
Definition at line 146 of file CEObservation.h.
|
inlinevirtual |
Set underlying CEDate object.
[in] | new_date | Pointer to new CEDate object |
Definition at line 157 of file CEObservation.h.
|
inlinevirtual |
Set underlying CEObserver object.
[in] | new_observer | Pointer to new CEObserver object |
Definition at line 135 of file CEObservation.h.
bool CEObservation::UpdateCoordinates | ( | ) |
Update the stored coordinates.
Since all values need to be computed at the same time, it only makes sense to update all of the values every time they need updating.
Definition at line 163 of file CEObservation.cpp.
|
private |
Definition at line 99 of file CEObservation.h.
|
private |
Definition at line 111 of file CEObservation.h.
|
private |
Definition at line 112 of file CEObservation.h.
|
private |
Definition at line 107 of file CEObservation.h.
|
private |
Definition at line 106 of file CEObservation.h.
|
private |
Definition at line 110 of file CEObservation.h.
|
private |
Definition at line 100 of file CEObservation.h.
|
private |
Definition at line 101 of file CEObservation.h.