Hey, I figured it out. Was, in fact, just my own lack of experience.
So, there is this BaseClientQt for a reason when using Qt and QThread. Switched over to that one from BaseClient and now it works like a charm!
Cheers
Erik
Read More...
Hey,
so I'm having some weird thread behavior, or at least it seems weird to me. I don't have too much experience with threads yet.
I made my client inherite from QObject and BaseClient to have it emit signals etc. (I'm aware that I could have used QtBaseClient, but when I started writing my code, there was no need to use Qt and now its a little too complex to change with low effort and no real need)
class cl_SacherClient : public QObject, public INDI::BaseClient
{
Q_OBJECT
public:
[....]
};
QApplication app (argc, argv);
sacher::cl_SacherGUI* gui = new sacher::cl_SacherGUI;
std::unique_ptr<sacher::cl_SacherClient> client_ptr(new sacher::cl_SacherClient(gui));
QObject: Cannot create children for a parent that is in a different thread.
(Parent is sacher::cl_SacherGUI(0x5594e6af8ca0), parent's thread is QThread(0x5594e6b498a0), current thread is QThread(0x7f1f1c002060)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is sacher::cl_SacherGUI(0x5594e6af8ca0), parent's thread is QThread(0x5594e6b498a0), current thread is QThread(0x7f1f1c002060)
QObject::startTimer: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread
Hey,
it's pretty much the title. I can't figure out what devices I'm receiving. Of course I know, but my client only sees, driver interface is 0, so it's useless. Am I doing anything wrong?
void client::newDevice(INDI::BaseDevice* dp)
{
log("CLI:\tnew device: %s", dp->getDeviceName());
uint16_t driver_interface = dp->getDriverInterface();
log("driver_interface: %d", driver_interface);
if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::TELESCOPE_INTERFACE )
{
if (int_telescope==NULL && ( !strcmp(dp->getDeviceName(), TELE) || !strcmp(dp->getDeviceName(), TELE_SIM) ))
{
log("CLI:\tReceived Telescope:\t%s...", dp->getDeviceName());
// telescope = dp;
int_telescope = new cl_TelescopeInterface(dp, this);
}
else if(int_telescope==NULL && !strcmp(dp->getDeviceName(), TELE_STAN))
{
log("CLI:\tReceived Telescope:\t%s...", dp->getDeviceName());
// telescope = dp;
// int_telescope = new cl_TelescopeInterface(dp, this);
int_telescope = new cl_TelescopeHondelage(dp, this);
}
connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(reachedTarget()));
// connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(setNewTransit()));
connect(int_telescope, SIGNAL(reachedTarget()), this, SLOT(writeImageInfo2File()));
connect(int_telescope, SIGNAL(slewingError()), this, SLOT(slewingError()));
}
else if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::CCD_INTERFACE)
{
addCamera(dp);
}
else if( driver_interface & INDI::BaseDevice::DRIVER_INTERFACE::AUX_INTERFACE)
{
if (int_joystick==NULL && (!strcmp(dp->getDeviceName(), JOYSTICK)))
{
log("CLI:\tReceived Joystick:\t%s...", dp->getDeviceName());
int_joystick = new cl_JoystickWingman(dp, this);
}
}
}
Thanks. So summerize things up:
- INDI still misses the capability to differentially track satellite, we can make up for that by leapfrogging along the satellites pass, for once.
- KStars can show satellites on screen, you can select them and drive towards their current position, but there is no tracking, neither differentially nor leapfrogging. For leapfrogging you'd have to slew onto a future position which is not possible at the moment.
- No automated imaging of satellite when in FOV
So, to get things started, it might be interesting to implement the leapfrogging. I'm not too deap into KStars and Eko, so where would I want to add this feature? Make another Ekos tab?
During my work as scientific student here at the TU Braunschweig, I wrote a standalone program, using INDI, to "measure" satellites orbits via leapfrogging, given a telescope and a camera as equipment. But the complexity increases somewhat drastically with added functionality, and using KStars/Ekos, with its many already existing functions, such as taking Dark Images, etc, might be the logical next step.
I'd be happy to contribute something, although I'm just a mechanical engineering student , all I know about programming is what I taught myself.
Cheers
Erik
Read More...
I'm curious. What is the current state of INDI concerning satellite tracking? And with regards to KStars, since it relies on INDI, does somebody know what that is able to?
I'm asking here, because this thread already existed and I didn't want to start an entire discussion from scratch just for my curiosity.
Cheers
Erik
Read More...
han.k wrote:
The FITS standard 4.0 specifies this:
[±C]CCYY-MM-DD[Thh:mm:ss[.s...]]
So four digits, accuracy 0.1ms.
And how accurate should you be on mid exposure of a long exposure?
Paul
Hey,
would be awesome if the DATE-OBS seconds would be logged up to the 6th decimal place (minimum). I know, off-the-shelf cameras don't support this accuracy, once there is a camera that support this, that would be awesome. Precise timestamps could be possible using digital I/O. Have a look f. i. here
Using Trigger and Digital I/Os
.
Secondly, would be awesome if the altitude/height of the observer could be added to the keywords.
Thanks in advance.
Cheers
Erik
Read More...
Got it. I used
find_package(INDI REQUIRED v4l driver)
find_package(INDI REQUIRED)
I did. Still undefined references, though.
[ 50%] Linking CXX executable indi_v4ltis_ccd
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:157: undefined reference to `V4L2_Driver::V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::~V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:162: undefined reference to `V4L2_Driver::~V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::initProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:174: undefined reference to `V4L2_Driver::initProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISGetProperties(char const*)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:182: undefined reference to `V4L2_Driver::ISGetProperties(char const*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:187: undefined reference to `V4L2_Driver::ISNewSwitch(char const*, char const*, ISState*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewText(char const*, char const*, char**, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:192: undefined reference to `V4L2_Driver::ISNewText(char const*, char const*, char**, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewNumber(char const*, char const*, double*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:197: undefined reference to `V4L2_Driver::ISNewNumber(char const*, char const*, double*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::updateProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:202: undefined reference to `V4L2_Driver::updateProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x98): undefined reference to `V4L2_Driver::saveConfigItems(_IO_FILE*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0xf0): undefined reference to `V4L2_Driver::StartExposure(float)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x100): undefined reference to `V4L2_Driver::AbortExposure()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x118): undefined reference to `V4L2_Driver::UpdateCCDFrame(int, int, int, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x128): undefined reference to `V4L2_Driver::UpdateCCDBin(int, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x180): undefined reference to `V4L2_Driver::StartStreaming()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x188): undefined reference to `V4L2_Driver::StopStreaming()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1a8): undefined reference to `V4L2_Driver::initCamBase()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1b0): undefined reference to `V4L2_Driver::getBasicData()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTV9V4LTISCCD[_ZTV9V4LTISCCD]+0x1b8): undefined reference to `V4L2_Driver::updateV4L2Controls()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o:(.data.rel.ro._ZTI9V4LTISCCD[_ZTI9V4LTISCCD]+0x10): undefined reference to `typeinfo for V4L2_Driver'
collect2: error: ld returned 1 exit status
CMakeFiles/indi_v4ltis_ccd.dir/build.make:98: recipe for target 'indi_v4ltis_ccd' failed
make[2]: *** [indi_v4ltis_ccd] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/indi_v4ltis_ccd.dir/all' failed
make[1]: *** [CMakeFiles/indi_v4ltis_ccd.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Oh, and the branch on the indi-3rdparty fork I'm working with is
github.com/emktubs/indi-3rdparty/tree/v4l_tis_expansion
Read More...
I just pushed it all. Sorry.
It's not yet much what I did. I only took the generic ccd and used it as template to inherit from v4l2_driver.
Read More...
Hey, thanks for the hint with the lx200 library.
I had a look at that and tried to do it similar, I changed the CMakeLists.txt accordingly and adapted the FindINDI.cmake in indi-3rdparty as well, but I seem to have been missing something, 'cause the newly written driver inheriting from V4L2_Driver does not link to the created library. Undefineed references to all member function..
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:157: undefined reference to `V4L2_Driver::V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::~V4LTISCCD()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:162: undefined reference to `V4L2_Driver::~V4L2_Driver()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::initProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:174: undefined reference to `V4L2_Driver::initProperties()'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISGetProperties(char const*)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:182: undefined reference to `V4L2_Driver::ISGetProperties(char const*)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewSwitch(char const*, char const*, ISState*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:187: undefined reference to `V4L2_Driver::ISNewSwitch(char const*, char const*, ISState*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewText(char const*, char const*, char**, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:192: undefined reference to `V4L2_Driver::ISNewText(char const*, char const*, char**, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::ISNewNumber(char const*, char const*, double*, char**, int)':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:197: undefined reference to `V4L2_Driver::ISNewNumber(char const*, char const*, double*, char**, int)'
CMakeFiles/indi_v4ltis_ccd.dir/v4ltis_ccd.o: In function `V4LTISCCD::updateProperties()':
/home/erik/indi-3rdparty/indi-v4ltis/v4ltis_ccd.cpp:202: undefined reference to `V4L2_Driver::updateProperties()'
########### INDI::CCD V4L Driver ###############
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(v4l2driverccd_SRC
${CMAKE_CURRENT_SOURCE_DIR}/libs/lx/Lx.cpp
${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/v4l2driver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/indi_v4l2driver.cpp)
IF (UNITY_BUILD)
ENABLE_UNITY_BUILD(v4l2driverccd v4l2driverccd_SRC 10 cpp)
ENDIF ()
add_library(indiv4l SHARED ${v4l2driverccd_SRC} ${libwebcam_C_SRC} ${libwebcam_CXX_SRC})
set_target_properties(indiv4l PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION} OUTPUT_NAME indiv4l)
add_executable(indi_v4l2_ccd ${v4l2driverccd_SRC} ${libwebcam_C_SRC} ${libwebcam_CXX_SRC})
target_link_libraries(indi_v4l2_ccd ${JPEG_LIBRARY} indidriver)
install(TARGETS indi_v4l2_ccd RUNTIME DESTINATION bin )
install(TARGETS indiv4l LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/v4l2driver.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/lx/Lx.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/libs/webcam/v4l2_base.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi/webcam COMPONENT Devel)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/libs/webcam/v4l2_decode/v4l2_decode.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi/v4l2_decode COMPONENT Devel)
# For DBK21 camera
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/drivers/video/80-dbk21-camera.rules DESTINATION ${UDEVRULES_INSTALL_DIR})
ENDIF ()
INDI_declare_component(v4l indiv4l)