From 1d88a71985132345999effe8d6d2e2edd12d08a2 Mon Sep 17 00:00:00 2001
From: donker <donker@astron.nl>
Date: Fri, 3 Sep 2021 13:19:52 +0200
Subject: [PATCH] TR_tod_pps_delta_R now in seconds.

---
 src/constants.h | 4 ++--
 src/tr.cpp      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/constants.h b/src/constants.h
index ace3e81a..9e11faf3 100644
--- a/src/constants.h
+++ b/src/constants.h
@@ -45,13 +45,13 @@
 
 #define C_Q_fft 2
 #define C_N_sub 512
+#define C_N_sub_bf 488
 #define C_N_step 1
 #define C_N_crosslets_max 7
 #define C_N_scrap 512  // Number of 32 bit words in FPGA scrap memory.
 #define C_N_pol 2  // Number of antenna polarizations, X and Y.
 #define C_A_pn 6  // Number of dual polarization antennas per Processing Node (PN) FPGA.
-#define C_N_beamlets 976  // Number of beamlets per antenna band  488, 976
-#define C_N_sub_bf 488
+// #define C_N_beamlets 976  // Number of beamlets per antenna band  488, 976
 
 #define C_200MHZ_1_CNT_NS 5  // Time of one cnt in nS
 #define C_N_CLK_PER_PPS 200000000
diff --git a/src/tr.cpp b/src/tr.cpp
index 25cb3abc..10b3dc2e 100644
--- a/src/tr.cpp
+++ b/src/tr.cpp
@@ -145,7 +145,7 @@ bool TranslatorMap::translator(TermOutput& termout, const char cmd, const string
         for (uint i=0; i<pps_offset_cnt.size(); i++) {
             if (pps_offset_cnt[i] > 0) {
                 cout << "use pps_offset_cnt from node " << i << " cnt=" << pps_offset_cnt[i] << endl;
-                pps_delta = (double)(pps_offset_cnt[i] * C_200MHZ_1_CNT_NS);
+                pps_delta = (double)(pps_offset_cnt[i] * C_200MHZ_1_CNT_NS) / 1e9;  // pps_delta in seconds now
                 break;
             }
         }
-- 
GitLab