×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Unable to turn off tracking using INDI

  • Posts: 19
  • Thank you received: 3
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: Jasem Mutlaq
4 years 8 months ago #42031

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

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.
The following user(s) said Thank You: Greg
4 years 8 months ago #42038

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

  • Posts: 19
  • Thank you received: 3
Ah, using the TELESCOPE_TRACK_STATE switch solved the issue. Thanks!
4 years 8 months ago #42055

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

Time to create page: 0.359 seconds