Instrument Neutral Distributed Interface INDI  2.0.2
Public Types | Public Member Functions | List of all members
INDI::AlignmentSubsystem::MathPluginManagement Class Reference

The following INDI properties are used to manage math plugins. More...

#include <MathPluginManagement.h>

Inheritance diagram for INDI::AlignmentSubsystem::MathPluginManagement:
INDI::AlignmentSubsystem::MathPlugin INDI::AlignmentSubsystem::AlignmentSubsystemForDrivers AstroTrac DSC Scope ScopeSim SkywatcherAPIMount

Public Types

enum  MountType { EQUATORIAL , ALTAZ }
 Describes the basic type of the mount. More...
 
typedef enum INDI::AlignmentSubsystem::MathPluginManagement::MountType MountType_t
 

Public Member Functions

 MathPluginManagement ()
 Default constructor. More...
 
virtual ~MathPluginManagement ()
 Virtual destructor. More...
 
void InitProperties (Telescope *pTelescope)
 Initialize alignment math plugin properties. It is recommended to call this function within initProperties() of your primary device. More...
 
void ProcessSwitchProperties (Telescope *pTelescope, const char *name, ISState *states, char *names[], int n)
 Call this function from within the ISNewSwitch processing path. The function will handle any math plugin switch properties. More...
 
void ProcessTextProperties (Telescope *pTelescope, const char *name, char *texts[], char *names[], int n)
 Call this function from within the ISNewText processing path. The function will handle any math plugin text properties. This text property is at the moment only contained in the config file so this will normally only have work to do when the config file is loaded. More...
 
void SaveConfigProperties (FILE *fp)
 Call this function to save persistent math plugin properties. This function should be called from within the saveConfigItems function of your driver. More...
 
void SetApproximateMountAlignmentFromMountType (MountType_t Type)
 Call this function to set the ApproximateMountAlignment property of the current Math Plugin. The alignment database should be initialised before this function is called so that it can use the DatabaseReferencePosition to determine which hemisphere the current observing site is in. For equatorial the ApproximateMountAlignment property will set to NORTH_CELESTIAL_POLE for sites in the northern hemisphere and SOUTH_CELESTIAL_POLE for sites in the southern hemisphere. For altaz mounts the ApproximateMountAlignment will be set to ZENITH. More...
 
void SetCurrentInMemoryDatabase (InMemoryDatabase *pDatabase)
 Set the current in memory database. More...
 
void SetAlignmentSubsystemActive (bool enable)
 SetAlignmentSubsystemActive Enable or Disable alignment subsystem. More...
 
bool IsAlignmentSubsystemActive () const
 Return status of alignment subsystem. More...
 
MountAlignment_t GetApproximateMountAlignment ()
 Get the approximate alognment of the mount. More...
 
bool Initialise (InMemoryDatabase *pInMemoryDatabase)
 Initialise or re-initialise the math plugin. Re-reading the in memory database as necessary. More...
 
void SetApproximateMountAlignment (MountAlignment_t ApproximateAlignment)
 Set the approximate alognment of the mount. More...
 
bool TransformCelestialToTelescope (const double RightAscension, const double Declination, double JulianOffset, TelescopeDirectionVector &ApparentTelescopeDirectionVector)
 TransformCelestialToTelescope Transforms Celestial (Sky) Coords to Mount Coordinates. More...
 
bool TransformTelescopeToCelestial (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination)
 TransformTelescopeToCelestial Transforms Mount Coords to Celestial (Sky) Coordinates. More...
 

Detailed Description

The following INDI properties are used to manage math plugins.

This class also provides function links to the currently selected math plugin

Definition at line 34 of file MathPluginManagement.h.

Member Typedef Documentation

◆ MountType_t

Member Enumeration Documentation

◆ MountType

Describes the basic type of the mount.

Enumerator
EQUATORIAL 
ALTAZ 

Definition at line 40 of file MathPluginManagement.h.

Constructor & Destructor Documentation

◆ MathPluginManagement()

INDI::AlignmentSubsystem::MathPluginManagement::MathPluginManagement ( )

Default constructor.

Definition at line 19 of file MathPluginManagement.cpp.

◆ ~MathPluginManagement()

virtual INDI::AlignmentSubsystem::MathPluginManagement::~MathPluginManagement ( )
inlinevirtual

Virtual destructor.

Definition at line 46 of file MathPluginManagement.h.

Member Function Documentation

◆ GetApproximateMountAlignment()

MountAlignment_t INDI::AlignmentSubsystem::MathPluginManagement::GetApproximateMountAlignment ( )
virtual

Get the approximate alognment of the mount.

Returns
the approximate alignment

Reimplemented from INDI::AlignmentSubsystem::MathPlugin.

Definition at line 354 of file MathPluginManagement.cpp.

◆ Initialise()

bool INDI::AlignmentSubsystem::MathPluginManagement::Initialise ( InMemoryDatabase pInMemoryDatabase)
virtual

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 359 of file MathPluginManagement.cpp.

◆ InitProperties()

void INDI::AlignmentSubsystem::MathPluginManagement::InitProperties ( Telescope pTelescope)

Initialize alignment math plugin properties. It is recommended to call this function within initProperties() of your primary device.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class

Definition at line 30 of file MathPluginManagement.cpp.

◆ IsAlignmentSubsystemActive()

bool INDI::AlignmentSubsystem::MathPluginManagement::IsAlignmentSubsystemActive ( ) const
inline

Return status of alignment subsystem.

Returns
True if active

Definition at line 106 of file MathPluginManagement.h.

◆ ProcessSwitchProperties()

void INDI::AlignmentSubsystem::MathPluginManagement::ProcessSwitchProperties ( Telescope pTelescope,
const char *  name,
ISState states,
char *  names[],
int  n 
)

Call this function from within the ISNewSwitch processing path. The function will handle any math plugin switch properties.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class
[in]namevector property name
[in]statesstates as passed by the client
[in]namesnames as passed by the client
[in]nnumber of values and names pair to process.

Definition at line 214 of file MathPluginManagement.cpp.

◆ ProcessTextProperties()

void INDI::AlignmentSubsystem::MathPluginManagement::ProcessTextProperties ( Telescope pTelescope,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)

Call this function from within the ISNewText processing path. The function will handle any math plugin text properties. This text property is at the moment only contained in the config file so this will normally only have work to do when the config file is loaded.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class
[in]namevector property name
[in]textstexts as passed by the client
[in]namesnames as passed by the client
[in]nnumber of values and names pair to process.

Definition at line 95 of file MathPluginManagement.cpp.

◆ SaveConfigProperties()

void INDI::AlignmentSubsystem::MathPluginManagement::SaveConfigProperties ( FILE *  fp)

Call this function to save persistent math plugin properties. This function should be called from within the saveConfigItems function of your driver.

Parameters
[in]fpFile pointer passed into saveConfigItems

Definition at line 325 of file MathPluginManagement.cpp.

◆ SetAlignmentSubsystemActive()

void INDI::AlignmentSubsystem::MathPluginManagement::SetAlignmentSubsystemActive ( bool  enable)

SetAlignmentSubsystemActive Enable or Disable alignment subsystem.

Parameters
enableTrue to activate Alignment Subsystem. False to deactivate Alignment subsystem.

Definition at line 318 of file MathPluginManagement.cpp.

◆ SetApproximateMountAlignment()

void INDI::AlignmentSubsystem::MathPluginManagement::SetApproximateMountAlignment ( MountAlignment_t  ApproximateAlignment)
virtual

Set the approximate alognment of the mount.

Parameters
[in]ApproximateAlignment- the approximate alignment of the mount

Reimplemented from INDI::AlignmentSubsystem::MathPlugin.

Definition at line 364 of file MathPluginManagement.cpp.

◆ SetApproximateMountAlignmentFromMountType()

void INDI::AlignmentSubsystem::MathPluginManagement::SetApproximateMountAlignmentFromMountType ( MountType_t  Type)

Call this function to set the ApproximateMountAlignment property of the current Math Plugin. The alignment database should be initialised before this function is called so that it can use the DatabaseReferencePosition to determine which hemisphere the current observing site is in. For equatorial the ApproximateMountAlignment property will set to NORTH_CELESTIAL_POLE for sites in the northern hemisphere and SOUTH_CELESTIAL_POLE for sites in the southern hemisphere. For altaz mounts the ApproximateMountAlignment will be set to ZENITH.

Parameters
[in]Typethe mount type either EQUATORIAL or ALTAZ

Definition at line 332 of file MathPluginManagement.cpp.

◆ SetCurrentInMemoryDatabase()

void INDI::AlignmentSubsystem::MathPluginManagement::SetCurrentInMemoryDatabase ( InMemoryDatabase pDatabase)
inline

Set the current in memory database.

Parameters
[in]pDatabaseA pointer to the current in memory database

Definition at line 93 of file MathPluginManagement.h.

◆ TransformCelestialToTelescope()

bool INDI::AlignmentSubsystem::MathPluginManagement::TransformCelestialToTelescope ( const double  RightAscension,
const double  Declination,
double  JulianOffset,
TelescopeDirectionVector ApparentTelescopeDirectionVector 
)
virtual

TransformCelestialToTelescope Transforms Celestial (Sky) Coords to Mount Coordinates.

Parameters
RightAscensionSky Right Ascension in hours.
DeclinationSky Declination in degrees
JulianOffsetJulian time Offset in days
ApparentTelescopeDirectionVectorOutput Apparent Telescope Direction Vector
Returns
True if transformation is successful, false otherwise.

Implements INDI::AlignmentSubsystem::MathPlugin.

Definition at line 369 of file MathPluginManagement.cpp.

◆ TransformTelescopeToCelestial()

bool INDI::AlignmentSubsystem::MathPluginManagement::TransformTelescopeToCelestial ( const TelescopeDirectionVector ApparentTelescopeDirectionVector,
double &  RightAscension,
double &  Declination 
)
virtual

TransformTelescopeToCelestial Transforms Mount Coords to Celestial (Sky) Coordinates.

Parameters
ApparentTelescopeDirectionVectorInput Apparent Telescope Direction Vector
RightAscensionOutput Celestial Right Ascension
DeclinationOutput Celestial Declination
Returns
True if transformation is successful, false otherwise.

Implements INDI::AlignmentSubsystem::MathPlugin.

Definition at line 380 of file MathPluginManagement.cpp.


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