×

INDI Library v1.8.0 is Released (27 Jul 2019)

INDI Library v1.8.0 is mostly a maintenance release to fix a few bugs in several drivers.

Unable to turn off tracking using INDI

  • Posts: 19
  • Thank you received: 2

Unable to turn off tracking using INDI was created by MrGregNog

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
1 week 2 days ago #42031

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

Replied by knro on topic Unable to turn off tracking using INDI

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
1 week 1 day ago #42038

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

  • Posts: 19
  • Thank you received: 2

Replied by MrGregNog on topic Unable to turn off tracking using INDI

Ah, using the TELESCOPE_TRACK_STATE switch solved the issue. Thanks!
1 week 1 day ago #42055

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

Time to create page: 0.312 seconds