summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames McKenzie <root@ka-ata-killa.panaceas.james.local>2023-01-25 09:36:55 +0000
committerJames McKenzie <root@ka-ata-killa.panaceas.james.local>2023-01-25 09:36:55 +0000
commit407829214b67b860bba048e3a4d1703be391cc98 (patch)
treeaf6502de0ee163a965a317e33e16b4f252c0e9a3
parente3cd87273b69753df1f6c72f8d58efa80ff9a7f7 (diff)
downloadindi_mount_driver-407829214b67b860bba048e3a4d1703be391cc98.tar.gz
indi_mount_driver-407829214b67b860bba048e3a4d1703be391cc98.tar.bz2
indi_mount_driver-407829214b67b860bba048e3a4d1703be391cc98.zip
show alignment in debug log
-rw-r--r--indi-lxd650/lxd650.cpp24
-rw-r--r--indi-lxd650/lxd650.h1
2 files changed, 25 insertions, 0 deletions
diff --git a/indi-lxd650/lxd650.cpp b/indi-lxd650/lxd650.cpp
index 3b62fa4..746041c 100644
--- a/indi-lxd650/lxd650.cpp
+++ b/indi-lxd650/lxd650.cpp
@@ -160,6 +160,27 @@ bool LXD650::isSlewComplete()
return fabs(dx) <= (SlewAccuracyN[0].value / (900.0)) && fabs(dy) <= (SlewAccuracyN[1].value / 60.0);
}
+
+/**************************************************************************************
+**
+***************************************************************************************/
+void LXD650::show_alignment(const char *wot, double ra1,double dec1, double ra2,double dec2)
+{
+char ra1_str[32] = {0};
+char dec1_str[32] = {0};
+char ra2_str[32] = {0};
+char dec2_str[32] = {0};
+
+ fs_sexa(ra1_str, ra1, 2, 3600);
+ fs_sexa(dec1_str, dec1, 2, 3600);
+ fs_sexa(ra2_str, ra2, 2, 3600);
+ fs_sexa(dec2_str, dec2, 2, 3600);
+
+
+ LOGF_DEBUG("Mapping: %s RA %s DE %s => RA %s DE %s",wot,ra1_str,dec1_str,ra2_str,dec2_str);
+}
+
+
/**************************************************************************************
**
***************************************************************************************/
@@ -203,6 +224,7 @@ bool LXD650::ReadScopeStatus()
NewRaDec(sky_RA, sky_DEC);
+ show_alignment("Mount->Sky", currentRA, currentDEC, sky_RA, sky_DEC);
return true;
}
@@ -220,6 +242,8 @@ bool LXD650::Goto(double r, double d)
EquatorialCoordinatesFromTelescopeDirectionVector(TDV, MountRADE);
} // Conversion failed, use values as is
+ show_alignment("Sky->Mount", r, d, MountRADE.rightascension, MountRADE.declination);
+
r=MountRADE.rightascension;
d=MountRADE.declination;
diff --git a/indi-lxd650/lxd650.h b/indi-lxd650/lxd650.h
index 6333fd2..731c9e4 100644
--- a/indi-lxd650/lxd650.h
+++ b/indi-lxd650/lxd650.h
@@ -78,4 +78,5 @@ class LXD650 : public INDI::Telescope,
private:
INDI::PropertyNumber GuideRateNP {2};
bool guidePulse(INDI_EQ_AXIS axis, uint32_t ms, int8_t rate);
+ void show_alignment(const char *wot, double ra1,double dec1, double ra2,double dec2);
};