Greg replied to the topic 'Unable to turn off tracking using INDI' in the forum. 5 years ago

Ah, using the TELESCOPE_TRACK_STATE switch solved the issue. Thanks!

Read More...

Greg created a new topic ' Unable to turn off tracking using INDI' in the forum. 5 years ago

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;
}
}


Read More...

Greg replied to the topic 'Unable to find Drivers' in the forum. 5 years ago

My brain must have been tired on Friday. I forgot to tell the client to look for the devices using the "watchDevice()" command. Including this before attempting to connect to the device solved my issue.

Read More...

Greg replied to the topic 'Unable to find Drivers' in the forum. 5 years ago

So I am trying to build a client using C++. I successfully built a client that controlled my camera and mount in python but the rest of my project is in C++, thus the change of languages. I am trying now to connect to the server in the code and then connect to the camera and mount; however, when I list the number of devices available it returns 0 and when I try to connect to the camera I get this error: INDI::BaseClient: Error. Unable to find driver Atik Horizon.

Is there another library or directory I need to link to in my CMakeLists file?

Read More...

Greg created a new topic ' Unable to find Drivers' in the forum. 5 years ago

It is me again.

I am continuing to work on my project and have run into an error where I cannot find any drivers when I attempt to connect to a device in my code. I have downloaded and installed to drivers but when I run "client->connectDevice("Atik Horizon")" it results in an error. Is there another package that is needed in the cmake lists file?

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

Fixed the issue. For the client to work correctly, these must be included in the CMakeLists.txt file

find_package(INDI 1.7 REQUIRED)
find_package(INDI COMPONENTS client REQUIRED)
find_package(Nova REQUIRED)
find_package(CFITSIO REQUIRED)
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)

include_directories(${INDI_INCLUDE_DIR})
include_directories(${NOVA_INCLUDE_DIR})
include_directories(${CFITSIO_INCLUDE_DIR})
include_directories( ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${ZLIB_INCLUDE_DIR})

target_link_libraries(pandaScope ${NOVA_LIBRARIES})
target_link_libraries(pandaScope ${CFITSIO_LIBRARIES})
target_link_libraries(pandaScope ${INDI_LIBRARIES})
target_link_libraries(pandaScope ${INDI_CLIENT_LIBRARIES})
target_link_libraries(pandaScope ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(pandaScope ${ZLIB_LIBRARIES})

Thanks for all your help Jasem!

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

Awesome! This fixed the issue! However, I am now getting a new error in the client library.

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libindiclient.a(basedevice.cpp.o): undefined reference to symbol 'uncompress'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I thought this had to do with a dependency on pthreads and tried including that using

find_package(Threads REQUIRED)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(pandaScope ${CMAKE_THREAD_LIBS_INIT})

but that didn't work. Thanks for working so hard on solving this issue. I really appreciate the help!

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

I went ahead and made the minimal project. I think the issue is in the find_package statement. On the github by default it finds the alignment and driver components. To get the client component you need to specify it but when I try to it doesn't find the client component. When the CMake file compiles it notifies me that it has found the driver and alignment components but there is no information on the client component.

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

Moving the INDI_CLIENT_LIBRARIES to be first or last didn't solve anything. Removing INDI_LIBRARIES seems to generate more errors. I am attaching error logs that include my cmake lists file. I will also attach my source and header files that include the client code to make sure I'm not missing anything there.

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

I did remove INDI_LIBRARIES and still had the same error. I unfortunately not hosting this anywhere. Could the issue be stemming from this being the client tutorial code? Does it require information from the other tutorials? I was able to run all of the tutorials individually, but I am having issues putting that code in my project as a framework to follow.

Read More...

Greg replied to the topic 'Trouble Linking Libraries' in the forum. 5 years ago

I added the lines to my CMakeLists but I am still getting build errors. Here is my updated CMake file

cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
project(pandaScope)

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_CFLAGS} -O3 -Wall")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules)

find_package(OpenCV REQUIRED)
find_package(GSL REQUIRED)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(Boost REQUIRED)
find_package(INDI 1.7 REQUIRED)
find_package(Nova REQUIRED)
find_package(CFITSIO REQUIRED)

add_library(cspice STATIC IMPORTED)

set_property(TARGET
cspice
PROPERTY
IMPORTED_LOCATION
/usr/lib/cspice.a)

INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
include_directories(${INDI_INCLUDE_DIR})
include_directories(${NOVA_INCLUDE_DIR})
include_directories(${CFITSIO_INCLUDE_DIR})

IF (CMAKE_BUILD_TYPE MATCHES COVERAGE)
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
ENDIF (CMAKE_BUILD_TYPE MATCHES COVERAGE)

set(SOURCE ${SOURCE}
src/main.cpp
src/focus/focuser.cpp
src/detection/detection.cpp
src/iod/state_generation.cpp
src/iod/lambert_gooding.cpp
src/batch/lambert.cpp
src/batch/batch.cpp
src/utilities/conversions.cpp
src/utilities/kernels.cpp
src/batch/propagator.cpp
src/telescope/functions.cpp
src/telescope/operation.cpp)

set(HEADERS ${HEADERS}
src/includes.hpp
src/focus/focuser.hpp
src/detection/detection.hpp
src/iod/state_generation.hpp
src/iod/lambert_gooding.hpp
dependencies/cxxopts.hpp
src/batch/lambert.hpp
src/batch/batch.hpp
src/utilities/conversions.hpp
src/utilities/vectors.hpp
src/utilities/kernels.hpp
src/batch/propagator.hpp
src/telescope/functions.hpp
src/telescope/operation.hpp)

add_subdirectory(testing)

add_executable(pandaScope ${SOURCE} ${HEADERS})

target_link_libraries(pandaScope ${OpenCV_LIBS})
target_link_libraries(pandaScope usbp-1)
target_link_libraries(pandaScope GSL::gsl GSL::gslcblas)
target_link_libraries(pandaScope Eigen3::Eigen)
target_link_libraries(pandaScope LINK_PUBLIC ${Boost_LIBRARIES})
target_link_libraries(pandaScope cspice)
target_link_libraries(pandaScope ${INDI_CLIENT_LIBRARIES})
target_link_libraries(pandaScope ${INDI_LIBRARIES})
target_link_libraries(pandaScope ${NOVA_LIBRARIES})
target_link_libraries(pandaScope ${CFITSIO_LIBRARIES})

Read More...