The CEPlanet class describes a planetary object. Static methods exist for obtaining specific planetary descriptions of the major solar system bodies: Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto.
Two algorithms exist for computing the apparent RA,Dec and observed positions of these bodies: SOFA and JPL
SOFA (default for Mercury - Neptune)
Accuracy in the positions derived from the SOFA algorithms should be assumed as:
- Inner planets (Mercury - Mars): < few arcsecs
- Outer planets (Jupiter - Neptune): < few arcmins
Because of the obviously better accuracy in these parameters as compared to the JPL algorithm, the SOFA methods are the default. However, it should be noted that there is no algorithm for Pluto in the SOFA method, so for Pluto the JPL algorithm should is used instead.
JPL (default for pluto)
Accuracy in the positions of these objects should be assumed as:
- Inner planets (Mercury - Mars): < 0.5 degrees
- Outer planets (Jupiter - Pluto): < 1-2 degrees
Note that these numbers have not been verified at the moment. Planet positions are computed using the JPL Keplerian formulas and their best fit orbital parameters. These are self-implemented algorithms so any inaccuracy is on the fault of the programmer (JCardenzana) not JPL.
Additionally, Pluto only has coordinate computation algorithms for implemented for the JPL algorithm, so this algorithm will always be used for computing the positions of Pluto.
Default Planet Objects
The eight planets and Pluto have predefined static methods. To create one of these predefined planet objects, it is advised to use these methods:
Converting To Observed Coordinates
In order to get the observed coordinates of a planet, it is a simple matter of combining three objects: Observer, date, and planet. This can be done in the following way:
double azimuth(0.0), zenith(0.0);
observed_coords.GetAzimuthZenith_Deg(&azimuth, &zenith) ;
To get an updated position of Mercury at some other date, we simply update the value of 'date' and call again 'CEObservation::GetAzimuthZenith_Deg()'
observed_coords.GetAzimuthZenith_Deg(&azimuth, &zenith) ;
The following chain of computations occurs behind the scenes (i.e. you dont have to know how it's done in order to get the coordinates out).
The positions are computed first for the planet in order to obtain its heliocentric (ICRS in JPL algorithm) reference frame x,y,z coordinates. Then, the x,y,z coordinates of the Earth (Earth-Moon barycenter in JPL) are computed. The planets x,y,z coordinates are then projected relative to the Earth centric (E-M barycenter in JPL algorithm) coordinates to obtain the apparent RA,Dec coordinates from the Earth.
Future improvements will include correcting the coordinates for a given observer's location on the Earth relative to the E-M barycenter.
Definition at line 35 of file CEPlanet.h.
|
double | Albedo () |
|
CEPlanetAlgo | Algorithm (void) const |
|
| CEPlanet () |
| Default constructor. More...
|
|
| CEPlanet (const CEPlanet &other) |
| Copy constructor. More...
|
|
| CEPlanet (const std::string &name, const CEAngle &xcoord, const CEAngle &ycoord, const CESkyCoordType &coord_type=CESkyCoordType::CIRS) |
| Primary constructor. More...
|
|
virtual double | EarthDist_AU (const CEDate &date) |
| Return the distance to Earth for this planet at a given UTC date. More...
|
|
double | GetVxICRS () |
| X velocity relative to solar system barycenter (AU/day) More...
|
|
double | GetVyICRS () |
| Y velocity relative to solar system barycenter (AU/day) More...
|
|
double | GetVzICRS () |
| Z velocity relative to solar system barycenter (AU/day) More...
|
|
double | GetXICRS () |
| Return X distance from solar system barycenter (AU) More...
|
|
double | GetYICRS () |
| Y distance from solar system barycenter (AU) More...
|
|
double | GetZICRS () |
| Z distance from solar system barycenter (AU) More...
|
|
double | Mass_kg () |
|
virtual CESkyCoord | ObservedCoords (const CEDate &date, const CEObserver &observer) const |
| Get the observed coordinates for a given observer/date. More...
|
|
CEPlanet & | operator= (const CEPlanet &other) |
| Copy assignment operator. More...
|
|
std::vector< double > | PositionICRS (void) const |
| Z distance from solar system barycenter (AU) More...
|
|
std::vector< double > | PositionICRS_Obs (const CEDate &date) const |
| Get the observed position on a given date. More...
|
|
double | Radius_m () |
|
void | SetAlbedo (double new_albedo) |
|
void | SetAlgorithm (const CEPlanetAlgo &new_algo) |
| Set the desired planet computation algorithm. More...
|
|
virtual void | SetAscendingNodeLongitude (double ascending_node_lon, double ascending_node_lon_per_cent=0.0, CEAngleType angle_type=CEAngleType::DEGREES) |
| Set the longitude of the ascending node. More...
|
|
virtual void | SetEccentricity (double eccentricity, double eccentricity_per_cent=0.0) |
| Set the eccentricity. More...
|
|
virtual void | SetExtraTerms (double b, double c, double s, double f) |
|
virtual void | SetInclination (double inclination, double inclination_per_cent=0.0, CEAngleType angle_type=CEAngleType::DEGREES) |
| Set the inclination angle of the planets orbit. More...
|
|
void | SetMass_kg (double new_mass) |
|
virtual void | SetMeanLongitude (double mean_longitude, double mean_longitude_per_cent=0.0, CEAngleType angle_type=CEAngleType::DEGREES) |
| Set the mean longitude. More...
|
|
void | SetMeanRadius_m (double new_radius) |
|
virtual void | SetPerihelionLongitude (double perihelion_lon, double perihelion_lon_per_cent=0.0, CEAngleType angle_type=CEAngleType::DEGREES) |
| Set the longitude at perihelion. More...
|
|
virtual void | SetReference (CEPlanet *reference) |
| Set the reference object for computing more accurate RA,Dec values. More...
|
|
virtual void | SetSemiMajorAxis_AU (double semi_major_axis_au, double semi_major_axis_au_per_cent=0.0) |
| Set the semi-major axis (in AU) and it's derivative. More...
|
|
void | SetSofaID (const double &new_id) |
| Set the sofa planet id (note, only values from 1-8 are acceptable) More...
|
|
virtual void | SetTolerance (double tol=1.0e-6) |
| Set the tolerance for the eccentric anomoly recursive formula. More...
|
|
virtual void | Update_JPL (double new_date=-1.0e30) const |
| Recomputes the coordinates of the planet based on the date using the keplerian method outlined by JPL. More...
|
|
virtual void | Update_SOFA (double new_date=-1.0e30) const |
| Recomputes the coordinates of the planet based on the date using the methods included in the sofa package (iauPlan94). More...
|
|
virtual void | UpdateCoordinates (double new_date=-1.0e30) const |
| Recomputes the coordinates of the planet if the date has changed from the last time the coordinates were computed. More...
|
|
std::vector< double > | VelocityICRS (void) const |
| Vector of velocities relative to solar system barycenter (AU/day) More...
|
|
virtual double | XCoordinate_Deg (double new_date=-1.0e30) const |
|
virtual double | XCoordinate_Rad (double new_date=-1.0e30) const |
|
virtual double | YCoordinate_Deg (double new_date=-1.0e30) const |
|
virtual double | YCoordinate_Rad (double new_date=-1.0e30) const |
|
virtual | ~CEPlanet () |
| Destructor. More...
|
|
Public Member Functions inherited from CEBody |
| CEBody () |
| Default constructor. More...
|
|
| CEBody (const CEBody &other, const std::string &name="") |
| Copy constructor. More...
|
|
| CEBody (const CESkyCoord &coords, const std::string &name="") |
| Copy constructor from a single set of coordinates. More...
|
|
| CEBody (const std::string &name, const CEAngle &xcoord, const CEAngle &ycoord, const CESkyCoordType &coord_type=CESkyCoordType::ICRS) |
| Primary constructor. More...
|
|
virtual CESkyCoord | GetCoordinates (const CEDate &date=CEDate::CurrentJD()) const |
| Return the ICRS coordinates associated with this object. More...
|
|
std::string | Name (void) const |
| Get the name of this object. More...
|
|
CEBody & | operator= (const CEBody &other) |
| Overloaded assignment operator. More...
|
|
void | SetName (const std::string &new_name) |
| Set the name of this object. More...
|
|
virtual | ~CEBody () |
| Destructor. More...
|
|
virtual CEAngle | AngularSeparation (const CESkyCoord &coords) const |
| Get the angular separation between the coordinates represented by this object and another coordinate object. More...
|
|
| CESkyCoord () |
| Default constructor. More...
|
|
| CESkyCoord (const CEAngle &xcoord, const CEAngle &ycoord, const CESkyCoordType &coord_type=CESkyCoordType::ICRS) |
| Primary constructor. More...
|
|
| CESkyCoord (const CECoordinates &other) |
| Copy constructor. More...
|
|
| CESkyCoord (const CESkyCoord &other) |
| Copy constructor. More...
|
|
CESkyCoord | ConvertTo (const CESkyCoordType &output_coord_type, const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert these coordinates to another coordinate system NOTE: If this object is not OBSERVED coordinates, only JD is needed. More...
|
|
CESkyCoord | ConvertToCIRS (const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert this coordinate to CIRS coordinates. More...
|
|
CESkyCoord | ConvertToEcliptic (const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert this coordinate to ECLIPTIC coordinates. More...
|
|
CESkyCoord | ConvertToGalactic (const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert this coordinate to GALACTIC coordinates. More...
|
|
CESkyCoord | ConvertToICRS (const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert this coordinate to ICRS coordinates. More...
|
|
CESkyCoord | ConvertToObserved (const CEDate &date=CEDate(), const CEObserver &observer=CEObserver()) |
| Convert this coordinate to OBSERVED coordinates. More...
|
|
CESkyCoordType | GetCoordSystem (void) const |
| Return coordinate system. More...
|
|
CESkyCoord & | operator= (const CESkyCoord &other) |
| Overloaded '=' (assignment) operator. More...
|
|
std::string | print (void) const |
| Generate a message string that specifies the information about this coordinate. More...
|
|
virtual void | SetCoordinates (const CEAngle &xcoord, const CEAngle &ycoord, const CESkyCoordType &coord_type=CESkyCoordType::ICRS) const |
| Set the coordinates of this object. More...
|
|
virtual void | SetCoordinates (const CESkyCoord &coords) |
| Set the coordinates from another CESkyCoord object. More...
|
|
virtual CEAngle | XCoord (const CEDate &jd=CppEphem::julian_date_J2000()) const |
| Return x coordinate at given Julian date. More...
|
|
virtual CEAngle | YCoord (const CEDate &jd=CppEphem::julian_date_J2000()) const |
| Return y coordinate at given Julian date. More...
|
|
virtual | ~CESkyCoord () |
| Destructor. More...
|
|
|
static CEPlanet | Earth () |
| Returns an object representing Earth. More...
|
|
static CEPlanet | EMBarycenter () |
| Returns an object representing the Earth-Moon barycenter. More...
|
|
static CEPlanet | Jupiter () |
| Returns an object representing Jupiter. More...
|
|
static CEPlanet | Mars () |
| Returns an object representing Mars. More...
|
|
static CEPlanet | Mercury () |
| Returns an object representing Mercury. More...
|
|
static CEPlanet | Neptune () |
| Returns an object representing Neptune. More...
|
|
static CEPlanet | Pluto () |
| Returns an object representing Pluto. More...
|
|
static CEPlanet | Saturn () |
| Returns an object representing Saturn. More...
|
|
static CEPlanet | Uranus () |
| Returns an object representing Uranus. More...
|
|
static CEPlanet | Venus () |
| Returns an object representing Venus. More...
|
|
static CEAngle | AngularSeparation (const CEAngle &xcoord_first, const CEAngle &ycoord_first, const CEAngle &xcoord_second, const CEAngle &ycoord_second) |
| Get the angular separation between two sets of coordinates. More...
|
|
static CEAngle | AngularSeparation (const CESkyCoord &coords1, const CESkyCoord &coords2) |
| Get the angular separation between two coordinate objects. More...
|
|
static void | CIRS2Ecliptic (const CESkyCoord &in_cirs, CESkyCoord *out_ecliptic, const CEDate &date=CEDate()) |
| Convert CIRS to ECLIPTIC coordinates. More...
|
|
static void | CIRS2Galactic (const CESkyCoord &in_cirs, CESkyCoord *out_galactic, const CEDate &date=CEDate()) |
| Convert CIRS to Galactic coordinates. More...
|
|
static void | CIRS2ICRS (const CESkyCoord &in_cirs, CESkyCoord *out_icrs, const CEDate &date=CEDate()) |
| Convert CIRS to ICRS coordinates. More...
|
|
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. More...
|
|
static void | Ecliptic2CIRS (const CESkyCoord &in_ecliptic, CESkyCoord *out_cirs, const CEDate &date=CEDate()) |
| ECLIPTIC -> CIRS coordinate conversion. More...
|
|
static void | Ecliptic2Galactic (const CESkyCoord &in_ecliptic, CESkyCoord *out_galactic, const CEDate &date=CEDate()) |
| ECLIPTIC -> GALACTIC coordinate conversion. More...
|
|
static void | Ecliptic2ICRS (const CESkyCoord &in_ecliptic, CESkyCoord *out_icrs, const CEDate &date=CEDate()) |
| ECLIPTIC -> ICRS coordinate conversion. More...
|
|
static void | Ecliptic2Observed (const CESkyCoord &in_ecliptic, CESkyCoord *out_observed, const CEDate &date, const CEObserver &observer) |
| ECLIPTIC -> OBSERVED coordinate conversion. More...
|
|
static void | Galactic2CIRS (const CESkyCoord &in_galactic, CESkyCoord *out_cirs, const CEDate &date=CEDate()) |
| GALACTIC -> CIRS coordinate conversion. More...
|
|
static void | Galactic2Ecliptic (const CESkyCoord &in_galactic, CESkyCoord *out_ecliptic, const CEDate &date=CEDate()) |
| GALACTIC -> ECLIPTIC coordinate conversion. More...
|
|
static void | Galactic2ICRS (const CESkyCoord &in_galactic, CESkyCoord *out_icrs) |
| GALACTIC -> ICRS coordinate conversion. More...
|
|
static void | Galactic2Observed (const CESkyCoord &in_galactic, CESkyCoord *out_observed, const CEDate &date, const CEObserver &observer, CESkyCoord *observed_galactic=nullptr, CEAngle *hour_angle=nullptr) |
| GALACTIC -> OBSERVED coordinate conversion. More...
|
|
static void | ICRS2CIRS (const CESkyCoord &in_icrs, CESkyCoord *out_cirs, const CEDate &date=CEDate()) |
| ICRS -> CIRS coordinate conversion. More...
|
|
static void | ICRS2Ecliptic (const CESkyCoord &in_icrs, CESkyCoord *out_ecliptic, const CEDate &date=CEDate()) |
| ICRS -> ECLIPTIC coordinate conversion. More...
|
|
static void | ICRS2Galactic (const CESkyCoord &in_icrs, CESkyCoord *out_galactic) |
| ICRS -> GALACTIC coordinate conversion. More...
|
|
static void | ICRS2Observed (const CESkyCoord &in_icrs, CESkyCoord *out_observed, const CEDate &date, const CEObserver &observer, CESkyCoord *observed_cirs=nullptr, CEAngle *hour_angle=nullptr) |
| ICRS -> OBSERVED coordinate conversion. More...
|
|
static void | Observed2CIRS (const CESkyCoord &in_observed, CESkyCoord *out_cirs, const CEDate &date, const CEObserver &observer) |
| OBSERVED -> CIRS coordinate conversion. More...
|
|
static void | Observed2Ecliptic (const CESkyCoord &in_observed, CESkyCoord *out_ecliptic, const CEDate &date, const CEObserver &observer) |
| OBSERVED -> ECLIPTIC coordinate conversion. More...
|
|
static void | Observed2Galactic (const CESkyCoord &in_observed, CESkyCoord *out_galactic, const CEDate &date, const CEObserver &observer) |
| OBSERVED -> GALACTIC coordinate conversion. More...
|
|
static void | Observed2ICRS (const CESkyCoord &in_observed, CESkyCoord *out_icrs, const CEDate &date, const CEObserver &observer) |
| OBSERVED -> ICRS coordinate conversion. More...
|
|