19namespace AlignmentSubsystem
95 CurrentInMemoryDatabase = pDatabase;
108 return AlignmentSubsystemActive.s ==
ISS_ON ? true :
false;
136 double &RightAscension,
double &Declination,
double JulianDate);
147 [[deprecated(
"Use TransformCelestialToTelescopeJD with an explicit Julian Date")]]
160 [[deprecated(
"Use TransformTelescopeToCelestialJD with an explicit Julian Date")]]
162 double &RightAscension,
double &Declination,
double JulianOffset = 0);
165 void EnumeratePlugins();
166 void HandlePluginLoading(
Telescope *pTelescope,
int CurrentPlugin,
int NewPlugin);
167 std::vector<std::string> MathPluginFiles;
168 std::vector<std::string> MathPluginDisplayNames;
170 std::unique_ptr<ISwitch> AlignmentSubsystemMathPlugins;
172 ISwitch AlignmentSubsystemMathPluginInitialise;
174 ISwitch AlignmentSubsystemActive;
180 IText AlignmentSubsystemCurrentMathPlugin;
189 void *LoadedMathPluginHandle;
This class implements the default math plugin.
This class provides the driver side API to the in memory alignment database.
The following INDI properties are used to manage math plugins.
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 plu...
void InitProperties(Telescope *pTelescope)
Initialize alignment math plugin properties. It is recommended to call this function within initPrope...
void SaveConfigProperties(FILE *fp)
Call this function to save persistent math plugin properties. This function should be called from wit...
bool IsAlignmentSubsystemActive() const
Return status of alignment subsystem.
MathPluginManagement()
Default constructor.
bool TransformTelescopeToCelestialJD(const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianDate)
TransformTelescopeToCelestialJD Transforms Mount Coords to Celestial (Sky) Coordinates.
void SetCurrentInMemoryDatabase(InMemoryDatabase *pDatabase)
Set the current in memory database.
bool TransformCelestialToTelescopeJD(double RightAscension, double Declination, double JulianDate, TelescopeDirectionVector &ApparentTelescopeDirectionVector)
TransformCelestialToTelescopeJD Transforms Celestial (Sky) Coords to Mount Coordinates.
void SetApproximateMountAlignment(MountAlignment_t ApproximateAlignment)
Set the approximate alignment of the mount.
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 plugi...
bool TransformCelestialToTelescope(const double RightAscension, const double Declination, double JulianOffset, TelescopeDirectionVector &ApparentTelescopeDirectionVector)
TransformCelestialToTelescope Compat shim - resolves JD and delegates to TransformCelestialToTelescop...
bool Initialise(InMemoryDatabase *pInMemoryDatabase)
Initialise or re-initialise the math plugin. Re-reading the in memory database as necessary.
MountAlignment_t GetApproximateMountAlignment()
Get the approximate alignment of the mount.
MountType
Describes the basic type of the mount.
enum INDI::AlignmentSubsystem::MathPluginManagement::MountType MountType_t
bool TransformTelescopeToCelestial(const TelescopeDirectionVector &ApparentTelescopeDirectionVector, double &RightAscension, double &Declination, double JulianOffset=0)
TransformTelescopeToCelestial Compat shim - resolves JD and delegates to TransformTelescopeToCelestia...
void SetAlignmentSubsystemActive(bool enable)
SetAlignmentSubsystemActive Enable or Disable alignment subsystem.
virtual ~MathPluginManagement()
Virtual destructor.
void SetApproximateMountAlignmentFromMountType(MountType_t Type)
Call this function to set the ApproximateMountAlignment property of the current Math Plugin....
Provides alignment subsystem functions to INDI alignment math plugins.
InMemoryDatabase * pInMemoryDatabase
enum INDI::AlignmentSubsystem::MountAlignment MountAlignment_t
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds a normalised direction vector (direction cosines)
Holds the connection type.
Switch vector property descriptor.
Text vector property descriptor.