CppEphem
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CEPlanet Class Reference

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:

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:

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:

// Define one of the planets:

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:

// == CREATE THE INPUT OBJECTS == //
// Create a date object for the current time
CEDate date;
// Create a default observer, longitude and latitude in degrees.
// I'm using Ames, IA, USA.
CEObserver observer(-93.62, 42.0347, 287.0, CEAngleType::DEGREES) ;
// Create a planet object representing Mercury
// Now assemble the observer and the
// planet into an observation object
CEObservation observed_coords(&observer, &mercury, &date) ;
// == ACCESS THE OBSERVED PLANET POSITION == //
// Now we can get the current positions of mercury
double azimuth(0.0), zenith(0.0);
observed_coords.GetAzimuthZenith_Deg(&azimuth, &zenith) ;
// At this point 'azimuth' and 'zenith' hold the azimuth
// and zenith angle (in degrees) of mercury for 'observer'
// at the date/time represented by 'date'.

To get an updated position of Mercury at some other date, we simply update the value of 'date' and call again 'CEObservation::GetAzimuthZenith_Deg()'

// Change the date to June 5, 2018 at 1pm UTC
date.SetDate( 20180605 + (13.0/24.0), CEDateType::GREGORIAN );
// Get the updated positions
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.

Public Member Functions

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...
 
CEPlanetoperator= (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...
 
CEBodyoperator= (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...
 
- Public Member Functions inherited from CESkyCoord
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...
 
CESkyCoordoperator= (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 Public Member Functions

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 Public Member Functions inherited from CESkyCoord
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...
 

Private Member Functions

double ComputeElement (double value, double value_derivative_, double time) const
 Compute current value of a given element. More...
 
void copy_members (const CEPlanet &other)
 Copy data members from another CEPlanet object. More...
 
double EccentricAnomoly (double &M, double &e, double &En, double &del_E) const
 Recursive method for computing the eccentric anomoly. More...
 
void free_members (void)
 Free allocated memory. More...
 
void init_members (void)
 Initialize data members. More...
 
double MeanAnomaly (double mean_longitude_deg, double perihelion_long_deg, double T=0.0) const
 Computes the mean anomaly. More...
 
void UpdatePosition (const double &jd) const
 Recomputes the spatial position for a planet based on chosen algorithm. More...
 

Private Attributes

double albedo_
 Albedo (0 -> 1) More...
 
CEPlanetAlgo algorithm_type_
 
double ascending_node_lon_deg_
 Omega - Longitude of ascending node (radians) More...
 
double ascending_node_lon_deg_per_cent_
 
double b_
 
double c_
 
double cached_jd_
 Julian date of the current coordinates. More...
 
double E_tol = 1.0e-6
 
double eccentricity_
 e - Eccentricity More...
 
double eccentricity_per_cent_
 
double f_
 
double inclination_deg_
 I - inclination in radians. More...
 
double inclination_deg_per_cent_
 
double mass_kg_
 Mass (kilograms) More...
 
double mean_longitude_deg_
 L - Mean longitude (radians) More...
 
double mean_longitude_deg_per_cent_
 
double perihelion_lon_deg_
 w - Longitude of perihelion (radians) More...
 
double perihelion_long_deg_per_cent_
 
std::vector< double > pos_icrs_
 XYZ position (AU) relative to solar system barycenter. More...
 
double radius_m_
 Radius (in meters) More...
 
CEPlanetreference_
 
double s_
 
double semi_major_axis_au_
 a - Semi major axis in Astronomical Units (AU) More...
 
double semi_major_axis_au_per_cent_
 
double sofa_planet_id_
 Sofa planet id (note: 3.5 implies the earth-center which uses a different method than the other planets) More...
 
std::vector< double > vel_icrs_
 XYZ velocity (AU/day) relative to solar system barycenter. More...
 

#include <CEPlanet.h>

Inheritance diagram for CEPlanet:
Inheritance graph
[legend]
Collaboration diagram for CEPlanet:
Collaboration graph
[legend]

Constructor & Destructor Documentation

◆ CEPlanet() [1/3]

CEPlanet::CEPlanet ( )

Default constructor.

Definition at line 141 of file CEPlanet.cpp.

◆ CEPlanet() [2/3]

CEPlanet::CEPlanet ( const std::string &  name,
const CEAngle xcoord,
const CEAngle ycoord,
const CESkyCoordType coord_type = CESkyCoordType::CIRS 
)

Primary constructor.

Parameters
[in]nameSome identifying name for this object
[in]xcoordX-coordinate
[in]ycoordY-coordinate
[in]coord_typeCoordinate system for passed coordinates

Definition at line 155 of file CEPlanet.cpp.

◆ CEPlanet() [3/3]

CEPlanet::CEPlanet ( const CEPlanet other)

Copy constructor.

Parameters
[in]otherCEPlanet object to copy from

Definition at line 170 of file CEPlanet.cpp.

◆ ~CEPlanet()

CEPlanet::~CEPlanet ( )
virtual

Destructor.

Definition at line 181 of file CEPlanet.cpp.

Member Function Documentation

◆ Albedo()

double CEPlanet::Albedo ( )
inline
Returns
Albedo.

Definition at line 240 of file CEPlanet.h.

◆ Algorithm()

CEPlanetAlgo CEPlanet::Algorithm ( void  ) const
inline
Returns
Algorithm used for computing the planet position

Definition at line 210 of file CEPlanet.h.

◆ ComputeElement()

double CEPlanet::ComputeElement ( double  value,
double  value_derivative_,
double  time 
) const
inlineprivate

Compute current value of a given element.

Parameters
[in]valueOnce of the orbital property values
[in]value_derivative_Time derivative of 'value'
[in]timeDays since J2000 epoch

Definition at line 440 of file CEPlanet.h.

◆ copy_members()

void CEPlanet::copy_members ( const CEPlanet other)
private

Copy data members from another CEPlanet object.

Parameters
[in]otherCEPlanet object to copy from

Sofa planet id (note: 3.5 implies the earth-center which uses a different method than the other planets)

Definition at line 913 of file CEPlanet.cpp.

◆ Earth()

CEPlanet CEPlanet::Earth ( )
static

Returns an object representing Earth.

Returns
CEPlanet object representing Earth

Definition at line 261 of file CEPlanet.cpp.

◆ EarthDist_AU()

double CEPlanet::EarthDist_AU ( const CEDate date)
virtual

Return the distance to Earth for this planet at a given UTC date.

Parameters
[in]dateDate of observation
Returns
Distance in AU to the Earth's center

Definition at line 591 of file CEPlanet.cpp.

◆ EccentricAnomoly()

double CEPlanet::EccentricAnomoly ( double &  M,
double &  e,
double &  En,
double &  del_E 
) const
private

Recursive method for computing the eccentric anomoly.

Parameters
[in]MMean anomoly
[in]eComputed eccentricity for given date
[in]EnN-th computed eccentric anomoly
[in]del_EJust used to prevent the need to allocate memory each loop

Definition at line 850 of file CEPlanet.cpp.

◆ EMBarycenter()

CEPlanet CEPlanet::EMBarycenter ( )
static

Returns an object representing the Earth-Moon barycenter.

Returns
CEPlanet object representing the Earth-Moon barycenter

Definition at line 287 of file CEPlanet.cpp.

◆ free_members()

void CEPlanet::free_members ( void  )
private

Free allocated memory.

Definition at line 1030 of file CEPlanet.cpp.

◆ GetVxICRS()

double CEPlanet::GetVxICRS ( )
inline

X velocity relative to solar system barycenter (AU/day)

Definition at line 360 of file CEPlanet.h.

◆ GetVyICRS()

double CEPlanet::GetVyICRS ( )
inline

Y velocity relative to solar system barycenter (AU/day)

Definition at line 370 of file CEPlanet.h.

◆ GetVzICRS()

double CEPlanet::GetVzICRS ( )
inline

Z velocity relative to solar system barycenter (AU/day)

Definition at line 380 of file CEPlanet.h.

◆ GetXICRS()

double CEPlanet::GetXICRS ( )
inline

Return X distance from solar system barycenter (AU)

Definition at line 320 of file CEPlanet.h.

◆ GetYICRS()

double CEPlanet::GetYICRS ( )
inline

Y distance from solar system barycenter (AU)

Definition at line 330 of file CEPlanet.h.

◆ GetZICRS()

double CEPlanet::GetZICRS ( )
inline

Z distance from solar system barycenter (AU)

Definition at line 340 of file CEPlanet.h.

◆ init_members()

void CEPlanet::init_members ( void  )
private

Initialize data members.

Definition at line 974 of file CEPlanet.cpp.

◆ Jupiter()

CEPlanet CEPlanet::Jupiter ( )
static

Returns an object representing Jupiter.

Returns
CEPlanet object representing Jupiter

Definition at line 335 of file CEPlanet.cpp.

◆ Mars()

CEPlanet CEPlanet::Mars ( )
static

Returns an object representing Mars.

Returns
CEPlanet object representing Mars

Definition at line 308 of file CEPlanet.cpp.

◆ Mass_kg()

double CEPlanet::Mass_kg ( )
inline
Returns
Mass in kilograms.

Definition at line 230 of file CEPlanet.h.

◆ MeanAnomaly()

double CEPlanet::MeanAnomaly ( double  mean_longitude_deg,
double  perihelion_long_deg,
double  T = 0.0 
) const
private

Computes the mean anomaly.

Parameters
[in]mean_longitude_degMean longitude of the planet (degrees)
[in]perihelion_lon_degLongitude at perihelion (degrees)
[in]TEphemeris time
Returns
Mean anomaly

Definition at line 829 of file CEPlanet.cpp.

◆ Mercury()

CEPlanet CEPlanet::Mercury ( )
static

Returns an object representing Mercury.

Returns
CEPlanet object representing Mercury

Definition at line 211 of file CEPlanet.cpp.

◆ Neptune()

CEPlanet CEPlanet::Neptune ( )
static

Returns an object representing Neptune.

Returns
CEPlanet object representing Neptune

Definition at line 419 of file CEPlanet.cpp.

◆ ObservedCoords()

CESkyCoord CEPlanet::ObservedCoords ( const CEDate date,
const CEObserver observer 
) const
virtual

Get the observed coordinates for a given observer/date.

Parameters
[in]dateDate of observation
[in]observerObserver
Returns
Observed coordinates

Reimplemented from CEBody.

Definition at line 639 of file CEPlanet.cpp.

◆ operator=()

CEPlanet & CEPlanet::operator= ( const CEPlanet other)

Copy assignment operator.

Parameters
[in]otherCEPlanet object to be copied
Returns
Reference to this object post-copy

Definition at line 193 of file CEPlanet.cpp.

◆ Pluto()

CEPlanet CEPlanet::Pluto ( )
static

Returns an object representing Pluto.

Note that Pluto's position cannot be computed via the SOFA algorithms

Returns
CEPlanet object representing Pluto

Definition at line 448 of file CEPlanet.cpp.

◆ PositionICRS()

std::vector< double > CEPlanet::PositionICRS ( void  ) const
inline

Z distance from solar system barycenter (AU)

Definition at line 350 of file CEPlanet.h.

◆ PositionICRS_Obs()

std::vector< double > CEPlanet::PositionICRS_Obs ( const CEDate date) const

Get the observed position on a given date.

Parameters
[in]dateDate of observation
[in]observerObserver
Returns
Observed coordinates

Definition at line 616 of file CEPlanet.cpp.

◆ Radius_m()

double CEPlanet::Radius_m ( )
inline
Returns
Radius in meters.

Definition at line 220 of file CEPlanet.h.

◆ Saturn()

CEPlanet CEPlanet::Saturn ( )
static

Returns an object representing Saturn.

Returns
CEPlanet object representing Saturn

Definition at line 363 of file CEPlanet.cpp.

◆ SetAlbedo()

void CEPlanet::SetAlbedo ( double  new_albedo)
inline
Parameters
[in]new_albedoNew Albedo

Definition at line 270 of file CEPlanet.h.

◆ SetAlgorithm()

void CEPlanet::SetAlgorithm ( const CEPlanetAlgo new_algo)
inline

Set the desired planet computation algorithm.

Parameters
[in]new_algoAlgorithm for computing planet spatial parameters

Definition at line 425 of file CEPlanet.h.

◆ SetAscendingNodeLongitude()

void CEPlanet::SetAscendingNodeLongitude ( double  ascending_node_lon,
double  ascending_node_lon_per_cent = 0.0,
CEAngleType  angle_type = CEAngleType::DEGREES 
)
virtual

Set the longitude of the ascending node.

Parameters
[in]ascending_node_lonLongitude of the ascending node
[in]ascending_node_lon_per_centTime derivative of longitude of the ascending node (/century)
[in]angle_typeAngle type for provided values (DEGREES or RADIANS)

Definition at line 571 of file CEPlanet.cpp.

◆ SetEccentricity()

void CEPlanet::SetEccentricity ( double  eccentricity,
double  eccentricity_per_cent = 0.0 
)
virtual

Set the eccentricity.

Parameters
[in]eccentricityEccentricity (0 -> 1)
[in]eccentricity_per_centTime derivative of eccentricity (/century)

Definition at line 497 of file CEPlanet.cpp.

◆ SetExtraTerms()

void CEPlanet::SetExtraTerms ( double  b,
double  c,
double  s,
double  f 
)
inlinevirtual

Definition at line 398 of file CEPlanet.h.

◆ SetInclination()

void CEPlanet::SetInclination ( double  inclination,
double  inclination_per_cent = 0.0,
CEAngleType  angle_type = CEAngleType::DEGREES 
)
virtual

Set the inclination angle of the planets orbit.

Parameters
[in]inclinationInclination angle (units of 'angle_type')
[in]inclination_per_centTime derivative of the inclination (angle/century)
[in]angle_typeAngle type for above values (DEGREES or RADIANS)

Definition at line 511 of file CEPlanet.cpp.

◆ SetMass_kg()

void CEPlanet::SetMass_kg ( double  new_mass)
inline
Parameters
[in]new_massNew mass (kilograms)

Definition at line 260 of file CEPlanet.h.

◆ SetMeanLongitude()

void CEPlanet::SetMeanLongitude ( double  mean_longitude,
double  mean_longitude_per_cent = 0.0,
CEAngleType  angle_type = CEAngleType::DEGREES 
)
virtual

Set the mean longitude.

Parameters
[in]mean_longitudeMean longitude (units of 'angle_type')
[in]mean_longitude_per_centTime Derivative of mean longitude (/century)
[in]angle_typeAngle type for provided values (DEGREES or RADIANS)

Definition at line 531 of file CEPlanet.cpp.

◆ SetMeanRadius_m()

void CEPlanet::SetMeanRadius_m ( double  new_radius)
inline
Parameters
[in]new_radiusNew radius (meters)

Definition at line 250 of file CEPlanet.h.

◆ SetPerihelionLongitude()

void CEPlanet::SetPerihelionLongitude ( double  perihelion_lon,
double  perihelion_lon_per_cent = 0.0,
CEAngleType  angle_type = CEAngleType::DEGREES 
)
virtual

Set the longitude at perihelion.

Parameters
[in]perihelion_lonLongitude at perihelion
[in]perihelion_lon_per_centTime derivative of longitude at perihelion (/century)
[in]angle_typeAngle type for provided values (DEGREES or RADIANS)

Definition at line 551 of file CEPlanet.cpp.

◆ SetReference()

void CEPlanet::SetReference ( CEPlanet reference)
virtual

Set the reference object for computing more accurate RA,Dec values.

Parameters
[in]referenceReference object (i.e. planet where the observer is located

Definition at line 878 of file CEPlanet.cpp.

◆ SetSemiMajorAxis_AU()

void CEPlanet::SetSemiMajorAxis_AU ( double  semi_major_axis_au,
double  semi_major_axis_au_per_cent = 0.0 
)
virtual

Set the semi-major axis (in AU) and it's derivative.

Parameters
[in]semi_major_axis_auSemi-major axis (units of AU)
[in]semi_major_axis_au_per_centTime derivative of semi-major axis (AU/century)

Definition at line 479 of file CEPlanet.cpp.

◆ SetSofaID()

void CEPlanet::SetSofaID ( const double &  new_id)

Set the sofa planet id (note, only values from 1-8 are acceptable)

Parameters
[in]new_idNew planet ID

Definition at line 898 of file CEPlanet.cpp.

◆ SetTolerance()

void CEPlanet::SetTolerance ( double  tol = 1.0e-6)
inlinevirtual

Set the tolerance for the eccentric anomoly recursive formula.

Parameters
[in]tolTolerance (degrees)

Definition at line 413 of file CEPlanet.h.

◆ Update_JPL()

void CEPlanet::Update_JPL ( double  new_jd = -1.0e30) const
virtual

Recomputes the coordinates of the planet based on the date using the keplerian method outlined by JPL.

Parameters
[in]new_jdJulian date

Definition at line 773 of file CEPlanet.cpp.

◆ Update_SOFA()

void CEPlanet::Update_SOFA ( double  new_jd = -1.0e30) const
virtual

Recomputes the coordinates of the planet based on the date using the methods included in the sofa package (iauPlan94).

Note that this method is currently more accurate than the JPL method implementated in this class.

Parameters
[in]new_jdJulian date

Definition at line 728 of file CEPlanet.cpp.

◆ UpdateCoordinates()

void CEPlanet::UpdateCoordinates ( double  new_jd = -1.0e30) const
virtual

Recomputes the coordinates of the planet if the date has changed from the last time the coordinates were computed.

Parameters
[in]new_jdJulian date

Definition at line 677 of file CEPlanet.cpp.

◆ UpdatePosition()

void CEPlanet::UpdatePosition ( const double &  jd) const
private

Recomputes the spatial position for a planet based on chosen algorithm.

Parameters
[in]jdJulian date

Definition at line 708 of file CEPlanet.cpp.

◆ Uranus()

CEPlanet CEPlanet::Uranus ( )
static

Returns an object representing Uranus.

Returns
CEPlanet object representing Uranus

Definition at line 391 of file CEPlanet.cpp.

◆ VelocityICRS()

std::vector< double > CEPlanet::VelocityICRS ( void  ) const
inline

Vector of velocities relative to solar system barycenter (AU/day)

Definition at line 390 of file CEPlanet.h.

◆ Venus()

CEPlanet CEPlanet::Venus ( )
static

Returns an object representing Venus.

Returns
CEPlanet object representing Venus

Definition at line 236 of file CEPlanet.cpp.

◆ XCoordinate_Deg()

double CEPlanet::XCoordinate_Deg ( double  new_date = -1.0e30) const
inlinevirtual

Definition at line 289 of file CEPlanet.h.

◆ XCoordinate_Rad()

double CEPlanet::XCoordinate_Rad ( double  new_date = -1.0e30) const
inlinevirtual

Definition at line 279 of file CEPlanet.h.

◆ YCoordinate_Deg()

double CEPlanet::YCoordinate_Deg ( double  new_date = -1.0e30) const
inlinevirtual

Definition at line 309 of file CEPlanet.h.

◆ YCoordinate_Rad()

double CEPlanet::YCoordinate_Rad ( double  new_date = -1.0e30) const
inlinevirtual

Definition at line 299 of file CEPlanet.h.

Member Data Documentation

◆ albedo_

double CEPlanet::albedo_
private

Albedo (0 -> 1)

Definition at line 151 of file CEPlanet.h.

◆ algorithm_type_

CEPlanetAlgo CEPlanet::algorithm_type_
private

Definition at line 158 of file CEPlanet.h.

◆ ascending_node_lon_deg_

double CEPlanet::ascending_node_lon_deg_
private

Omega - Longitude of ascending node (radians)

Definition at line 178 of file CEPlanet.h.

◆ ascending_node_lon_deg_per_cent_

double CEPlanet::ascending_node_lon_deg_per_cent_
private

Definition at line 186 of file CEPlanet.h.

◆ b_

double CEPlanet::b_
private

Definition at line 192 of file CEPlanet.h.

◆ c_

double CEPlanet::c_
private

Definition at line 193 of file CEPlanet.h.

◆ cached_jd_

double CEPlanet::cached_jd_
mutableprivate

Julian date of the current coordinates.

Definition at line 165 of file CEPlanet.h.

◆ E_tol

double CEPlanet::E_tol = 1.0e-6
private

Definition at line 189 of file CEPlanet.h.

◆ eccentricity_

double CEPlanet::eccentricity_
private

e - Eccentricity

Definition at line 174 of file CEPlanet.h.

◆ eccentricity_per_cent_

double CEPlanet::eccentricity_per_cent_
private

Definition at line 182 of file CEPlanet.h.

◆ f_

double CEPlanet::f_
private

Definition at line 195 of file CEPlanet.h.

◆ inclination_deg_

double CEPlanet::inclination_deg_
private

I - inclination in radians.

Definition at line 175 of file CEPlanet.h.

◆ inclination_deg_per_cent_

double CEPlanet::inclination_deg_per_cent_
private

Definition at line 183 of file CEPlanet.h.

◆ mass_kg_

double CEPlanet::mass_kg_
private

Mass (kilograms)

Definition at line 150 of file CEPlanet.h.

◆ mean_longitude_deg_

double CEPlanet::mean_longitude_deg_
private

L - Mean longitude (radians)

Definition at line 176 of file CEPlanet.h.

◆ mean_longitude_deg_per_cent_

double CEPlanet::mean_longitude_deg_per_cent_
private

Definition at line 184 of file CEPlanet.h.

◆ perihelion_lon_deg_

double CEPlanet::perihelion_lon_deg_
private

w - Longitude of perihelion (radians)

Definition at line 177 of file CEPlanet.h.

◆ perihelion_long_deg_per_cent_

double CEPlanet::perihelion_long_deg_per_cent_
private

Definition at line 185 of file CEPlanet.h.

◆ pos_icrs_

std::vector<double> CEPlanet::pos_icrs_
mutableprivate

XYZ position (AU) relative to solar system barycenter.

Definition at line 166 of file CEPlanet.h.

◆ radius_m_

double CEPlanet::radius_m_
private

Radius (in meters)

Definition at line 149 of file CEPlanet.h.

◆ reference_

CEPlanet* CEPlanet::reference_
private

Definition at line 155 of file CEPlanet.h.

◆ s_

double CEPlanet::s_
private

Definition at line 194 of file CEPlanet.h.

◆ semi_major_axis_au_

double CEPlanet::semi_major_axis_au_
private

a - Semi major axis in Astronomical Units (AU)

Definition at line 173 of file CEPlanet.h.

◆ semi_major_axis_au_per_cent_

double CEPlanet::semi_major_axis_au_per_cent_
private

Definition at line 181 of file CEPlanet.h.

◆ sofa_planet_id_

double CEPlanet::sofa_planet_id_
private

Sofa planet id (note: 3.5 implies the earth-center which uses a different method than the other planets)

Definition at line 161 of file CEPlanet.h.

◆ vel_icrs_

std::vector<double> CEPlanet::vel_icrs_
mutableprivate

XYZ velocity (AU/day) relative to solar system barycenter.

Definition at line 168 of file CEPlanet.h.


The documentation for this class was generated from the following files:
CEPlanet::Uranus
static CEPlanet Uranus()
Returns an object representing Uranus.
Definition: CEPlanet.cpp:391
CEDate
Definition: CEDate.h:43
CEPlanet::Mercury
static CEPlanet Mercury()
Returns an object representing Mercury.
Definition: CEPlanet.cpp:211
CEPlanet::Pluto
static CEPlanet Pluto()
Returns an object representing Pluto.
Definition: CEPlanet.cpp:448
CEPlanet::Mars
static CEPlanet Mars()
Returns an object representing Mars.
Definition: CEPlanet.cpp:308
CEPlanet::Neptune
static CEPlanet Neptune()
Returns an object representing Neptune.
Definition: CEPlanet.cpp:419
CEAngleType::DEGREES
CEPlanet::Venus
static CEPlanet Venus()
Returns an object representing Venus.
Definition: CEPlanet.cpp:236
CEPlanet
Definition: CEPlanet.h:35
CEPlanet::Saturn
static CEPlanet Saturn()
Returns an object representing Saturn.
Definition: CEPlanet.cpp:363
GREGORIAN
Gregorian calendar (year, month, day)
Definition: CEDate.h:58
CEObserver
Definition: CEObserver.h:28
CEObservation
Definition: CEObservation.h:33
CEDate::SetDate
virtual void SetDate(const double &date=CurrentJD(), const CEDateType &time_format=CEDateType::JD)
Set the date based on an actual date and the desired time_format.
Definition: CEDate.cpp:107
CEPlanet::Jupiter
static CEPlanet Jupiter()
Returns an object representing Jupiter.
Definition: CEPlanet.cpp:335