casacore
|
#include <SolarPos.h>
Public Types | |
enum | SolarPosTypes { STANDARD , NONE } |
Types of known SolarPos calculations (at 1995/09/04 STANDARD == IAU1980) More... | |
Public Member Functions | |
SolarPos () | |
Default constructor, generates default J2000 SolarPos identification. More... | |
SolarPos (const SolarPos &other) | |
Copy constructor. More... | |
SolarPos (SolarPosTypes type) | |
Constructor with type. More... | |
SolarPos & | operator= (const SolarPos &other) |
Copy assignment. More... | |
~SolarPos () | |
const MVPosition & | operator() (Double epoch) |
Operator () calculates the geocentric Solar Position in AU. More... | |
const MVPosition & | derivative (Double epoch) |
Return derivatives of SolarPos (d-1) More... | |
const MVPosition & | baryEarthDerivative (Double epoch) |
const MVPosition & | barySunDerivative (Double epoch) |
const MVPosition & | baryEarth (Double epoch) |
Barycentric position of Earth. More... | |
const MVPosition & | barySun (Double epoch) |
Barycentric position of Sun. More... | |
void | init () |
Re-initialise SolarPos object. More... | |
void | init (SolarPosTypes type) |
void | refresh () |
Refresh calculations. More... | |
Static Public Attributes | |
static const Double | INTV |
Interval to be used for linear approximation (in days) More... | |
Private Member Functions | |
void | copy (const SolarPos &other) |
Copy. More... | |
void | fill () |
Fill an empty copy. More... | |
void | calcEarth (Double t) |
Calculate heliocentric Earth position for time t. More... | |
void | calcSun (Double t) |
Calculate heliocentric barycentre position. More... | |
Private Attributes | |
SolarPosTypes | method |
Method to be used. More... | |
Double | checkEpoch |
Check epoch for linear approximation. More... | |
Double | checkSunEpoch |
Double | eval [3] |
Cached calculated Earth positions. More... | |
Double | deval [3] |
Cached derivatives. More... | |
Double | sval [3] |
Cached calculated Sun positions. More... | |
Double | dsval [3] |
Cached derivatives. More... | |
Int | lres |
To be able to use references in simple calculations, results are calculated in a circular buffer. More... | |
MVPosition | result [6] |
Last calculation. More... | |
Static Private Attributes | |
static uInt | interval_reg |
Interpolation interval. More... | |
static uInt | usejpl_reg |
JPL use. More... | |
Solar position class and calculations
Public interface
SolarPos from Solar Position
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:
Epochs can be specified as the MJD (with defined constants MeasData::MJD2000 and MeasData::MJDB1950 or the actual MJD), leading to the following constructors:
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:
Reference: M. Soma et al., Cel. Mech. 41 (1988), 389; E.M. Standish, Astron. Astroph. 114 (1982), 297.
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.
Definition at line 111 of file SolarPos.h.
Types of known SolarPos calculations (at 1995/09/04 STANDARD == IAU1980)
Enumerator | |
---|---|
STANDARD | |
NONE |
Definition at line 119 of file SolarPos.h.
casacore::SolarPos::SolarPos | ( | ) |
Default constructor, generates default J2000 SolarPos identification.
casacore::SolarPos::SolarPos | ( | const SolarPos & | other | ) |
Copy constructor.
casacore::SolarPos::SolarPos | ( | SolarPosTypes | type | ) |
Constructor with type.
casacore::SolarPos::~SolarPos | ( | ) |
const MVPosition& casacore::SolarPos::baryEarth | ( | Double | epoch | ) |
Barycentric position of Earth.
const MVPosition& casacore::SolarPos::baryEarthDerivative | ( | Double | epoch | ) |
const MVPosition& casacore::SolarPos::barySun | ( | Double | epoch | ) |
Barycentric position of Sun.
const MVPosition& casacore::SolarPos::barySunDerivative | ( | Double | epoch | ) |
|
private |
Calculate heliocentric Earth position for time t.
|
private |
Calculate heliocentric barycentre position.
|
private |
Copy.
const MVPosition& casacore::SolarPos::derivative | ( | Double | epoch | ) |
Return derivatives of SolarPos (d-1)
|
private |
Fill an empty copy.
void casacore::SolarPos::init | ( | ) |
Re-initialise SolarPos object.
void casacore::SolarPos::init | ( | SolarPosTypes | type | ) |
const MVPosition& casacore::SolarPos::operator() | ( | Double | epoch | ) |
Operator () calculates the geocentric Solar Position in AU.
void casacore::SolarPos::refresh | ( | ) |
Refresh calculations.
|
private |
Check epoch for linear approximation.
Definition at line 164 of file SolarPos.h.
|
private |
Definition at line 165 of file SolarPos.h.
|
private |
Cached derivatives.
Definition at line 169 of file SolarPos.h.
|
private |
Cached derivatives.
Definition at line 173 of file SolarPos.h.
|
private |
Cached calculated Earth positions.
Definition at line 167 of file SolarPos.h.
|
staticprivate |
Interpolation interval.
Definition at line 181 of file SolarPos.h.
|
static |
Interval to be used for linear approximation (in days)
Definition at line 115 of file SolarPos.h.
|
private |
To be able to use references in simple calculations, results are calculated in a circular buffer.
Current buffer pointer
Definition at line 177 of file SolarPos.h.
|
private |
Method to be used.
Definition at line 162 of file SolarPos.h.
|
private |
Last calculation.
Definition at line 179 of file SolarPos.h.
|
private |
Cached calculated Sun positions.
Definition at line 171 of file SolarPos.h.
|
staticprivate |
JPL use.
Definition at line 183 of file SolarPos.h.