INDI Alignment Layer  0.0
Public Types | Public Member Functions
CAlignmentDatabase Class Reference

Provides functions to maintain an alignment point database and to use the entries in that database to applying correction tranformations to celestial and telescope coordinates. More...

#include <AlignmentDatabase.h>

List of all members.

Public Types

enum  CoordinateSystemUnits
 Describes the units used by lower layer (telescope) coordinates. More...

Public Member Functions

 CAlignmentDatabase ()
virtual ~CAlignmentDatabase ()
void SetLowerCoordinateSystemUnits (CoordinateSystemUnits Units)
 Set the units for the lower layer coordinate system.
bool AddAlignmentPoint (const double ReferenceTime, const double RightAscension, const double Declination, const double Axis1, const double Axis2, bool Recalculate=false)
 Add an alignment point to the database.
bool RecalculateDatabase ()
 Recalculate the database.
bool TransformUpperToLower (const double RightAscension, const double Declination, double &Axis1, double &Axis2)
 Transform a coordinate from the upper layer to a coordinate for the lower layer.
bool TransformLowerToUpper (const double Axis1, const double Axis2, double &RightAscension, double &Declination)
 Transform a coordinate from the lower layer to a coordinate for the upper layer.
bool Save (const std::string &Filename)
 Save the cuurent alignment point database.
bool Load (const std::string &Filename)
 Load the cuurent alignment point database overwriting current contents.
bool Append (const std::string &Filename)
 Append entries to the current alignment point database.

Detailed Description

Provides functions to maintain an alignment point database and to use the entries in that database to applying correction tranformations to celestial and telescope coordinates.

CAlignmentDatabase provides support for maintaining a database of AlignmentPoint entries.

Definition at line 17 of file AlignmentDatabase.h.


Member Enumeration Documentation

Describes the units used by lower layer (telescope) coordinates.

HOURS_DEGREES describes a coordinate system in which the horizontal coordinate is measured in decimal hours in an anticlockwise direction, and the elevation coordinate is measured in decimale degrees. This would be used for a traditional Right Ascension and Declination system.

DEGREES_DEGREES describes a coordinate system where both coordinates are measured in decimal degrees. The first (horizontal) coordinate is assumed to be measured in a clockwise direction.

RADIANS_RADIANS is the same as DEGREES_DEGREES but with the units being decimal radians.

Definition at line 33 of file AlignmentDatabase.h.


Constructor & Destructor Documentation

Default constructor

Definition at line 13 of file AlignmentDatabase.cpp.

Default destructor

Definition at line 26 of file AlignmentDatabase.cpp.


Member Function Documentation

bool CAlignmentDatabase::AddAlignmentPoint ( const double  ReferenceTime,
const double  RightAscension,
const double  Declination,
const double  Axis1,
const double  Axis2,
bool  Recalculate = false 
)

Add an alignment point to the database.

Parameters:
ReferenceTime
RightAscensionCatalogue/Actual Right Ascension of the observed object (Decimal Hours).
DeclinationCatalogue/Actual Declination of the observed object (Decimal Degrees).
Axis1Measured angle of the polar or azimuth axis (Format depends on the LowerCoordinateSystemUnits flag)
Axis2Measured angle of the declination or altitude axis (Format depends on the LowerCoordinateSystemUnits flag)
RecalculateIf true recalculate the database after the point has been inserted.
Returns:
True if successful

Definition at line 31 of file AlignmentDatabase.cpp.

bool CAlignmentDatabase::Append ( const std::string &  Filename)

Append entries to the current alignment point database.

Parameters:
FilenameName of file to append from.
Returns:
True if successful

Definition at line 407 of file AlignmentDatabase.cpp.

bool CAlignmentDatabase::Load ( const std::string &  Filename)

Load the cuurent alignment point database overwriting current contents.

Parameters:
FilenameName of file to load from.
Returns:
True if successful

Definition at line 374 of file AlignmentDatabase.cpp.

Recalculate the database.

Returns:
True if successful
Note:
The routine computes a convex hull made up of triangular facets using the upper layer alignment points and the origin.

For each triangular facet that does not have the origin as one of the vertices, the upper layer vertices of the facet and the corresponding lower layer vertices are used to calculate a downward transformation matrix and its inverse for upward transformation.

For each triangular facet that has the origin as one of the vertices, the same matrices are calculated, but using the cross product of the the other two vertices to provide the thid vertex of the corresponding triangles.

Definition at line 43 of file AlignmentDatabase.cpp.

bool CAlignmentDatabase::Save ( const std::string &  Filename)

Save the cuurent alignment point database.

Parameters:
FilenameName of file to save to.
Returns:
True if successful

Definition at line 356 of file AlignmentDatabase.cpp.

Set the units for the lower layer coordinate system.

Parameters:
UnitsThe CoordinateSystemUnits type to use

Definition at line 42 of file AlignmentDatabase.h.

bool CAlignmentDatabase::TransformLowerToUpper ( const double  Axis1,
const double  Axis2,
double &  RightAscension,
double &  Declination 
)

Transform a coordinate from the lower layer to a coordinate for the upper layer.

Parameters:
Axis1Lower layer polar or azimuth axis angle (Format depends on the LowerCoordinateSystemUnits flag)
Axis2Lower layer declination or altitude axis angle (Format depends on the LowerCoordinateSystemUnits flag)
RightAscensionParameter to receive the Upper layer Right Ascension (Decimal Hours).
DeclinationParameter to receive the Upper layer Declination (Decimal Degrees).
Returns:
True if successful

Definition at line 207 of file AlignmentDatabase.cpp.

bool CAlignmentDatabase::TransformUpperToLower ( const double  RightAscension,
const double  Declination,
double &  Axis1,
double &  Axis2 
)

Transform a coordinate from the upper layer to a coordinate for the lower layer.

Parameters:
RightAscensionUpper layer Right Ascension (Decimal Hours).
DeclinationUpper layer Declination (Decimal Degrees).
Axis1Parameter to receive the transformed lower layer polar or azimuth axis angle (Format depends on the LowerCoordinateSystemUnits flag)
Axis2Parameter to receive the transformed lower layer declination or altitude axis angle (Format depends on the LowerCoordinateSystemUnits flag)
Returns:
True if successful

Definition at line 163 of file AlignmentDatabase.cpp.


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