14#include <gsl/gsl_matrix.h>
18namespace AlignmentSubsystem
42 double &RightAscension,
double &Declination,
double JulianDate)
override;
51 double &RightAscension,
double &Declination,
double JulianOffset = 0)
override;
67 gsl_matrix *pAlphaToBeta, gsl_matrix *pBetaToAlpha) = 0;
72 void Dump3(
const char *Label, gsl_vector *pVector);
77 void Dump3x3(
const char *Label, gsl_matrix *pMatrix);
This class implements the common functionality for the built in and SVD math plugins.
bool MatrixInvert3x3(gsl_matrix *pInput, gsl_matrix *pInversion)
Calculate the inverse of the supplied matrix.
gsl_matrix * pApparentToActualTransform
gsl_matrix * pActualToApparentTransform
double Matrix3x3Determinant(gsl_matrix *pMatrix)
Calculate the determinant 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.
virtual bool TransformTelescopeToCelestialJD(const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianDate) override
Override for the base class virtual function.
void Dump3(const char *Label, gsl_vector *pVector)
Print out a 3 vector to debug.
virtual bool TransformTelescopeToCelestial(const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianOffset=0) override
Compat shim - resolves JD and delegates to TransformTelescopeToCelestialJD.
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.
std::vector< TelescopeDirectionVector > ActualDirectionCosines
virtual bool TransformCelestialToTelescope(const double RightAscension, const double Declination, double JulianOffset, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override
Compat shim - resolves JD and delegates to TransformCelestialToTelescopeJD.
ConvexHull ActualConvexHull
virtual bool TransformCelestialToTelescopeJD(double RightAscension, double Declination, double JulianDate, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override
Override for the base class virtual function.
void MatrixVectorMultiply(gsl_matrix *pA, gsl_vector *pB, gsl_vector *pC)
Multiply matrix A by vector B and put the result in vector C.
BasicMathPlugin()
Default constructor.
virtual ~BasicMathPlugin()
Virtual destructor.
bool RayTriangleIntersection(TelescopeDirectionVector &Ray, TelescopeDirectionVector &TriangleVertex1, TelescopeDirectionVector &TriangleVertex2, TelescopeDirectionVector &TriangleVertex3)
Test if a ray intersects a triangle in 3d space.
virtual bool Initialise(InMemoryDatabase *pInMemoryDatabase) override
Override for the base class virtual function.
ConvexHull ApparentConvexHull
void Dump3x3(const char *Label, gsl_matrix *pMatrix)
Print out a 3x3 matrix to debug.
This class computes the convex hull of a set of 3d points.
This class provides the driver side API to the in memory alignment database.
InMemoryDatabase * pInMemoryDatabase
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds a normalised direction vector (direction cosines)