INDI Alignment Layer
0.0
|
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>
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. |
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.
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.
Default constructor
Definition at line 13 of file AlignmentDatabase.cpp.
CAlignmentDatabase::~CAlignmentDatabase | ( | ) | [virtual] |
Default destructor
Definition at line 26 of file AlignmentDatabase.cpp.
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.
ReferenceTime | |
RightAscension | Catalogue/Actual Right Ascension of the observed object (Decimal Hours). |
Declination | Catalogue/Actual Declination of the observed object (Decimal Degrees). |
Axis1 | Measured angle of the polar or azimuth axis (Format depends on the LowerCoordinateSystemUnits flag) |
Axis2 | Measured angle of the declination or altitude axis (Format depends on the LowerCoordinateSystemUnits flag) |
Recalculate | If true recalculate the database after the point has been inserted. |
Definition at line 31 of file AlignmentDatabase.cpp.
bool CAlignmentDatabase::Append | ( | const std::string & | Filename | ) |
Append entries to the current alignment point database.
Filename | Name of file to append from. |
Definition at line 407 of file AlignmentDatabase.cpp.
bool CAlignmentDatabase::Load | ( | const std::string & | Filename | ) |
Load the cuurent alignment point database overwriting current contents.
Filename | Name of file to load from. |
Definition at line 374 of file AlignmentDatabase.cpp.
Recalculate the database.
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.
Filename | Name of file to save to. |
Definition at line 356 of file AlignmentDatabase.cpp.
void CAlignmentDatabase::SetLowerCoordinateSystemUnits | ( | CoordinateSystemUnits | Units | ) | [inline] |
Set the units for the lower layer coordinate system.
Units | The 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.
Axis1 | Lower layer polar or azimuth axis angle (Format depends on the LowerCoordinateSystemUnits flag) |
Axis2 | Lower layer declination or altitude axis angle (Format depends on the LowerCoordinateSystemUnits flag) |
RightAscension | Parameter to receive the Upper layer Right Ascension (Decimal Hours). |
Declination | Parameter to receive the Upper layer Declination (Decimal Degrees). |
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.
RightAscension | Upper layer Right Ascension (Decimal Hours). |
Declination | Upper layer Declination (Decimal Degrees). |
Axis1 | Parameter to receive the transformed lower layer polar or azimuth axis angle (Format depends on the LowerCoordinateSystemUnits flag) |
Axis2 | Parameter to receive the transformed lower layer declination or altitude axis angle (Format depends on the LowerCoordinateSystemUnits flag) |
Definition at line 163 of file AlignmentDatabase.cpp.