24#include <libnova/julian_day.h>
197 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
198 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
199 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
454 static void joystickHelper(
const char *joystick_n,
double mag,
double angle,
void *context);
455 static void axisHelper(
const char *axis_n,
double value,
void *context);
509 virtual bool Flip(
double ra,
double dec);
517 virtual bool Goto(
double ra,
double dec);
525 virtual bool Sync(
double ra,
double dec);
569 virtual bool Abort();
588 virtual bool SetTrackRate(
double raRate,
double deRate);
598 virtual int AddTrackMode(
const char *name,
const char *label,
bool isDefault =
false);
618 virtual bool updateTime(ln_date *utc,
double utc_offset);
629 virtual bool updateLocation(
double latitude,
double longitude,
double elevation);
704 void processJoystick(
const char *joystick_n,
double mag,
double angle);
705 void processAxis(
const char *axis_n,
double value);
737 bool CheckFile(
const std::string &file_name,
bool writable)
const;
966 bool processTimeInfo(
const char *utc,
const char *offset);
967 bool processLocationInfo(
double latitude,
double longitude,
double elevation);
968 void triggerSnoop(
const char *driverName,
const char *propertyName);
969 void generateCoordSet();
975 const char *LoadParkXML();
977 bool IsLocked {
true};
978 const char *ParkDeviceName {
nullptr};
979 const std::string ParkDataFileName;
980 XMLEle *ParkdataXmlRoot {
nullptr}, *ParkdeviceXml {
nullptr}, *ParkstatusXml {
nullptr}, *ParkpositionXml {
nullptr},
981 *ParkpositionAxis1Xml {
nullptr}, *ParkpositionAxis2Xml {
nullptr};
983 double Axis1ParkPosition {0};
984 double Axis1DefaultParkPosition {0};
985 double Axis2ParkPosition {0};
986 double Axis2DefaultParkPosition {0};
988 uint8_t nSlewRate {0};
993 Controller *controller {
nullptr};
995 float motionDirNSValue {0};
996 float motionDirWEValue {0};
1001 bool m_slewPresetArmed {
true};
1003 bool m_simulatePierSide;
1006 static constexpr double EQ_NOTIFY_THRESHOLD {1.0 / (60 * 60 * 10)};
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
The TCP class manages connection with devices over the network via TCP/IP. Upon successful connection...
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
TelescopeStatus TrackState
bool isLocked() const
isLocked is mount currently locked?
virtual bool SetTrackMode(uint8_t mode)
SetTrackMode Set active tracking mode. Do not change track state.
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
bool HasPierSideSimulation()
virtual bool Goto(double ra, double dec)
Move the scope to the supplied RA and DEC coordinates.
int GetScopeConfigIndex() const
Get the scope config index.
void processButton(const char *button_n, ISState state)
static void axisHelper(const char *axis_n, double value, void *context)
void processAxis(const char *axis_n, double value)
bool CheckFile(const std::string &file_name, bool writable) const
Check if a file exists and it is readable.
void SetAxis1ParkDefault(double steps)
SetRAPark Set default RA/AZ parking position.
virtual bool ReadScopeStatus()=0
Read telescope status.
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
virtual bool Park()
Park the telescope to its home position.
virtual bool SetCurrentPark()
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
TelescopeParkData parkDataType
std::string GetHomeDirectory() const
Validate a file name.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual void TimerHit() override
Called when setTimer() time is up.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool SetTrackRate(double raRate, double deRate)
SetTrackRate Set custom tracking rates.
double GetAxis1Park() const
virtual bool UnPark()
Unpark the telescope if already parked.
virtual bool SetDefaultPark()
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
void setTelescopeConnection(const uint8_t &value)
setTelescopeConnection Set telescope connection mode. Child class should call this in the constructor...
double GetAxis2Park() const
bool isParked()
isParked is mount currently parked?
void processNSWE(double mag, double angle)
virtual int AddTrackMode(const char *name, const char *label, bool isDefault=false)
AddTrackMode.
Connection::Serial * serialConnection
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
static void joystickHelper(const char *joystick_n, double mag, double angle, void *context)
void updateObserverLocation(double latitude, double longitude, double elevation)
Update location settings of the observer.
double GetAxis1ParkDefault() const
virtual bool Handshake()
perform handshake with device to check communication
virtual bool SetTrackEnabled(bool enabled)
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
virtual void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
virtual bool updateTime(ln_date *utc, double utc_offset)
Update telescope time, date, and UTC offset.
Connection::TCP * tcpConnection
static void buttonHelper(const char *button_n, ISState state, void *context)
uint8_t getTelescopeConnection() const
const char * LoadParkData()
void setPECState(TelescopePECState state)
TelescopePierSide getPierSide()
virtual IPState ExecuteHomeAction(TelescopeHomeAction action)
Execute a homing action.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool updateLocation(double latitude, double longitude, double elevation)
Update telescope location settings.
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual bool SetParkPosition(double Axis1Value, double Axis2Value)
SetParkPosition Set desired parking position to the supplied value. This ONLY sets the desired park p...
IGeographicCoordinates m_Location
@ TELESCOPE_CAN_HOME_FIND
@ TELESCOPE_HAS_TRACK_RATE
@ TELESCOPE_HAS_PIER_SIDE
@ TELESCOPE_CAN_TRACK_SATELLITE
@ TELESCOPE_HAS_TRACK_MODE
@ TELESCOPE_HAS_PIER_SIDE_SIMULATION
@ TELESCOPE_CAN_CONTROL_TRACK
void processJoystick(const char *joystick_n, double mag, double angle)
bool callHandshake()
callHandshake Helper function that sets the port file descriptor before calling the actual Handshake ...
uint32_t GetTelescopeCapability() const
GetTelescopeCapability returns the capability of the Telescope.
enum INDI::Telescope::@473 TelescopeConnection
void NewRaDec(double ra, double dec)
The child class calls this function when it has updates.
virtual void SyncParkStatus(bool isparked)
SyncParkStatus Update the state and switches for parking.
void setPierSide(TelescopePierSide side)
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
TelescopePECState getPECState()
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command)
Move the telescope in the direction dir.
TelescopeStatus RememberTrackState
RememberTrackState Remember last state of Track State to fall back to in case of errors or aborts.
virtual bool Abort()
Abort any telescope motion including tracking if possible.
double GetAxis2ParkDefault() const
TelescopePECState currentPECState
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void SetAxis2Park(double steps)
SetDEPark Set current DEC/ALT parking position. The data park file (stored in ~/.indi/ParkData....
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command)
Start or Stop the telescope motion in the direction dir.
virtual bool Flip(double ra, double dec)
Move and flip the scope to the supplied RA and DEC coordinates.
enum INDI::Telescope::@474 TelescopeCapability
void processSlewPresets(double mag, double angle)
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
void SetParkDataType(TelescopeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
TelescopePECState lastPECState
TelescopePierSide expectedPierSide(double ra)
Calculate the expected pier side for scopes that do not report this property themselves.
void SetAxis2ParkDefault(double steps)
SetDEParkDefault Set default DEC/ALT parking position.
virtual bool Sync(double ra, double dec)
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
INDI::PropertySwitch ParkSP
INDI::PropertySwitch SimulatePierSideSP
TelescopePierSide currentPierSide
INDI::PropertySwitch AbortSP
INDI::PropertySwitch DomePolicySP
INDI::PropertyText ActiveDeviceTP
INDI::PropertyText TLEtoTrackTP
Text Vector property defining the orbital elements of an artificial satellite (TLE)....
INDI::PropertyNumber TrackRateNP
INDI::PropertySwitch MovementNSSP
INDI::PropertyText SatPassWindowTP
Text Vector property defining the start and end of a satellite pass (window contains pass)....
TelescopePierSide lastPierSide
INDI::PropertyNumber EqNP
INDI::PropertySwitch TrackStateSP
bool getSimulatePierSide() const
INDI::PropertySwitch PECStateSP
enum INDI::Telescope::@484 SatelliteWindow
INDI::PropertySwitch HomeSP
INDI::PropertySwitch MotionControlModeTP
INDI::PropertySwitch TrackSatSP
Switch Vector property defining the state of the satellite tracking of the mount. Example implementat...
INDI::PropertySwitch SlewRateSP
enum INDI::Telescope::@485 SatelliteTracking
INDI::PropertySwitch TrackModeSP
INDI::PropertyText TimeTP
INDI::PropertySwitch MountTypeSP
INDI::PropertySwitch PierSideSP
INDI::PropertySwitch LockAxisSP
INDI::PropertySwitch ReverseMovementSP
INDI::PropertySwitch MovementWESP
INDI::PropertySwitch JoystickReverseSP
INDI::PropertySwitch ParkOptionSP
INDI::PropertySwitch CoordSP
void setSimulatePierSide(bool value)
void sendTimeFromSystem()
INDI::PropertyNumber LocationNP
INDI::PropertyNumber ParkPositionNP
const char * getPierSideStr(TelescopePierSide ps)
INDI::PropertyNumber TargetNP
@ MOTION_CONTROL_MODE_JOYSTICK
@ MOTION_CONTROL_MODE_AXES
@ SAT_PASS_WINDOW_END
Index for end of the window.
@ SAT_PASS_WINDOW_START
Index for start of the window.
@ SAT_HALT
Halt signal (abort)
Namespace to encapsulate INDI client, drivers, and mediator classes.