]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/flight_control/FGSensor.cpp
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / models / flight_control / FGSensor.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 1ca89b6..bccf518
@@ -46,7 +46,7 @@ using namespace std;
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id$";
+static const char *IdSrc = "$Id: FGSensor.cpp,v 1.23 2011/08/18 12:42:17 jberndt Exp $";
 static const char *IdHdr = ID_SENSOR;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -181,7 +181,7 @@ void FGSensor::Noise(void)
   double random_value=0.0;
 
   if (DistributionType == eUniform) {
-    random_value = ((double)rand()/(double)RAND_MAX) - 0.5;
+    random_value = 2.0*(((double)rand()/(double)RAND_MAX) - 0.5);
   } else {
     random_value = GaussianRandomNumber();
   }
@@ -293,9 +293,9 @@ void FGSensor::Debug(int from)
     if (from == 0) { // Constructor
       if (InputSigns.size() > 0) {
         if (InputSigns[0] < 0)
-          cout << "      INPUT: -" << InputNodes[0]->getName() << endl;
+          cout << "      INPUT: -" << InputNodes[0]->GetName() << endl;
         else
-          cout << "      INPUT: " << InputNodes[0]->getName() << endl;
+          cout << "      INPUT: " << InputNodes[0]->GetName() << endl;
       }
       if (bits != 0) {
         if (quant_property.empty())