1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 22:14:45 -04:00

Fix server compilation.

This commit is contained in:
Jon Beniston
2026-04-04 13:18:44 +01:00
parent 447a679419
commit 3c3371cf2c
3 changed files with 22 additions and 13 deletions
+5 -8
View File
@@ -396,9 +396,9 @@ bool calculateJupiterMoonPhase(const QString& moon, double et, double latitude,
SpiceDouble xform[3][3];
pxform_c("J2000", "IAU_JUPITER", te, xform);
SpiceDouble io_bf[3], obs_bf[3];
mxv_c(xform, moonPosJupiterJ2000, io_bf);
mxv_c(xform, obsPosJupiterJ2000, obs_bf);
SpiceDouble moonBodyFixed[3], obsBodyFixed[3];
mxv_c(xform, moonPosJupiterJ2000, moonBodyFixed);
mxv_c(xform, obsPosJupiterJ2000, obsBodyFixed);
// Jupiter radii
SpiceInt nrad;
@@ -415,17 +415,14 @@ bool calculateJupiterMoonPhase(const QString& moon, double et, double latitude,
// Moon planetographic longitude using the same convention as CML
SpiceDouble moonLonRad, moonLatRad, moonAltKm;
recpgr_c("JUPITER", io_bf, re_j, f_j, &moonLonRad, &moonLatRad, &moonAltKm);
recpgr_c("JUPITER", moonBodyFixed, re_j, f_j, &moonLonRad, &moonLatRad, &moonAltKm);
SpiceDouble moonLonDeg = normalize360(Units::radiansToDegrees(moonLonRad));
// CML (sub-observer planetographic longitude)
SpiceDouble subObsLonRad, subObsLatRad, subObsAltKm;
recpgr_c("JUPITER", obs_bf, re_j, f_j, &subObsLonRad, &subObsLatRad, &subObsAltKm);
recpgr_c("JUPITER", obsBodyFixed, re_j, f_j, &subObsLonRad, &subObsLatRad, &subObsAltKm);
cml = normalize360(Units::radiansToDegrees(subObsLonRad));
// Moon offset from CML
SpiceDouble delta_deg = normalize180(moonLonDeg - cml);
// Moon phase (0 deg on far side)
phase = normalize360(cml - moonLonDeg + 180);