TwiceAsNice
2019-02-18
|
The following INDI properties are used to manage math plugins. More...
#include <MathPluginManagement.h>
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. More... | |
void | ProcessSwitchProperties (Telescope *pTelescope, const char *name, ISState *states, char *names[], int n) |
Call this function from within the ISNewSwitch processing path. More... | |
void | ProcessTextProperties (Telescope *pTelescope, const char *name, char *texts[], char *names[], int n) |
Call this function from within the ISNewText processing path. More... | |
void | SaveConfigProperties (FILE *fp) |
Call this function to save persistent math plugin properties. More... | |
void | SetApproximateMountAlignmentFromMountType (MountType_t Type) |
Call this function to set the ApproximateMountAlignment property of the current Math Plugin. 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. 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) |
Get the alignment corrected telescope pointing direction for the supplied celestial coordinates. More... | |
bool | TransformTelescopeToCelestial (const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination) |
Get the true celestial coordinates for the supplied telescope pointing direction. More... | |
Private Member Functions | |
void | EnumeratePlugins () |
![]() | |
MathPlugin (MountAlignment_t ApproximateAlignment=ZENITH) | |
Default constructor. More... | |
virtual | ~MathPlugin () |
Virtual destructor. More... | |
The following INDI properties are used to manage math plugins.
This class also provides function links to the currently selected math plugin
typedef enum INDI::AlignmentSubsystem::MathPluginManagement::MountType INDI::AlignmentSubsystem::MathPluginManagement::MountType_t |
INDI::AlignmentSubsystem::MathPluginManagement::MathPluginManagement | ( | ) |
Default constructor.
|
inlinevirtual |
Virtual destructor.
|
private |
|
virtual |
Get the approximate alognment of the mount.
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
|
virtual |
Initialise or re-initialise the math plugin.
Re-reading the in memory database as necessary.
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
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
[in] | pTelescope | Pointer to the child INDI::Telecope class |
|
inline |
Return status of alignment subsystem.
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.
[in] | pTelescope | Pointer to the child INDI::Telecope class |
[in] | name | vector property name |
[in] | states | states as passed by the client |
[in] | names | names as passed by the client |
[in] | n | number of values and names pair to process. |
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.
[in] | pTelescope | Pointer to the child INDI::Telecope class |
[in] | name | vector property name |
[in] | texts | texts as passed by the client |
[in] | names | names as passed by the client |
[in] | n | number of values and names pair to process. |
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.
[in] | fp | File pointer passed into saveConfigItems |
void INDI::AlignmentSubsystem::MathPluginManagement::SetAlignmentSubsystemActive | ( | bool | enable | ) |
SetAlignmentSubsystemActive Enable or Disable alignment subsystem.
enable | True to activate Alignment Subsystem. False to deactivate Alignment subsystem. |
|
virtual |
Set the approximate alognment of the mount.
[in] | ApproximateAlignment | - the approximate alignment of the mount |
Reimplemented from INDI::AlignmentSubsystem::MathPlugin.
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.
[in] | Type | the mount type either EQUATORIAL or ALTAZ |
|
inline |
Set the current in memory database.
[in] | pDatabase | A pointer to the current in memory database |
|
virtual |
Get the alignment corrected telescope pointing direction for the supplied celestial coordinates.
[in] | RightAscension | Right Ascension (Decimal Hours). |
[in] | Declination | Declination (Decimal Degrees). |
[in] | JulianOffset | to be applied to the current julian date. |
[out] | ApparentTelescopeDirectionVector | Parameter to receive the corrected telescope direction |
Implements INDI::AlignmentSubsystem::MathPlugin.
|
virtual |
Get the true celestial coordinates for the supplied telescope pointing direction.
[in] | ApparentTelescopeDirectionVector | the telescope direction |
[out] | RightAscension | Parameter to receive the Right Ascension (Decimal Hours). |
[out] | Declination | Parameter to receive the Declination (Decimal Degrees). |
Implements INDI::AlignmentSubsystem::MathPlugin.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |