]> git.mxchange.org Git - flightgear.git/blobdiff - src/Radio/itm.cpp
Expose a radio function (receiveBeacon) to the Nasal subsystem
[flightgear.git] / src / Radio / itm.cpp
index 79360a201db33a35ffc085fb52f21ce3be41d749..bf42ee2e821e5568248d1a6f3b8def3bd449a622 100644 (file)
@@ -39,8 +39,8 @@
 #include <assert.h>
 #include <stdio.h>
 
-const float THIRD = (1.0/3.0);
-const float f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa
+const double THIRD = (1.0/3.0);
+const double f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa
 
 
 using namespace std;
@@ -132,8 +132,8 @@ double FORTRAN_DIM(const double &x, const double &y)
                return 0.0;
 }
 
-#define set_warn(txt, err) printf("%s:%d %s\n", __func__, __LINE__, txt);
-
+//#define set_warn(txt, err) printf("%s:%d %s\n", __func__, __LINE__, txt);
+#define set_warn(txt, err) 1;
 
 // :13: single-knife attenuation, page 6
 /*
@@ -1000,7 +1000,7 @@ double avar(double zzt, double zzl, double zzc, prop_type &prop, propv_type &pro
                        kdv = propv.mdvar;
                        no_situation_variability = kdv >= 20;
                        if (no_situation_variability)
-                               no_situation_variability -= 20;
+                               kdv -= 20;
 
                        no_location_variability = kdv >= 10;
                        if (no_location_variability)
@@ -1378,7 +1378,7 @@ double dlthx(double pfl[], const double &x1, const double &x2)
        n = 10 * ka - 5;
        kb = n - ka + 1;
        sn = n - 1;
-       assert((s = new double[n+2]) != 0);
+       s = new double[n+2];
        s[0] = sn;
        s[1] = 1.0;
        xb = (xb - xa) / sn;