CARMA C++
carma::services::Planet Class Reference

Proposed planet class. More...

#include <carma/services/Planet.h>

Public Member Functions

const Distance avgSunDistance () const
 
const Angle axisAngle () const
 
const Temperature brightnessTemperature (const Frequency &frequency)
 
const Distance earthDistance () const
 
const FluxDensity flux (const Frequency &frequency)
 
const std::string getName () const
 
const Table getTable () const
 
const Angle majorAxis () const
 
const Angle minorAxis () const
 
 Planet (const std::string &planetName)
 Construct a Planet given the name. More...
 
void setLocation (const Location &location)
 Set the location to use in calculations. More...
 
void setMJD (double mjd=carma::util::Time::MJD())
 Set the Modified Julian Date to use in calculations. More...
 
const Angle tiltAngle () const
 
FluxDensity uvFlux (const Frequency &frequency, const Length &u, const Length &v)
 
std::vector< FluxDensity * > uvFluxes (const Frequency &frequency, const std::vector< Length * > &u, const std::vector< Length * > &v)
 
const Velocity velocity (velocityFrameType frameType)
 
virtual ~Planet ()
 Destructor. More...
 

Detailed Description

Proposed planet class.

Note brightnessTemperature() and axis methods will differ from planet to planet. So we would need a way to handle this. Axis aspect ratios are easy since those are constant (if we ignore Saturn's rings). Temperature models are trickier. Could be static arrays or stored in external Tables. Note MIRIAD and BIMA have differing temperature models. These need to be reconciled, pick the best of each.

Definition at line 45 of file Planet.h.

Constructor & Destructor Documentation

carma::services::Planet::Planet ( const std::string &  planetName)
explicit

Construct a Planet given the name.

Parameters
planetNamecase insensitive solar system body name.
Exceptions
SourceNotFoundExceptionif the planet name is not recognized.
virtual carma::services::Planet::~Planet ( )
virtual

Destructor.

Member Function Documentation

const Distance carma::services::Planet::avgSunDistance ( ) const
Returns
the average distance to the planet from the Sun
const Angle carma::services::Planet::axisAngle ( ) const
Returns
The angle of the planetary polar axis with respect to equatorial coordinate system. This is calculated for the apparent RA, DEC of date of the planetary north pole.
See Also
Report of the IAU/IAG Working Group on Cartographic Coordinates and Rotational Elements of the Planets and Satellites:2000, P. K. Seidelmann et al., 2002, Celestial Mechanics & Dynamical Astronomy, 82, 83.
Exceptions
EphemerisExceptionif mjd is not set.
const Temperature carma::services::Planet::brightnessTemperature ( const Frequency frequency)
Returns
The brightness temperature at the given frequency. If a table exists in conf/data of brightness temperature as a function of time and frequency, it will be interpolated at the input frequency and MJD set via setMJD. Otherwise a time-invariant value that is only a power-law function of frequency will be returned.
Parameters
frequencyThe frequency at which to calculate the brightness temperature.
const Distance carma::services::Planet::earthDistance ( ) const
Returns
The distance to the planet from the Earth (geocentric) , at the set MJD
Exceptions
EphemerisExceptionif mjd is not set.
See Also
setMJD(double)
const FluxDensity carma::services::Planet::flux ( const Frequency frequency)
Returns
The flux density at the given frequency.
Parameters
frequencyThe frequency at which to calculate the flux density
const Angle carma::services::Planet::majorAxis ( ) const
Returns
The current distance to the planet from the Sun. Distance sunDistance() const;
The apparent planetary major axis size, at the set MJD
Exceptions
EphemerisExceptionif mjd is not set.
See Also
setMJD(double)
const Angle carma::services::Planet::minorAxis ( ) const
Returns
The apparent planetary minor axis size, at the set MJD.
Exceptions
EphemerisExceptionif mjd is not set.
See Also
setMJD(double)
void carma::services::Planet::setLocation ( const Location location)

Set the location to use in calculations.

The Planet constructor defaults this to CARMA's reference position.

void carma::services::Planet::setMJD ( double  mjd = carma::util::Time::MJD())

Set the Modified Julian Date to use in calculations.

If this method has not been called, all other calculation methods will throw an EphemerisException because the ephemeris mjd has not been set.

Parameters
mjdThe MJD, defaults to current time.
const Angle carma::services::Planet::tiltAngle ( ) const
Returns
the angle of the planetary polar axis with respect to the sky plane.
Exceptions
EphemerisExceptionif mjd is not set.
FluxDensity carma::services::Planet::uvFlux ( const Frequency frequency,
const Length u,
const Length v 
)
Returns
The flux density at the given frequency and visibility point.
Parameters
frequencyThe frequency at which to calculate the flux density
uThe u length of the visibility, e.g. the u-distance between two antennas
vThe v length of the visibility, e.g. the v-distance between two antennas
std::vector<FluxDensity*> carma::services::Planet::uvFluxes ( const Frequency frequency,
const std::vector< Length * > &  u,
const std::vector< Length * > &  v 
)
Returns
A vector of flux density at the associated frequency and visibility point.
Parameters
frequencyThe frequency at which to calculate the flux densities
uThe u length of the visibility, e.g. the u-distance between two antennas
vThe v length of the visibility, e.g. the v-distance between two antennas
const Velocity carma::services::Planet::velocity ( velocityFrameType  frameType)
Returns
the velocity with respect to location
Exceptions
EphemerisExceptionif mjd is not set.

The documentation for this class was generated from the following file: