SolarPos.h
Classes
- SolarPos -- Solar position class and calculations (full description)
Types
- STANDARD
-
- NONE
-
Interface
- Public Members
- SolarPos()
- SolarPos(const SolarPos &other)
- SolarPos(SolarPosTypes type)
- SolarPos &operator=(const SolarPos &other)
- ~SolarPos()
- const MVPosition&operator()(Double epoch)
- const MVPosition &derivative (Double epoch)
- const MVPosition &baryEarthDerivative (Double epoch)
- const MVPosition &barySunDerivative (Double epoch)
- const MVPosition &baryEarth(Double epoch)
- const MVPosition &barySun(Double epoch)
- void init()
- void init(SolarPosTypes type)
- void refresh()
- Private Members
- void copy(const SolarPos &other)
- void fill()
- void calcEarth(Double t)
- void calcSun(Double t)
Review Status
- Date Reviewed:
- yyyy/mm/dd
- Programs:
- Tests:
Prerequisite
Etymology
SolarPos from Solar Position
Synopsis
SolarPos forms the class for Solar Position calculations. It is a simple
container with the selected method, and the mean epoch.
The method is selected from one of the following:
- SolarPos::STANDARD (at 1995/09/04 the IAU1980 definition)
- SolarPos::NONE
Epochs can be specified as the MJD (with defined constants MeasData::MJD2000
and MeasData::MJDB1950 or the actual MJD),
leading to the following constructors:
- SolarPos() default; assuming JD2000, IAU1980
- SolarPos(method) assuming the correct default epoch of
JD2000
- SolarPos(method,epoch) with epoch Double(MJD)
Actual SolarPos for a certain Epoch is calculated by the () operator
as SolarPos(epoch), with epoch Double MJD, as an MVPosition vector.
It returns the geocentric position of the heliocentre in rectangular
coordinates in AU.
The derivative (d-1) can be obtained as well by
derivative(epoch), baryEarthDerivative() and barySunDerivative().
The Earth's and solar barycentric position can be obtained by the
members baryEarth and barySun.
The following details can be set with the
Aipsrc mechanism:
- measures.solarpos.d_interval: approximation interval as time
(fraction of days is default unit) over which linear approximation
is used
- measures.solarpos.b_usejpl: use the JPL database for solar position.
Else analytical expression, relative error about 10-9
Note that the JPL database to be used can be set with
measures.jpl.ephemeris (at the moment of writing DE200 (default),
or DE405)
Reference: M. Soma et al., Cel. Mech. 41 (1988), 389;
E.M. Standish, Astron. Astroph. 114 (1982), 297.
Example
Motivation
To calculate the solar/Earth positions for gravitational deflection.
An alternate route could have been
a global function, but having a simple container allows
caching of some calculations for speed.
Using MJD (JD-2400000.5) rather than JD is for precision reasons.
To Do
Member Description
Types of known SolarPos calculations (at 1995/09/04 STANDARD == IAU1980)
Default constructor, generates default J2000 SolarPos identification
SolarPos(const SolarPos &other)
Copy constructor
Constructor with type
SolarPos &operator=(const SolarPos &other)
Copy assignment
Operator () calculates the geocentric Solar Position in AU
Return derivatives of SolarPos (d-1)
Barycentric position of Earth
Barycentric position of Sun
Re-initialise SolarPos object
Refresh calculations
void copy(const SolarPos &other)
Copy
Fill an empty copy
Calculate heliocentric Earth position for time t
void calcSun(Double t)
Calculate heliocentric barycentre position