From e105730a8d868d72dfb06cc89dc11b9b61612534 Mon Sep 17 00:00:00 2001
From: joanvallve <jvallve@iri.upc.edu>
Date: Mon, 21 Jun 2021 18:55:51 +0200
Subject: [PATCH] default tdcp params

---
 include/gnss_utils/gnss_utils.h | 17 ++++++++++++++++-
 include/gnss_utils/tdcp.h       |  2 +-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/gnss_utils/gnss_utils.h b/include/gnss_utils/gnss_utils.h
index d777221..7d87ea5 100644
--- a/include/gnss_utils/gnss_utils.h
+++ b/include/gnss_utils/gnss_utils.h
@@ -150,6 +150,21 @@ struct Options
     }
 };
 
+const TdcpOptions default_tdcp_options =
+{
+    false, //bool enabled;           // TDCP enabled
+    false, //bool batch;             // precompute global displacement between 2 epochs
+    true, //bool corr_iono;         // apply correction also in TDCP
+    true, //bool corr_tropo;        // apply correction also in TDCP
+    true, //bool corr_clock;
+    false, //bool loss_function;     // apply loss function in TDCP factors
+    0.1, //double sigma_atm;
+    0.1, //double sigma_carrier;
+    true, //bool   use_old_nav;
+    false, //bool   multi_freq;
+    300 //double time_window;     // window of time in which we perform TDCP
+};
+
 const Options default_options =
 {
     EPHOPT_BRDC,    // satellite ephemeris option: EPHOPT_BRDC(0):broadcast ephemeris, EPHOPT_PREC(1): precise ephemeris, EPHOPT_SBAS(2): broadcast + SBAS, EPHOPT_SSRAPC(3): broadcast + SSR_APC, EPHOPT_SSRCOM(4): broadcast + SSR_COM, EPHOPT_LEX(5): QZSS LEX ephemeris, EPHOPT_SBAS2(6):broadcast + SBAS(sats with SBAS corr and sats with BRDC eph), EPHOPT_SBAS3(7):broadcast + SBAS(EPHOPT_SBAS if possible, otherwise EPHOPT_SBAS2), EPHOPT_SBAS4(8):broadcast + SBAS(EPHOPT_SBAS if possible, otherwise EPHOPT_BRDC)
@@ -160,7 +175,7 @@ const Options default_options =
     D2R*15.0,       // min elevation (degrees)
     30.0,           // maxgdop: reject threshold of gdop
     true, false, true, true, false, false, false, false, //GPS,SBS,GLO,GAL,QZS,CMP,IRN,LEO; // constellations used
-    {0}             // TDCP options
+    default_tdcp_options // TDCP options
 };
 
 // forward declarations
diff --git a/include/gnss_utils/tdcp.h b/include/gnss_utils/tdcp.h
index de5ef4e..5b67886 100644
--- a/include/gnss_utils/tdcp.h
+++ b/include/gnss_utils/tdcp.h
@@ -17,7 +17,7 @@ struct TdcpBatchParams
   bool   relinearize_jacobian;
   int    max_iterations;
   int    residual_opt; // 0: Normalized RMS of residual vector. 1: Max residual in Mahalanobis squared distance
-  int   sagnac_correction; // 0 deactivated, 1/2 substraction/addition
+  int    sagnac_correction; // 0 deactivated, 1/2 substraction/addition
 };
 
 struct TdcpOutput
-- 
GitLab