Loading...
Searching...
No Matches
casacore::Nutation Class Reference
measures package (libcasa_measures) » Measures_module

More...

`#include <Nutation.h>`

## Public Types

enum | NutationTypes { NONE , IAU1980 , B1950 , IAU2000A , IAU2000B , IAU2000 , STANDARD }
| Types of known Nutation calculations (at 1995/09/04 STANDARD == IAU1980, after 2004/01/01 it will be IAU2000B)). More...

## Public Member Functions

| Nutation ()
| Default constructor, generates default J2000 Nutation identification.
| Nutation (const Nutation &other)
| Copy constructor.
| Nutation (NutationTypes type)
| Constructor with type.
Nutation & | operator= (const Nutation &other)
| Copy assignment.
| ~Nutation ()
const Euler & | operator() (Double epoch)
| Return the Nutation angles.
const Euler & | derivative (Double epoch)
| Return derivative of Nutation (d-1).
void | init ()
| Re-initialise Nutation object.
void | init (NutationTypes type)
void | refresh ()
| Refresh calculations.
Double | eqox (Double epoch)
| Get the equation of equinox.
Quantity | getEqoxAngle (Double epoch)
Quantity | getEqoxAngle (Double epoch, const Unit &unit)
Double | derivativeEqox (Double epoch)
| Get the derivative of the equation of equinoxes in d-1.
Double | eqoxCT (Double epoch)
| Get the complimentary terms of the equation of equinoxes.
Double | derivativeEqoxCT (Double epoch)
| Get the derivative of the complimentary terms of the equation of equinoxes.

## Static Public Attributes

static const Double | INTV
| Interval to be used for linear approximation (in days).

## Private Member Functions

void | copy (const Nutation &other)
| Make a copy.
void | fill ()
| Fill an empty copy.
void | calcNut (Double t, Bool calcDer=False)
| Calculate Nutation angles for time t; also derivatives if True given.

## Static Private Member Functions

static void | load_static_values ()

## Private Attributes

NutationTypes | method_p
| Method to be used.
Double | checkEpoch_p
| Check epoch for linear approximation.
Double | checkDerEpoch_p
| Check epoch for calculation of derivatives.
Double | nval_p [3]
| Cached calculated angles.
Double | dval_p [3]
| Cached derivatives.
Double | eqeq_p
| Cached equation of equinoxes.
Double | deqeq_p
| Cached derivative equation of equinoxes.
Double | neval_p
| Cached complimentary terms equation of equinoxes.
Double | deval_p
| Cached derivative of complimentary terms equation of equinoxes.
Int | lres_p
| To be able to use references rather than copies, and also to use these references in simple (up to 4 terms of Nutation results) expressions, results are calculated in circulating buffer.
Euler | result_p [4]
| Last calculation.

## Static Private Attributes

static uInt | myInterval_reg
| Interpolation interval.
static uInt | myUseiers_reg
| IERS use.
static uInt | myUsejpl_reg
| JPL use.
static std::once_flag | once_flag_

## Detailed Description

Nutation class and calculations

### Intended use:

Public interface

### Review Status

Reviewed By:
  Tim Cornwell
Date Reviewed:
  1996/07/01
Test programs:
  tMeasMath

### Prerequisite

- Measure class
- Euler
- MeasData class for constants

### Etymology

Nutation

### Synopsis

Nutation forms the class for Nutation calculations. It is a simple container with the selected method, and the mean epoch. It acts as a cache for values and their derivatives, to enable fast calculations for time epochs close together (see the aipsrc variable measures.nutation.d_interval).

The calculation method is selected from one of the following:

- Nutation::STANDARD (at 1995/09/04 the IAU1980 definition, from 2004/01/01 IAU2000B)
- Nutation::NONE (nutation of zero returned)
- Nutation::IAU1980
- Nutation::B1950
- Nutation::IAU2000
- Nutation::IAU2000A (equal to the full precision (uas) IAU2000)
- Nutation::IAU2000B (official lower precision (mas) of IAU2000)

Epochs can be specified as the MJD (with defined constants MeasData::MJD2000 and MeasData::MJDB1950 or the actual MJD), leading to the following constructors:

- Nutation() default; assuming STANDARD
- Nutation(method)

Actual Nutation for a certain Epoch is calculated by the () operator as Nutation(epoch), with epoch Double MJD. Values are returned as an Euler. The derivative (d-1) can be obtained as well by derivative(epoch).
A Nutation can be re-initialed with a different method and/or zero epoch with the init() functions (same format as constructors). To bypass the full calculation actual returned values are calculated using the derivative if within about 2 hours (error less than about 10-5 mas). A call to refresh() will re-initiate calculations from scratch.
The following details can be set with the Aipsrc mechanism:

- measures.nutation.d_interval: approximation interval as time (fraction of days is default unit) over which linear approximation is used (default 0.04d (about 1 hour)).
- measures.nutation.b_usejpl: use the JPL database nutations for IAU1980. 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)
- measures.nutation.b_useiers: use the IERS Database nutation corrections for IAU1980 (default False)

### Example

#include <casacore/measures/Measures.h>
MVDirection pos(Quantity(10,"degree"),Quantity(-10.5,"degree"));
// direction RA=10; DEC=-10.5
Nutation mine(Nutation::IAU1980); // define nutation type
RotMatrix rotat(mine(45837.0)); // rotation matrix for 84/05/17
MVDirection new = rotat*pos; // apply nutation
casacore::MVDirection
Definition MVDirection.h:105
casacore::Nutation::Nutation
Nutation()
Default constructor, generates default J2000 Nutation identification.
casacore::Nutation::IAU1980
@ IAU1980
Definition Nutation.h:148
casacore::RotMatrix
Definition RotMatrix.h:84
casacore::Quantity
Quantum< Double > Quantity
Definition Quantum.h:39

The normal way to use Nutation is by using the MeasConvert class.

### Motivation

To calculate the Nutation angles. 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

- Correct deval_p (derivative complimentary eqox terms)
- Improve speed by a bit more lazyness in derivative calculations and separate eqox calculations

Definition at line 138 of file Nutation.h.

## Member Enumeration Documentation

## NutationTypes

enum casacore::Nutation::NutationTypes

Types of known Nutation calculations (at 1995/09/04 STANDARD == IAU1980, after 2004/01/01 it will be IAU2000B)).

Enumerator
NONE |
IAU1980 |
B1950 |
IAU2000A |
IAU2000B |
IAU2000 |
STANDARD |

Definition at line 147 of file Nutation.h.

## Constructor & Destructor Documentation

## Nutation() [1/3]

casacore::Nutation::Nutation | ( |  | ) |

Default constructor, generates default J2000 Nutation identification.

Referenced by copy(), Nutation(), and operator=().

## Nutation() [2/3]

casacore::Nutation::Nutation | ( | const Nutation & | other | ) |

Copy constructor.

References Nutation().

## Nutation() [3/3]

casacore::Nutation::Nutation | ( | NutationTypes | type | ) |

explicit

Constructor with type.

## ~Nutation()

casacore::Nutation::~Nutation | ( |  | ) |

## Member Function Documentation

## calcNut()

void casacore::Nutation::calcNut | ( | Double | t,
|  | Bool | calcDer = False )

private

Calculate Nutation angles for time t; also derivatives if True given.

References casacore::False.

## copy()

void casacore::Nutation::copy | ( | const Nutation & | other | ) |

private

Make a copy.

References Nutation().

## derivative()

const Euler & casacore::Nutation::derivative | ( | Double | epoch | ) |

Return derivative of Nutation (d-1).

## derivativeEqox()

Double casacore::Nutation::derivativeEqox | ( | Double | epoch | ) |

Get the derivative of the equation of equinoxes in d-1.

## derivativeEqoxCT()

Double casacore::Nutation::derivativeEqoxCT | ( | Double | epoch | ) |

Get the derivative of the complimentary terms of the equation of equinoxes.

## eqox()

Double casacore::Nutation::eqox | ( | Double | epoch | ) |

Get the equation of equinox.

## eqoxCT()

Double casacore::Nutation::eqoxCT | ( | Double | epoch | ) |

Get the complimentary terms of the equation of equinoxes.

## fill()

void casacore::Nutation::fill | ( |  | ) |

private

Fill an empty copy.

## getEqoxAngle() [1/2]

Quantity casacore::Nutation::getEqoxAngle | ( | Double | epoch | ) |

## getEqoxAngle() [2/2]

Quantity casacore::Nutation::getEqoxAngle | ( | Double | epoch,
|  | const Unit & | unit )

## init() [1/2]

void casacore::Nutation::init | ( |  | ) |

Re-initialise Nutation object.

## init() [2/2]

void casacore::Nutation::init | ( | NutationTypes | type | ) |

## load_static_values()

void casacore::Nutation::load_static_values | ( |  | ) |

static private

## operator()()

const Euler & casacore::Nutation::operator() | ( | Double | epoch | ) |

Return the Nutation angles.

## operator=()

Nutation & casacore::Nutation::operator= | ( | const Nutation & | other | ) |

Copy assignment.

References Nutation().

## refresh()

void casacore::Nutation::refresh | ( |  | ) |

Refresh calculations.

## Member Data Documentation

## checkDerEpoch_p

Double casacore::Nutation::checkDerEpoch_p

private

Check epoch for calculation of derivatives.

Definition at line 203 of file Nutation.h.

## checkEpoch_p

Double casacore::Nutation::checkEpoch_p

private

Check epoch for linear approximation.

Definition at line 201 of file Nutation.h.

## deqeq_p

Double casacore::Nutation::deqeq_p

private

Cached derivative equation of equinoxes.

Definition at line 211 of file Nutation.h.

## deval_p

Double casacore::Nutation::deval_p

private

Cached derivative of complimentary terms equation of equinoxes.

Definition at line 215 of file Nutation.h.

## dval_p

Double casacore::Nutation::dval_p[3]

private

Cached derivatives.

Definition at line 207 of file Nutation.h.

## eqeq_p

Double casacore::Nutation::eqeq_p

private

Cached equation of equinoxes.

Definition at line 209 of file Nutation.h.

## INTV

const Double casacore::Nutation::INTV

static

Interval to be used for linear approximation (in days).

Definition at line 142 of file Nutation.h.

## lres_p

Int casacore::Nutation::lres_p

private

To be able to use references rather than copies, and also to use these references in simple (up to 4 terms of Nutation results) expressions, results are calculated in circulating buffer.

Definition at line 219 of file Nutation.h.

## method_p

NutationTypes casacore::Nutation::method_p

private

Method to be used.

Definition at line 199 of file Nutation.h.

## myInterval_reg

uInt casacore::Nutation::myInterval_reg

static private

Interpolation interval.

Definition at line 223 of file Nutation.h.

## myUseiers_reg

uInt casacore::Nutation::myUseiers_reg

static private

IERS use.

Definition at line 225 of file Nutation.h.

## myUsejpl_reg

uInt casacore::Nutation::myUsejpl_reg

static private

JPL use.

Definition at line 227 of file Nutation.h.

## neval_p

Double casacore::Nutation::neval_p

private

Cached complimentary terms equation of equinoxes.

Definition at line 213 of file Nutation.h.

## nval_p

Double casacore::Nutation::nval_p[3]

private

Cached calculated angles.

Definition at line 205 of file Nutation.h.

## once_flag_

std::once_flag casacore::Nutation::once_flag_

inline static private

Definition at line 228 of file Nutation.h.

## result_p

Euler casacore::Nutation::result_p[4]

private

Last calculation.

Definition at line 221 of file Nutation.h.

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

- measures/Measures/Nutation.h