diff options
author | Your Name <you@example.com> | 2022-12-09 16:38:39 +0000 |
---|---|---|
committer | Your Name <you@example.com> | 2022-12-09 16:38:39 +0000 |
commit | 63659aa37c86471485838bdd8e1c33db73bebe3b (patch) | |
tree | 53e3f0045c3716780064a66712b34dc12da02cfe | |
parent | 20149a6f981444d364f7ee7543efb62c470a1d0d (diff) | |
download | indi_mount_driver-63659aa37c86471485838bdd8e1c33db73bebe3b.tar.gz indi_mount_driver-63659aa37c86471485838bdd8e1c33db73bebe3b.tar.bz2 indi_mount_driver-63659aa37c86471485838bdd8e1c33db73bebe3b.zip |
Make tracking use the plate solver
-rw-r--r-- | indi-celestronaux/celestronaux.cpp | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/indi-celestronaux/celestronaux.cpp b/indi-celestronaux/celestronaux.cpp index 907375b..bbc46aa 100644 --- a/indi-celestronaux/celestronaux.cpp +++ b/indi-celestronaux/celestronaux.cpp @@ -1565,13 +1565,53 @@ void CelestronAUX::TimerHit() #endif trackByRate(AXIS_ALT, trackRates[AXIS_ALT]); } - break; - } - break; + } else { + double delta=1./3600.; + + double ra1 = m_SkyTrackingTarget.rightascension; + double ra2=ra1+delta; + double dec= m_SkyTrackingTarget.declination; + + INDI::IEquatorialCoordinates m1; + if (!SkyToTelescopeEquatorial(ra1,dec,m1.rightascension,m1.declination)) { + m1.rightascension=ra1; + m1.declination=dec; + } + + uint32_t e1[2]; + CelestronAUX::RADEToEncoders(m1,e1[0],e1[1]); + + INDI::IEquatorialCoordinates m2; + if (!SkyToTelescopeEquatorial(ra2,dec,m2.rightascension,m2.declination)) { + m2.rightascension=ra2; + m2.declination=dec; + } + uint32_t e2[2]; + CelestronAUX::RADEToEncoders(m2,e2[0],e2[1]); + + double r_ra=(m2.rightascension-m1.rightascension)/delta; + double r_dec=(m2.declination-m1.declination)/delta; + + int d_a1=e2[0]-e1[0]; + int d_a2=e2[1]-e1[1]; + + r_ra*=TRACKRATE_SIDEREAL; + r_dec*=TRACKRATE_SIDEREAL; + + r_ra=std::abs(r_ra); + r_dec=std::abs(r_dec); + + if (d_a1>0) r_ra=-r_ra; + if (d_a2>0) r_dec=-r_dec; + + CelestronAUX::SetTrackRate(r_ra,r_dec); - default: - break; } + } + break; + + default: + break; } // Check if seeking index or leveling is done |