×
INDI Library v1.8.1 Released (09 Sep 2019)

Monthly maintenance release INDI v1.8.1

Unable to turn off tracking using INDI

4 months 1 hour ago
MrGregNog
Fresh Boarder
Fresh Boarder
Posts: 19
More
Topic Author
Unable to turn off tracking using INDI #42031
I am trying to point my telescope at GEO satellites. I calculate the RA and DEC to get on target and tell my telescope to point there and not move. However, no matter what I do, the tracking setting always gets turned back on. Below is a copy of my code in C++.

void moveMount(Vector2d radec, bool verbose){

// check if the mount is on
if(mountConnection->isConnected()){

// Tell the mount to not move once it has aquired its target
ISwitchVectorProperty *mode = mountConnection->getSwitch
("ON_COORD_SET");
mode->sp[0].s = ISS_OFF; // track
mode->sp[1].s = ISS_OFF; // slew
mode->sp[2].s = ISS_OFF; // sync
client->sendNewSwitch(mode);

// Move the mount
INumberVectorProperty *control = mountConnection->getNumber
("EQUATORIAL_EOD_COORD");
control->np[0].value = radec(0) * (24.0 / 360.0); // RA must be in hours
control->np[1].value = radec(1); // DEC must be in deg decimals
client->sendNewNumber(control);

// wait for the mount to finish moving
while(control->s == IPS_BUSY){
cout << "Mount Moving to target..." << endl;
this_thread::sleep_for(chrono::milliseconds(1000));
}

//TODO: Figure out how to stop the mount from tracking once it is on
// target
cout << "Mount is on target." << endl;
}
else{
cout << "Mount is not connected." << endl;
}
}
The following user(s) said Thank You knro

Please Log in or Create an account to join the conversation.

3 months 4 weeks ago
knro
Administrator
Administrator
Posts: 7418
Karma: 51
Unable to turn off tracking using INDI #42038
Depending on the mount, you can turn on/off tracking by controlling TELESCOPE_TRACK_STATE switch property

it has two members TRACK_ON and TRACK_OFF. After slew/track is completed, just switch track off.

Another option is ON_COORD_SET, set it to SLEW instead of TRACK. Though for most mounts, it will not make a difference and they would slew to target AND track. So the safer option is to use the above switch.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You MrGregNog

Please Log in or Create an account to join the conversation.

3 months 4 weeks ago
MrGregNog
Fresh Boarder
Fresh Boarder
Posts: 19
More
Topic Author
Unable to turn off tracking using INDI #42055
Ah, using the TELESCOPE_TRACK_STATE switch solved the issue. Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.360 seconds