summaryrefslogtreecommitdiff
path: root/helper_functions.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2021-09-09 22:49:13 +0200
committerChristoph Berg <myon@debian.org>2021-09-09 22:49:13 +0200
commit7aa182cc9860464e41cc8b1ed7ea2419f70deb91 (patch)
treeae7d07f023c64e3faca0b852d67209a205ab2998 /helper_functions.cpp
parent23a6b427e4bf791af53d91784c993b67f47e4635 (diff)
parent85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (diff)
Update upstream source from tag 'upstream/2.5.0_rc6+repack'
Update to upstream version '2.5.0~rc6+repack' with Debian dir b9d3381eb71d484f93fd73a092484a5814baf716
Diffstat (limited to 'helper_functions.cpp')
-rw-r--r--helper_functions.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/helper_functions.cpp b/helper_functions.cpp
new file mode 100644
index 00000000..706c427e
--- /dev/null
+++ b/helper_functions.cpp
@@ -0,0 +1,33 @@
+#include "helper_functions.h"
+
+double tx_duration(QString mode, double trPeriod, int nsps, bool bFast9)
+{
+ double txt=0.0;
+ if(mode=="FT4") txt=1.0 + 105*576/12000.0; // FT4
+ if(mode=="FT8") txt=1.0 + 79*1920/12000.0; // FT8
+ if(mode=="JT4") txt=1.0 + 207.0*2520/11025.0; // JT4
+ if(mode=="JT9") txt=1.0 + 85.0*nsps/12000.0; // JT9
+ if(mode=="JT65") txt=1.0 + 126*4096/11025.0; // JT65
+ if(mode=="Q65") { // Q65
+ if(trPeriod==15) txt=0.5 + 85*1800/12000.0;
+ if(trPeriod==30) txt=0.5 + 85*3600/12000.0;
+ if(trPeriod==60) txt=1.0 + 85*7200/12000.0;
+ if(trPeriod==120) txt=1.0 + 85*16000/12000.0;
+ if(trPeriod==300) txt=1.0 + 85*41472/12000.0;
+ }
+ if(mode=="WSPR") txt=2.0 + 162*8192/12000.0; // WSPR
+ if(mode=="FST4" or mode=="FST4W") { //FST4, FST4W
+ if(trPeriod==15) txt=1.0 + 160*720/12000.0;
+ if(trPeriod==30) txt=1.0 + 160*1680/12000.0;
+ if(trPeriod==60) txt=1.0 + 160*3888/12000.0;
+ if(trPeriod==120) txt=1.0 + 160*8200/12000.0;
+ if(trPeriod==300) txt=1.0 + 160*21504/12000.0;
+ if(trPeriod==900) txt=1.0 + 160*66560/12000.0;
+ if(trPeriod==1800) txt=1.0 + 160*134400/12000.0;
+ }
+ if(mode=="MSK144" or bFast9) {
+ txt=trPeriod-0.25; // JT9-fast, MSK144
+ }
+ if(mode=="Echo") txt=2.4;
+ return txt;
+}