|
Instrument Neutral Distributed Interface INDI 2.2.5
|
This class implements the common functionality for the built in and SVD math plugins. More...
#include <BasicMathPlugin.h>
Public Member Functions | |
| BasicMathPlugin () | |
| Default constructor. | |
| virtual | ~BasicMathPlugin () |
| Virtual destructor. | |
| virtual bool | Initialise (InMemoryDatabase *pInMemoryDatabase) override |
| Override for the base class virtual function. | |
| virtual bool | TransformCelestialToTelescopeJD (double RightAscension, double Declination, double JulianDate, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override |
| Override for the base class virtual function. | |
| virtual bool | TransformTelescopeToCelestialJD (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianDate) override |
| Override for the base class virtual function. | |
| virtual bool | TransformCelestialToTelescope (const double RightAscension, const double Declination, double JulianOffset, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override |
| Compat shim - resolves JD and delegates to TransformCelestialToTelescopeJD. | |
| virtual bool | TransformTelescopeToCelestial (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianOffset=0) override |
| Compat shim - resolves JD and delegates to TransformTelescopeToCelestialJD. | |
Public Member Functions inherited from INDI::AlignmentSubsystem::AlignmentSubsystemForMathPlugins | |
| virtual | ~AlignmentSubsystemForMathPlugins () |
| Virtual destructor. | |
Public Member Functions inherited from INDI::AlignmentSubsystem::MathPlugin | |
| MathPlugin (MountAlignment_t ApproximateAlignment=ZENITH) | |
| Default constructor. | |
| virtual | ~MathPlugin () |
| Virtual destructor. | |
| virtual MountAlignment_t | GetApproximateMountAlignment () |
| Get the approximate alignment of the mount. | |
| virtual void | SetApproximateMountAlignment (MountAlignment_t ApproximateAlignment) |
| Set the approximate alignment of the mount. | |
Public Member Functions inherited from INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions | |
| virtual | ~TelescopeDirectionVectorSupportFunctions () |
| Virtual destructor. | |
| void | AltitudeAzimuthFromTelescopeDirectionVector (const TelescopeDirectionVector TelescopeDirectionVector, INDI::IHorizontalCoordinates &HorizontalCoordinates) |
| Calculates an altitude and azimuth from the supplied normalised direction vector and declination. | |
| void | EquatorialCoordinatesFromTelescopeDirectionVector (const TelescopeDirectionVector TelescopeDirectionVector, INDI::IEquatorialCoordinates &EquatorialCoordinates) |
| Calculates equatorial coordinates from the supplied telescope direction vector and declination. | |
| void | LocalHourAngleDeclinationFromTelescopeDirectionVector (const TelescopeDirectionVector TelescopeDirectionVector, INDI::IEquatorialCoordinates &EquatorialCoordinates) |
| Calculates a local hour angle and declination from the supplied telescope direction vector and declination. | |
| void | SphericalCoordinateFromTelescopeDirectionVector (const TelescopeDirectionVector TelescopeDirectionVector, double &AzimuthAngle, AzimuthAngleDirection_t AzimuthAngleDirection, double &PolarAngle, PolarAngleDirection_t PolarAngleDirection) |
| Calculates a spherical coordinate from the supplied telescope direction vector. | |
| const TelescopeDirectionVector | TelescopeDirectionVectorFromAltitudeAzimuth (INDI::IHorizontalCoordinates HorizontalCoordinates) |
| Calculates a normalised direction vector from the supplied altitude and azimuth. | |
| const TelescopeDirectionVector | TelescopeDirectionVectorFromEquatorialCoordinates (INDI::IEquatorialCoordinates EquatorialCoordinates) |
| Calculates a telescope direction vector from the supplied equatorial coordinates. | |
| const TelescopeDirectionVector | TelescopeDirectionVectorFromLocalHourAngleDeclination (INDI::IEquatorialCoordinates EquatorialCoordinates) |
| Calculates a telescope direction vector from the supplied local hour angle and declination. | |
| const TelescopeDirectionVector | TelescopeDirectionVectorFromSphericalCoordinate (const double AzimuthAngle, AzimuthAngleDirection_t AzimuthAngleDirection, const double PolarAngle, PolarAngleDirection_t PolarAngleDirection) |
| Calculates a telescope direction vector from the supplied spherical coordinate information. | |
Protected Member Functions | |
| virtual void | CalculateTransformMatrices (const TelescopeDirectionVector &Alpha1, const TelescopeDirectionVector &Alpha2, const TelescopeDirectionVector &Alpha3, const TelescopeDirectionVector &Beta1, const TelescopeDirectionVector &Beta2, const TelescopeDirectionVector &Beta3, gsl_matrix *pAlphaToBeta, gsl_matrix *pBetaToAlpha)=0 |
| Calculate transformation matrices from the supplied vectors. | |
| void | Dump3 (const char *Label, gsl_vector *pVector) |
| Print out a 3 vector to debug. | |
| void | Dump3x3 (const char *Label, gsl_matrix *pMatrix) |
| Print out a 3x3 matrix to debug. | |
| double | Matrix3x3Determinant (gsl_matrix *pMatrix) |
| Calculate the determinant of the supplied matrix. | |
| bool | MatrixInvert3x3 (gsl_matrix *pInput, gsl_matrix *pInversion) |
| Calculate the inverse of the supplied matrix. | |
| void | MatrixMatrixMultiply (gsl_matrix *pA, gsl_matrix *pB, gsl_matrix *pC) |
| Multiply matrix A by matrix B and put the result in C. | |
| void | MatrixVectorMultiply (gsl_matrix *pA, gsl_vector *pB, gsl_vector *pC) |
| Multiply matrix A by vector B and put the result in vector C. | |
| bool | RayTriangleIntersection (TelescopeDirectionVector &Ray, TelescopeDirectionVector &TriangleVertex1, TelescopeDirectionVector &TriangleVertex2, TelescopeDirectionVector &TriangleVertex3) |
| Test if a ray intersects a triangle in 3d space. | |
Protected Attributes | |
| gsl_matrix * | pActualToApparentTransform |
| gsl_matrix * | pApparentToActualTransform |
| ConvexHull | ActualConvexHull |
| ConvexHull | ApparentConvexHull |
| std::vector< TelescopeDirectionVector > | ActualDirectionCosines |
Protected Attributes inherited from INDI::AlignmentSubsystem::MathPlugin | |
| MountAlignment_t | ApproximateMountAlignment |
| Describe the approximate alignment of the mount. This information is normally used in a one star alignment calculation. | |
| InMemoryDatabase * | pInMemoryDatabase |
Additional Inherited Members | |
Public Types inherited from INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions | |
| enum | AzimuthAngleDirection { CLOCKWISE , ANTI_CLOCKWISE } |
| enum | PolarAngleDirection { FROM_POLAR_AXIS , FROM_AZIMUTHAL_PLANE } |
| typedef enum INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions::AzimuthAngleDirection | AzimuthAngleDirection_t |
| typedef enum INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions::PolarAngleDirection | PolarAngleDirection_t |
Static Public Member Functions inherited from INDI::AlignmentSubsystem::MathPlugin | |
| static void | SanitizePolarEntries (InMemoryDatabase *pInMemoryDatabase, MountAlignment_t mountAlignment) |
| Sanitize alignment database entries that are near the pole (EQ) or zenith (altaz). At these singularities the roll-axis (HA or Az) component of the TDV is unconstrained, making any pointing model ill-conditioned. | |
This class implements the common functionality for the built in and SVD math plugins.
Definition at line 23 of file BasicMathPlugin.h.
| INDI::AlignmentSubsystem::BasicMathPlugin::BasicMathPlugin | ( | ) |
Default constructor.
Definition at line 25 of file BasicMathPlugin.cpp.
|
virtual |
Virtual destructor.
Definition at line 33 of file BasicMathPlugin.cpp.
|
protectedpure virtual |
Calculate transformation matrices from the supplied vectors.
| [in] | Alpha1 | Pointer to the first coordinate in the alpha reference frame |
| [in] | Alpha2 | Pointer to the second coordinate in the alpha reference frame |
| [in] | Alpha3 | Pointer to the third coordinate in the alpha reference frame |
| [in] | Beta1 | Pointer to the first coordinate in the beta reference frame |
| [in] | Beta2 | Pointer to the second coordinate in the beta reference frame |
| [in] | Beta3 | Pointer to the third coordinate in the beta reference frame |
| [in] | pAlphaToBeta | Pointer to a matrix to receive the Alpha to Beta transformation matrix |
| [in] | pBetaToAlpha | Pointer to a matrix to receive the Beta to Alpha transformation matrix |
|
protected |
Print out a 3 vector to debug.
| [in] | Label | A label to identify the vector |
| [in] | pVector | The vector to print |
Definition at line 833 of file BasicMathPlugin.cpp.
|
protected |
Print out a 3x3 matrix to debug.
| [in] | Label | A label to identify the matrix |
| [in] | pMatrix | The matrix to print |
Definition at line 839 of file BasicMathPlugin.cpp.
|
overridevirtual |
Override for the base class virtual function.
See how many entries there are in the in memory database.
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
Definition at line 41 of file BasicMathPlugin.cpp.
|
protected |
Calculate the determinant of the supplied matrix.
Use gsl to compute the determinant of a 3x3 matrix.
| [in] | pMatrix | Pointer to the 3x3 matrix |
Definition at line 851 of file BasicMathPlugin.cpp.
|
protected |
Calculate the inverse of the supplied matrix.
Use gsl to compute the inverse of a 3x3 matrix.
| [in] | pInput | Pointer to the input matrix |
| [in] | pInversion | Pointer to a matrix to receive the inversion |
Definition at line 871 of file BasicMathPlugin.cpp.
|
protected |
Multiply matrix A by matrix B and put the result in C.
Use gsl blas support to multiply two matrices together and put the result in a third. For our purposes all the matrices should be 3 by 3.
Definition at line 898 of file BasicMathPlugin.cpp.
|
protected |
Multiply matrix A by vector B and put the result in vector C.
Use gsl blas support to multiply a matrix by a vector and put the result in another vector For our purposes the the matrix should be 3x3 and vector 3.
Definition at line 908 of file BasicMathPlugin.cpp.
|
protected |
Test if a ray intersects a triangle in 3d space.
| [in] | Ray | The ray vector |
| [in] | TriangleVertex1 | The first vertex of the triangle |
| [in] | TriangleVertex2 | The second vertex of the triangle |
| [in] | TriangleVertex3 | The third vertex of the triangle |
Definition at line 916 of file BasicMathPlugin.cpp.
|
overridevirtual |
Compat shim - resolves JD and delegates to TransformCelestialToTelescopeJD.
Implements INDI::AlignmentSubsystem::MathPlugin.
Definition at line 361 of file BasicMathPlugin.cpp.
|
overridevirtual |
Override for the base class virtual function.
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
Definition at line 370 of file BasicMathPlugin.cpp.
|
overridevirtual |
Compat shim - resolves JD and delegates to TransformTelescopeToCelestialJD.
Implements INDI::AlignmentSubsystem::MathPlugin.
Definition at line 598 of file BasicMathPlugin.cpp.
|
overridevirtual |
Override for the base class virtual function.
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
Definition at line 605 of file BasicMathPlugin.cpp.
|
protected |
Definition at line 111 of file BasicMathPlugin.h.
|
protected |
Definition at line 114 of file BasicMathPlugin.h.
|
protected |
Definition at line 112 of file BasicMathPlugin.h.
|
protected |
Definition at line 107 of file BasicMathPlugin.h.
|
protected |
Definition at line 108 of file BasicMathPlugin.h.