]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/input_output/FGXMLElement.cpp
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / input_output / FGXMLElement.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 0c3e910..832b2c8
@@ -42,7 +42,7 @@ FORWARD DECLARATIONS
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id: FGXMLElement.cpp,v 1.29 2010/03/18 13:18:31 jberndt Exp $";
+static const char *IdSrc = "$Id: FGXMLElement.cpp,v 1.31 2010/09/29 02:22:03 jberndt Exp $";
 static const char *IdHdr = ID_XMLELEMENT;
 
 bool Element::converterIsInitialized = false;
@@ -93,8 +93,11 @@ Element::Element(const string& nm)
     convert["SLUG*FT2"]["KG*M2"] = 1.35594;
     convert["KG*M2"]["SLUG*FT2"] = 1.0/convert["SLUG*FT2"]["KG*M2"];
     // Angles
-    convert["RAD"]["DEG"] = 360.0/(2.0*3.1415926);
+    convert["RAD"]["DEG"] = 180.0/M_PI;
     convert["DEG"]["RAD"] = 1.0/convert["RAD"]["DEG"];
+    // Angular rates
+    convert["RAD/SEC"]["DEG/SEC"] = convert["RAD"]["DEG"];
+    convert["DEG/SEC"]["RAD/SEC"] = 1.0/convert["RAD/SEC"]["DEG/SEC"];
     // Spring force
     convert["LBS/FT"]["N/M"] = 14.5939;
     convert["N/M"]["LBS/FT"] = 1.0/convert["LBS/FT"]["N/M"];
@@ -170,6 +173,9 @@ Element::Element(const string& nm)
     // Angles
     convert["DEG"]["DEG"] = 1.00;
     convert["RAD"]["RAD"] = 1.00;
+    // Angular rates
+    convert["DEG/SEC"]["DEG/SEC"] = 1.00;
+    convert["RAD/SEC"]["RAD/SEC"] = 1.00;
     // Spring force
     convert["LBS/FT"]["LBS/FT"] = 1.00;
     convert["N/M"]["N/M"] = 1.00;
@@ -472,7 +478,6 @@ FGColumnVector3 Element::FindElementTripletConvertTo( const string& target_units
     if (!supplied_units.empty()) value *= convert[supplied_units][target_units];
   } else {
     value = 0.0;
-    cerr << "Could not find an X triplet item for this column vector." << endl;
   }
   triplet(1) = value;
 
@@ -483,7 +488,6 @@ FGColumnVector3 Element::FindElementTripletConvertTo( const string& target_units
     if (!supplied_units.empty()) value *= convert[supplied_units][target_units];
   } else {
     value = 0.0;
-    cerr << "Could not find a Y triplet item for this column vector." << endl;
   }
   triplet(2) = value;
 
@@ -494,7 +498,6 @@ FGColumnVector3 Element::FindElementTripletConvertTo( const string& target_units
     if (!supplied_units.empty()) value *= convert[supplied_units][target_units];
   } else {
     value = 0.0;
-    cerr << "Could not find a Z triplet item for this column vector." << endl;
   }
   triplet(3) = value;