calcc: port eu2av robustness patches for PureSignal calibration

Three fixes from Thetis-Enhanced (Yurij eu2av), measured on Orion MK2 /
Anvelina PRO3 hardware:

- drop overrange samples (env_TX*hw_scale > 1.0) before the cubic
  xbuilder fit - they distort the fit and produce a wrong rx_scale
- optional median-ratio + MAD outlier rejection before the fit,
  controlled by new SetPSOutlierSigma (0 = off)
- fallback rx_scale estimate from the top amplitude intervals when the
  xbuilder fit fails or is rejected by rxscheck

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 23:00:41 +03:00
parent c1964817dd
commit 3ad40a00da
3 changed files with 173 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ typedef struct _calcc
double hw_scale;
double rx_scale;
double alpha;
double outlier_sigma;
int tsamps;
double* env_TX;