SolarPos.h

Classes

SolarPos -- Solar position class and calculations (full description)

class SolarPos

Types

enum SolarPosTypes

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)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
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: 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.

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

enum SolarPosTypes

Types of known SolarPos calculations (at 1995/09/04 STANDARD == IAU1980)

SolarPos()

Default constructor, generates default J2000 SolarPos identification

SolarPos(const SolarPos &other)

Copy constructor

SolarPos(SolarPosTypes type)

Constructor with type

SolarPos &operator=(const SolarPos &other)

Copy assignment

~SolarPos()

const MVPosition&operator()(Double epoch)

Operator () calculates the geocentric Solar Position in AU

const MVPosition &derivative (Double epoch)

Return derivatives of SolarPos (d-1)

const MVPosition &baryEarthDerivative (Double epoch)
const MVPosition &barySunDerivative (Double epoch)

const MVPosition &baryEarth(Double epoch)

Barycentric position of Earth

const MVPosition &barySun(Double epoch)

Barycentric position of Sun

void init()
void init(SolarPosTypes type)

Re-initialise SolarPos object

void refresh()

Refresh calculations

void copy(const SolarPos &other)

Copy

void fill()

Fill an empty copy

void calcEarth(Double t)

Calculate heliocentric Earth position for time t

void calcSun(Double t)

Calculate heliocentric barycentre position