×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

AlignmentSubsystemForDrivers

  • Posts: 215
  • Thank you received: 119
Jasem, I did not figure out what was wrong with them. I have to say that I have forgotten almost all the math I learned in college, and I never was any good at linear algebra.

I do want to add the tests to libindi if possible (to serve as documentation as well as test the code), but I'm getting sporadic SEGFAULTs when running the tests. It seems like ctest is sending data to stdin, which the driver is trying to parse as data from indiserver, causing issues. I've tried closing stdin in the test main function, but it doesn't seem to do the trick. Any ideas?
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
2 years 1 month ago #65138

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

  • Posts: 215
  • Thank you received: 119
In an effort to make the alignment subsystem easier to use in drivers, how would you feel about adding some helper methods to the AlignmentSubsystemForDrivers class?
class AlignmentSubsystemForDrivers
 
// Returns true if a new entry was added, false otherwise (won't add duplicates).
bool AddAlignmentEntryEquatorial(double actualRA, double actualDec, double mountRA, double mountDec)
 
// Returns true if the sky coordinates were successfully transformed into mount coordinates, false otherwise (too few alignment points)
bool SkyToTelescopeEquatorial(double actualRA, double actualDec, double &mountRA, double &mountDec)
 
// Returns true if the mount coordinates were successfully transformed into sky coordinates, false otherwise (too few alignment points)
bool TelescopeEquatorialToSky(double mountRA, double mountDec, double &actualRA, double &actualDec)
 

We could add some for Alt/Az mounts as well, but I'm not well versed on them.
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
Last edit: 2 years 1 month ago by Rick Bassham.
2 years 1 month ago #65142

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

The driver's stdin/stdout are used to exchange INDI XML messages. It seems the other tests we have in place now run fine as is with gmock/gtest?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 1 month ago #65144

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

  • Posts: 215
  • Thank you received: 119

Yeah, I'm sure I'm missing something setting up the test. When I run the test in verbose mode, I see a lot of things like this:
7: Impossible ISState 1278235136
7: Impossible ISState 1278235440
7: neSwitch>
7:   <oneSwitch name='^'>
7:       (null)
7:   </oneSwitch>
7:   <oneSwitch name='��2L�'>
7:       Off
7:   </oneSwitch>

Usually followed by a segfault. Sometimes the timing is right and the test succeeds. Sometimes not. Definitely don't want to commit it the way it is.
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
2 years 1 month ago #65146

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

  • Posts: 215
  • Thank you received: 119
I figured out the issue with the test. I wasn't calling ISGetProperties in the test scope's constructor. Once that was added, the crazy xml messages went away, and I no longer get the segfault.
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
2 years 1 month ago #65150

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

  • Posts: 215
  • Thank you received: 119
After some cleanup, I've put in a PR that adds the tests and the new methods. I figure we can continue the discussion there as to whether we want to include them.

github.com/indilib/indi/pull/1303
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
2 years 1 month ago #65151

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

Time to create page: 0.654 seconds