Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | List of all members
INDI::AlignmentSubsystem::NearestMathPlugin Class Reference

#include <NearestMathPlugin.h>

Inheritance diagram for INDI::AlignmentSubsystem::NearestMathPlugin:
INDI::AlignmentSubsystem::AlignmentSubsystemForMathPlugins INDI::AlignmentSubsystem::MathPlugin INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions

Public Member Functions

 NearestMathPlugin ()
 
virtual ~NearestMathPlugin ()
 
virtual bool Initialise (InMemoryDatabase *pInMemoryDatabase) override
 Initialise or re-initialise the math plugin. Re-reading the in memory database as necessary.
 
virtual bool TransformCelestialToTelescopeJD (double RightAscension, double Declination, double JulianDate, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override
 Get the alignment corrected telescope pointing direction for the supplied celestial coordinates.
 
virtual bool TransformTelescopeToCelestialJD (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianDate) override
 Get the true celestial coordinates for the supplied telescope pointing direction.
 
virtual bool TransformCelestialToTelescope (const double RightAscension, const double Declination, double JulianOffset, TelescopeDirectionVector &ApparentTelescopeDirectionVector) override
 Get the alignment corrected telescope pointing direction for the supplied celestial coordinates.
 
virtual bool TransformTelescopeToCelestial (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianOffset=0) override
 Get the true celestial coordinates for the supplied telescope pointing direction.
 
- 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.
 

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.
 
- 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
 

Detailed Description

Definition at line 97 of file NearestMathPlugin.h.

Constructor & Destructor Documentation

◆ NearestMathPlugin()

INDI::AlignmentSubsystem::NearestMathPlugin::NearestMathPlugin ( )

Definition at line 62 of file NearestMathPlugin.cpp.

◆ ~NearestMathPlugin()

INDI::AlignmentSubsystem::NearestMathPlugin::~NearestMathPlugin ( )
virtual

Definition at line 70 of file NearestMathPlugin.cpp.

Member Function Documentation

◆ Initialise()

bool INDI::AlignmentSubsystem::NearestMathPlugin::Initialise ( InMemoryDatabase *  pInMemoryDatabase)
overridevirtual

Initialise or re-initialise the math plugin. Re-reading the in memory database as necessary.

Returns
True if successful

Reimplemented from INDI::AlignmentSubsystem::MathPlugin.

Definition at line 78 of file NearestMathPlugin.cpp.

◆ TransformCelestialToTelescope()

bool INDI::AlignmentSubsystem::NearestMathPlugin::TransformCelestialToTelescope ( const double  RightAscension,
const double  Declination,
double  JulianOffset,
TelescopeDirectionVector &  ApparentTelescopeDirectionVector 
)
overridevirtual

Get the alignment corrected telescope pointing direction for the supplied celestial coordinates.

Parameters
[in]RightAscensionRight Ascension (Decimal Hours).
[in]DeclinationDeclination (Decimal Degrees).
[in]JulianOffsetOffset (days) added to ln_get_julian_from_sys() to form the Julian Date.
[out]ApparentTelescopeDirectionVectorParameter to receive the corrected telescope direction
Returns
True if successful
Note
Built-in plugins implement this as a thin shim that resolves the absolute JD and calls TransformCelestialToTelescopeJD. New callers should use TransformCelestialToTelescopeJD directly.

Implements INDI::AlignmentSubsystem::MathPlugin.

Definition at line 135 of file NearestMathPlugin.cpp.

◆ TransformCelestialToTelescopeJD()

bool INDI::AlignmentSubsystem::NearestMathPlugin::TransformCelestialToTelescopeJD ( double  RightAscension,
double  Declination,
double  JulianDate,
TelescopeDirectionVector &  ApparentTelescopeDirectionVector 
)
overridevirtual

Get the alignment corrected telescope pointing direction for the supplied celestial coordinates.

Parameters
[in]RightAscensionRight Ascension (Decimal Hours).
[in]DeclinationDeclination (Decimal Degrees).
[in]JulianDateAbsolute Julian Date (days).
[out]ApparentTelescopeDirectionVectorParameter to receive the corrected telescope direction
Returns
True if successful
Note
Built-in plugins override this method and use JulianDate directly without reading the system clock. External plugins that have not yet adopted this interface use the default implementation, which computes JulianOffset = JulianDate - ln_get_julian_from_sys() and delegates to TransformCelestialToTelescope, so the plugin recovers the correct absolute JD internally.

Reimplemented from INDI::AlignmentSubsystem::MathPlugin.

Definition at line 143 of file NearestMathPlugin.cpp.

◆ TransformTelescopeToCelestial()

bool INDI::AlignmentSubsystem::NearestMathPlugin::TransformTelescopeToCelestial ( const TelescopeDirectionVector &  ApparentTelescopeDirectionVector,
double &  RightAscension,
double &  Declination,
double  JulianOffset = 0 
)
overridevirtual

Get the true celestial coordinates for the supplied telescope pointing direction.

Parameters
[in]ApparentTelescopeDirectionVectorthe telescope direction
[out]RightAscensionParameter to receive the Right Ascension (Decimal Hours).
[out]DeclinationParameter to receive the Declination (Decimal Degrees).
[in]JulianOffsetOffset (days) added to ln_get_julian_from_sys() to form the Julian Date (default 0).
Returns
True if successful
Note
Built-in plugins implement this as a thin shim that resolves the absolute JD and calls TransformTelescopeToCelestialJD. New callers should use TransformTelescopeToCelestialJD directly.

Implements INDI::AlignmentSubsystem::MathPlugin.

Definition at line 222 of file NearestMathPlugin.cpp.

◆ TransformTelescopeToCelestialJD()

bool INDI::AlignmentSubsystem::NearestMathPlugin::TransformTelescopeToCelestialJD ( const TelescopeDirectionVector &  ApparentTelescopeDirectionVector,
double &  RightAscension,
double &  Declination,
double  JulianDate 
)
overridevirtual

Get the true celestial coordinates for the supplied telescope pointing direction.

Parameters
[in]ApparentTelescopeDirectionVectorthe telescope direction
[out]RightAscensionParameter to receive the Right Ascension (Decimal Hours).
[out]DeclinationParameter to receive the Declination (Decimal Degrees).
[in]JulianDateAbsolute Julian Date (days).
Returns
True if successful
Note
Built-in plugins override this method and use JulianDate directly without reading the system clock. External plugins that have not yet adopted this interface use the default implementation, which ignores JulianDate and delegates to TransformTelescopeToCelestial with JulianOffset=0.

Reimplemented from INDI::AlignmentSubsystem::MathPlugin.

Definition at line 229 of file NearestMathPlugin.cpp.


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