|
Instrument Neutral Distributed Interface INDI 2.2.5
|
#include <skywatcherAPI.h>
Classes | |
| struct | SkyWatcherFeatures |
Public Member Functions | |
| SkywatcherAPI () | |
| virtual | ~SkywatcherAPI ()=default |
| unsigned long | BCDstr2long (std::string &String) |
| unsigned long | Highstr2long (std::string &String) |
| bool | CheckIfDCMotor () |
| long | DegreesPerSecondToClocksTicksPerMicrostep (AXISID Axis, double DegreesPerSecond) |
| Check if the current mount is a Virtuoso (AltAz) | |
| long | DegreesToMicrosteps (AXISID Axis, double AngleInDegrees) |
| Convert angle in degrees to microsteps. | |
| bool | GetEncoder (AXISID Axis) |
| Set the CurrentEncoders status variable to the current encoder value in microsteps for the specified axis. | |
| bool | GetHighSpeedRatio (AXISID Axis) |
| Set the HighSpeedRatio status variable to the ratio between high and low speed stepping modes. | |
| bool | GetMicrostepsPerRevolution (AXISID Axis) |
| Set the MicrostepsPerRevolution status variable to the number of microsteps for a 360 degree revolution of the axis. | |
| bool | GetMicrostepsPerWormRevolution (AXISID Axis) |
| Set the MicrostepsPermWormRevolution status variable to the number of microsteps for a 360 degree revolution of the worm gear. | |
| bool | GetMotorBoardVersion (AXISID Axis) |
| PositiveRotationSense_t | GetPositiveRotationDirection (AXISID Axis) |
| Returns the rotation direction for a positive step on the designated axis. | |
| bool | GetStatus (AXISID Axis) |
| bool | GetStepperClockFrequency (AXISID Axis) |
| Set the StepperClockFrequency status variable to fixed PIC timer interrupt frequency (ticks per second). | |
| bool | InquireFeatures () |
| bool | InitializeMC () |
| bool | InitMount () |
| Initialize the communication to the mount. | |
| bool | HasHomeIndexers () |
| bool | HasAuxEncoders () |
| bool | HasPPEC () |
| bool | HasSnapPort1 () |
| bool | HasSnapPort2 () |
| bool | HasPolarLed () |
| void | TurnEncoder (AXISID axis, bool on) |
| void | TurnRAEncoder (bool on) |
| void | TurnDEEncoder (bool on) |
| void | SetFeature (AXISID axis, uint32_t command) |
| bool | InstantStop (AXISID Axis) |
| Bring the axis to an immediate halt. N.B. This command could cause damage to the mount or telescope and should not normally be used except for emergency stops. | |
| void | Long2BCDstr (long Number, std::string &String) |
| double | MicrostepsToDegrees (AXISID Axis, long Microsteps) |
| Convert microsteps to angle in degrees. | |
| double | MicrostepsToRadians (AXISID Axis, long Microsteps) |
| Convert microsteps to angle in radians. | |
| void | PrepareForSlewing (AXISID Axis, double Speed) |
| long | RadiansPerSecondToClocksTicksPerMicrostep (AXISID Axis, double RadiansPerSecond) |
| Convert a slewing rate in radians per second into the required clock ticks per microstep setting. | |
| long | RadiansToMicrosteps (AXISID Axis, double AngleInRadians) |
| Convert angle in radians to microsteps. | |
| bool | SetEncoder (AXISID Axis, long Microsteps) |
| Set axis encoder to the specified value. | |
| bool | SetGotoTargetOffset (AXISID Axis, long OffsetInMicrosteps) |
| Set the goto target offset per the specified axis. | |
| bool | SetAxisMotionMode (AXISID Axis, char Func, char Direction) |
| Set the motion mode per the specified axis. | |
| void | SetSerialPort (int port) |
| Set the serail port to be usb for mount communication. | |
| bool | SetClockTicksPerMicrostep (AXISID Axis, long ClockTicksPerMicrostep) |
| Set the PIC internal divider variable which determines how many clock interrupts have to occur between each microstep. | |
| bool | SetSlewModeDeccelerationRampLength (AXISID Axis, long Microsteps) |
| Set the length of the deccelaration ramp for Slew mode. | |
| bool | SetSlewToModeDeccelerationRampLength (AXISID Axis, long Microsteps) |
| Set the length of the deccelaration ramp for SlewTo mode. | |
| bool | toggleSnapPort (bool enabled) |
| Toggle the snap port on or off. | |
| void | Slew (AXISID Axis, double SpeedInRadiansPerSecond, bool IgnoreSilentMode=true) |
| Start the axis slewing at the given rate. | |
| void | SlewTo (AXISID Axis, long OffsetInMicrosteps, bool verbose=true) |
| Slew to the given offset and stop. | |
| bool | SlowStop (AXISID Axis) |
| Bring the axis to slow stop in the distance specified by SetSlewModeDeccelerationRampLength. | |
| bool | StartAxisMotion (AXISID Axis) |
| Start the axis slewing in the previously selected mode. | |
| bool | TalkWithAxis (AXISID Axis, SkywatcherCommand Command, std::string &cmdDataStr, std::string &responseStr) |
| bool | IsInMotion (AXISID Axis) |
| Check if an axis is moving. | |
Static Public Member Functions | |
| static const char * | mountTypeToString (uint8_t type) |
Public Attributes | |
| unsigned long | MCVersion { 0 } |
| unsigned long | MountCode { 0 } |
| bool | IsDCMotor { false } |
| bool | SilentSlewMode { true } |
| long | MicrostepsPerRevolution [2] |
| long | StepperClockFrequency [2] |
| long | HighSpeedRatio [2] |
| long | MicrostepsPerWormRevolution [2] |
| SkyWatcherFeatures | AxisFeatures [2] |
| double | RadiansPerMicrostep [2] |
| double | MicrostepsPerRadian [2] |
| double | DegreesPerMicrostep [2] |
| double | MicrostepsPerDegree [2] |
| long | LowSpeedGotoMargin [2] |
| long | LastSlewToTarget [2] |
| long | CurrentEncoders [2] |
| Current encoder values (microsteps). | |
| long | PolarisPositionEncoders [2] |
| Polaris position (initial) encoder values (microsteps). | |
| long | ZeroPositionEncoders [2] |
| Zero position encoder values (microsteps). | |
| AXISSTATUS | AxesStatus [2] |
| double | SlewingSpeed [2] |
| INDI::Telescope * | pChildTelescope { nullptr } |
Static Public Attributes | |
| static constexpr double | SIDEREALRATE { (2 * M_PI / 86164.09065) } |
| static constexpr double | MAX_SPEED { 500.0 } |
| static constexpr double | LOW_SPEED_MARGIN { 128.0 * SIDEREALRATE } |
Protected Attributes | |
| unsigned int | DBG_SCOPE { 0 } |
Definition at line 53 of file skywatcherAPI.h.
| Enumerator | |
|---|---|
| AXIS1 | |
| AXIS2 | |
Definition at line 56 of file skywatcherAPI.h.
| Enumerator | |
|---|---|
| EQ6 | |
| HEQ5 | |
| EQ5 | |
| EQ3 | |
| EQ8 | |
| AZEQ6 | |
| AZEQ5 | |
| STAR_ADVENTURER | |
| EQ8R_PRO | |
| AZEQ6_PRO | |
| EQ6_PRO | |
| EQ5_PRO | |
| WAVE_150I | |
| WAVE_100I | |
| GT | |
| MF | |
| _114GT | |
| DOB | |
| AZGTE | |
| AZGTI | |
Definition at line 338 of file skywatcherAPI.h.
| Enumerator | |
|---|---|
| CLOCKWISE | |
| ANTICLOCKWISE | |
Definition at line 174 of file skywatcherAPI.h.
Definition at line 63 of file skywatcherAPI.h.
| Enumerator | |
|---|---|
| GET_INDEXER_CMD | |
| GET_FEATURES_CMD | |
Definition at line 94 of file skywatcherAPI.h.
Definition at line 100 of file skywatcherAPI.h.
| SkywatcherAPI::SkywatcherAPI | ( | ) |
Definition at line 116 of file skywatcherAPI.cpp.
|
virtualdefault |
| unsigned long SkywatcherAPI::BCDstr2long | ( | std::string & | String | ) |
Definition at line 131 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::CheckIfDCMotor | ( | ) |
Definition at line 177 of file skywatcherAPI.cpp.
| long SkywatcherAPI::DegreesPerSecondToClocksTicksPerMicrostep | ( | AXISID | Axis, |
| double | DegreesPerSecond | ||
| ) |
Check if the current mount is a Virtuoso (AltAz)
Check if the current mount is a Merlin (AltAz)
Check if the current mount is AZ GTi
Convert a slewing rate in degrees per second into the required clock ticks per microstep setting.
| [in] | Axis | - The axis to use. |
| [in] | DegreesPerSecond | - Slewing rate in degrees per second |
Definition at line 218 of file skywatcherAPI.cpp.
| long SkywatcherAPI::DegreesToMicrosteps | ( | AXISID | Axis, |
| double | AngleInDegrees | ||
| ) |
Convert angle in degrees to microsteps.
| [in] | Axis | - The axis to use. |
| [in] | AngleInRadians | - the angle in degrees. |
Definition at line 225 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetEncoder | ( | AXISID | Axis | ) |
Set the CurrentEncoders status variable to the current encoder value in microsteps for the specified axis.
Definition at line 230 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetHighSpeedRatio | ( | AXISID | Axis | ) |
Set the HighSpeedRatio status variable to the ratio between high and low speed stepping modes.
Definition at line 244 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetMicrostepsPerRevolution | ( | AXISID | Axis | ) |
Set the MicrostepsPerRevolution status variable to the number of microsteps for a 360 degree revolution of the axis.
| [in] | Axis | - The axis to use. |
Definition at line 265 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetMicrostepsPerWormRevolution | ( | AXISID | Axis | ) |
Set the MicrostepsPermWormRevolution status variable to the number of microsteps for a 360 degree revolution of the worm gear.
| [in] | Axis | - The axis to use. |
Definition at line 300 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetMotorBoardVersion | ( | AXISID | Axis | ) |
Definition at line 317 of file skywatcherAPI.cpp.
| SkywatcherAPI::PositiveRotationSense_t SkywatcherAPI::GetPositiveRotationDirection | ( | AXISID | Axis | ) |
Returns the rotation direction for a positive step on the designated axis.
| [in] | Axis | - The axis to use. |
Rotation directions are given looking down the axis towards the motorised pier for an altitude or declination axis. Or down the pier towards the mount base for an azimuth or right ascension axis
Definition at line 334 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetStatus | ( | AXISID | Axis | ) |
Definition at line 365 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::GetStepperClockFrequency | ( | AXISID | Axis | ) |
Set the StepperClockFrequency status variable to fixed PIC timer interrupt frequency (ticks per second).
Definition at line 343 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasAuxEncoders | ( | ) |
Definition at line 990 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasHomeIndexers | ( | ) |
Definition at line 985 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasPolarLed | ( | ) |
Definition at line 1011 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasPPEC | ( | ) |
Definition at line 995 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasSnapPort1 | ( | ) |
Definition at line 1000 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::HasSnapPort2 | ( | ) |
Definition at line 1006 of file skywatcherAPI.cpp.
| unsigned long SkywatcherAPI::Highstr2long | ( | std::string & | String | ) |
Definition at line 158 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::InitializeMC | ( | ) |
Definition at line 427 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::InitMount | ( | ) |
Initialize the communication to the mount.
Definition at line 497 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::InquireFeatures | ( | ) |
Definition at line 439 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::InstantStop | ( | AXISID | Axis | ) |
Bring the axis to an immediate halt. N.B. This command could cause damage to the mount or telescope and should not normally be used except for emergency stops.
| [in] | Axis | - The axis to use. |
Definition at line 586 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::IsInMotion | ( | AXISID | Axis | ) |
Check if an axis is moving.
| [in] | Axis | - The axis to check. |
Definition at line 978 of file skywatcherAPI.cpp.
| void SkywatcherAPI::Long2BCDstr | ( | long | Number, |
| std::string & | String | ||
| ) |
Definition at line 597 of file skywatcherAPI.cpp.
| double SkywatcherAPI::MicrostepsToDegrees | ( | AXISID | Axis, |
| long | Microsteps | ||
| ) |
Convert microsteps to angle in degrees.
| [in] | Axis | - The axis to use. |
| [in] | Microsteps |
Definition at line 605 of file skywatcherAPI.cpp.
| double SkywatcherAPI::MicrostepsToRadians | ( | AXISID | Axis, |
| long | Microsteps | ||
| ) |
Convert microsteps to angle in radians.
| [in] | Axis | - The axis to use. |
| [in] | Microsteps |
Definition at line 610 of file skywatcherAPI.cpp.
|
static |
Definition at line 67 of file skywatcherAPI.cpp.
| void SkywatcherAPI::PrepareForSlewing | ( | AXISID | Axis, |
| double | Speed | ||
| ) |
Definition at line 615 of file skywatcherAPI.cpp.
| long SkywatcherAPI::RadiansPerSecondToClocksTicksPerMicrostep | ( | AXISID | Axis, |
| double | RadiansPerSecond | ||
| ) |
Convert a slewing rate in radians per second into the required clock ticks per microstep setting.
| [in] | Axis | - The axis to use. |
| [in] | DegreesPerSecond | - Slewing rate in degrees per second |
Definition at line 664 of file skywatcherAPI.cpp.
| long SkywatcherAPI::RadiansToMicrosteps | ( | AXISID | Axis, |
| double | AngleInRadians | ||
| ) |
Convert angle in radians to microsteps.
| [in] | Axis | - The axis to use. |
| [in] | AngleInRadians | - the angle in radians. |
Definition at line 671 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SetAxisMotionMode | ( | AXISID | Axis, |
| char | Func, | ||
| char | Direction | ||
| ) |
Set the motion mode per the specified axis.
| [in] | Axis | - The axis to use. |
| [in] | Func | - the slewing mode
|
| [in] | Direction | - the direction to slew in
|
Func - 0 High speed slew to mode (goto) Func - 1 Low speed slew mode Func - 2 Low speed slew to mode (goto) Func - 3 High speed slew mode
Definition at line 700 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SetClockTicksPerMicrostep | ( | AXISID | Axis, |
| long | ClockTicksPerMicrostep | ||
| ) |
Set the PIC internal divider variable which determines how many clock interrupts have to occur between each microstep.
Definition at line 711 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SetEncoder | ( | AXISID | Axis, |
| long | Microsteps | ||
| ) |
Set axis encoder to the specified value.
| [in] | Axis | - The axis to use. |
| [in] | Microsteps | - the value in microsteps. |
Definition at line 676 of file skywatcherAPI.cpp.
| void SkywatcherAPI::SetFeature | ( | AXISID | axis, |
| uint32_t | command | ||
| ) |
Definition at line 1036 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SetGotoTargetOffset | ( | AXISID | Axis, |
| long | OffsetInMicrosteps | ||
| ) |
Set the goto target offset per the specified axis.
| [in] | Axis | - The axis to use. |
| [in] | OffsetInMicrosteps | - the value to use |
Definition at line 686 of file skywatcherAPI.cpp.
|
inline |
Set the serail port to be usb for mount communication.
| [in] | port | - an open file descriptor for the port to use. |
Definition at line 277 of file skywatcherAPI.h.
| bool SkywatcherAPI::SetSlewModeDeccelerationRampLength | ( | AXISID | Axis, |
| long | Microsteps | ||
| ) |
Set the length of the deccelaration ramp for Slew mode.
| [in] | Axis | - The axis to use. |
| [in] | Microsteps | - the length of the decceleration ramp in microsteps. |
Definition at line 721 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SetSlewToModeDeccelerationRampLength | ( | AXISID | Axis, |
| long | Microsteps | ||
| ) |
Set the length of the deccelaration ramp for SlewTo mode.
| [in] | Axis | - The axis to use. |
| [in] | Microsteps | - the length of the decceleration ramp in microsteps. |
Definition at line 731 of file skywatcherAPI.cpp.
| void SkywatcherAPI::Slew | ( | AXISID | Axis, |
| double | SpeedInRadiansPerSecond, | ||
| bool | IgnoreSilentMode = true |
||
| ) |
Start the axis slewing at the given rate.
| [in] | Axis | - The axis to use. |
| [in] | SpeedInRadiansPerSecond | - the slewing speed |
| [in] | IgnoreSilentMode | - ignore the silent mode even if set |
Definition at line 748 of file skywatcherAPI.cpp.
| void SkywatcherAPI::SlewTo | ( | AXISID | Axis, |
| long | OffsetInMicrosteps, | ||
| bool | verbose = true |
||
| ) |
Slew to the given offset and stop.
| [in] | Axis | - The axis to use. |
| [in] | OffsetInMicrosteps | - The number of microsteps to |
| [in] | verbose | - Verbose mode slew from the current axis position. |
Definition at line 797 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::SlowStop | ( | AXISID | Axis | ) |
Bring the axis to slow stop in the distance specified by SetSlewModeDeccelerationRampLength.
| [in] | Axis | - The axis to use. |
Definition at line 868 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::StartAxisMotion | ( | AXISID | Axis | ) |
Start the axis slewing in the previously selected mode.
| [in] | Axis | - The axis to use. |
Definition at line 876 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::TalkWithAxis | ( | AXISID | Axis, |
| SkywatcherCommand | Command, | ||
| std::string & | cmdDataStr, | ||
| std::string & | responseStr | ||
| ) |
Definition at line 883 of file skywatcherAPI.cpp.
| bool SkywatcherAPI::toggleSnapPort | ( | bool | enabled | ) |
Toggle the snap port on or off.
| [in] | enabled | - the state requested. |
Definition at line 741 of file skywatcherAPI.cpp.
| void SkywatcherAPI::TurnDEEncoder | ( | bool | on | ) |
Definition at line 1031 of file skywatcherAPI.cpp.
| void SkywatcherAPI::TurnEncoder | ( | AXISID | axis, |
| bool | on | ||
| ) |
Definition at line 1016 of file skywatcherAPI.cpp.
| void SkywatcherAPI::TurnRAEncoder | ( | bool | on | ) |
Definition at line 1026 of file skywatcherAPI.cpp.
| AXISSTATUS SkywatcherAPI::AxesStatus[2] |
Definition at line 405 of file skywatcherAPI.h.
| SkyWatcherFeatures SkywatcherAPI::AxisFeatures[2] |
Definition at line 386 of file skywatcherAPI.h.
| long SkywatcherAPI::CurrentEncoders[2] |
Current encoder values (microsteps).
Definition at line 399 of file skywatcherAPI.h.
|
protected |
Definition at line 410 of file skywatcherAPI.h.
| double SkywatcherAPI::DegreesPerMicrostep[2] |
Definition at line 391 of file skywatcherAPI.h.
| long SkywatcherAPI::HighSpeedRatio[2] |
Definition at line 384 of file skywatcherAPI.h.
| bool SkywatcherAPI::IsDCMotor { false } |
Definition at line 378 of file skywatcherAPI.h.
| long SkywatcherAPI::LastSlewToTarget[2] |
Definition at line 396 of file skywatcherAPI.h.
|
staticconstexpr |
Definition at line 117 of file skywatcherAPI.h.
| long SkywatcherAPI::LowSpeedGotoMargin[2] |
Definition at line 393 of file skywatcherAPI.h.
|
staticconstexpr |
Definition at line 116 of file skywatcherAPI.h.
| unsigned long SkywatcherAPI::MCVersion { 0 } |
Definition at line 334 of file skywatcherAPI.h.
| double SkywatcherAPI::MicrostepsPerDegree[2] |
Definition at line 392 of file skywatcherAPI.h.
| double SkywatcherAPI::MicrostepsPerRadian[2] |
Definition at line 390 of file skywatcherAPI.h.
| long SkywatcherAPI::MicrostepsPerRevolution[2] |
Definition at line 382 of file skywatcherAPI.h.
| long SkywatcherAPI::MicrostepsPerWormRevolution[2] |
Definition at line 385 of file skywatcherAPI.h.
| unsigned long SkywatcherAPI::MountCode { 0 } |
Definition at line 377 of file skywatcherAPI.h.
| INDI::Telescope* SkywatcherAPI::pChildTelescope { nullptr } |
Definition at line 424 of file skywatcherAPI.h.
| long SkywatcherAPI::PolarisPositionEncoders[2] |
Polaris position (initial) encoder values (microsteps).
Definition at line 401 of file skywatcherAPI.h.
| double SkywatcherAPI::RadiansPerMicrostep[2] |
Definition at line 389 of file skywatcherAPI.h.
|
staticconstexpr |
Definition at line 115 of file skywatcherAPI.h.
| bool SkywatcherAPI::SilentSlewMode { true } |
Definition at line 379 of file skywatcherAPI.h.
| double SkywatcherAPI::SlewingSpeed[2] |
Definition at line 406 of file skywatcherAPI.h.
| long SkywatcherAPI::StepperClockFrequency[2] |
Definition at line 383 of file skywatcherAPI.h.
| long SkywatcherAPI::ZeroPositionEncoders[2] |
Zero position encoder values (microsteps).
Definition at line 403 of file skywatcherAPI.h.