]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/input_output/FGXMLElement.cpp
remove unused files
[flightgear.git] / src / FDM / JSBSim / input_output / FGXMLElement.cpp
index 3f7becc5c4768ed4bd208cdea7a5ee1241f6b5a3..96a03d74b8e5b5857e1add238d560a62aa073e58 100755 (executable)
@@ -42,7 +42,7 @@ FORWARD DECLARATIONS
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id: FGXMLElement.cpp,v 1.30 2010/09/04 14:15:15 jberndt Exp $";
+static const char *IdSrc = "$Id: FGXMLElement.cpp,v 1.33 2011/08/05 12:28:20 jberndt Exp $";
 static const char *IdHdr = ID_XMLELEMENT;
 
 bool Element::converterIsInitialized = false;
@@ -64,6 +64,10 @@ Element::Element(const string& nm)
     // Length
     convert["M"]["FT"] = 3.2808399;
     convert["FT"]["M"] = 1.0/convert["M"]["FT"];
+    convert["CM"]["FT"] = 0.032808399;
+    convert["FT"]["CM"] = 1.0/convert["CM"]["FT"];
+    convert["KM"]["FT"] = 3280.8399;
+    convert["FT"]["KM"] = 1.0/convert["KM"]["FT"];
     convert["FT"]["IN"] = 12.0;
     convert["IN"]["FT"] = 1.0/convert["FT"]["IN"];
     convert["IN"]["M"] = convert["IN"]["FT"] * convert["FT"]["M"];
@@ -71,6 +75,8 @@ Element::Element(const string& nm)
     // Area
     convert["M2"]["FT2"] = convert["M"]["FT"]*convert["M"]["FT"];
     convert["FT2"]["M2"] = 1.0/convert["M2"]["FT2"];
+    convert["CM2"]["FT2"] = convert["CM"]["FT"]*convert["CM"]["FT"];
+    convert["FT2"]["CM2"] = 1.0/convert["CM2"]["FT2"];
     convert["M2"]["IN2"] = convert["M"]["IN"]*convert["M"]["IN"];
     convert["IN2"]["M2"] = 1.0/convert["M2"]["IN2"];
     convert["FT2"]["IN2"] = 144.0;
@@ -93,10 +99,10 @@ 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"] = 360.0/(2.0*3.1415926);
+    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;
@@ -121,6 +127,8 @@ Element::Element(const string& nm)
     convert["FT/S"]["M/S"] = 1.0/convert["M/S"]["FT/S"];
     convert["M/SEC"]["FT/SEC"] = 3.2808399;
     convert["FT/SEC"]["M/SEC"] = 1.0/convert["M/SEC"]["FT/SEC"];
+    convert["KM/SEC"]["FT/SEC"] = 3280.8399;
+    convert["FT/SEC"]["KM/SEC"] = 1.0/convert["KM/SEC"]["FT/SEC"];
     // Torque
     convert["FT*LBS"]["N*M"] = 1.35581795;
     convert["N*M"]["FT*LBS"] = 1/convert["FT*LBS"]["N*M"];
@@ -153,6 +161,7 @@ Element::Element(const string& nm)
 
     // Length
     convert["M"]["M"] = 1.00;
+    convert["KM"]["KM"] = 1.00;
     convert["FT"]["FT"] = 1.00;
     convert["IN"]["IN"] = 1.00;
     // Area
@@ -195,6 +204,7 @@ Element::Element(const string& nm)
     convert["KTS"]["KTS"] = 1.00;
     convert["M/S"]["M/S"] = 1.0;
     convert["M/SEC"]["M/SEC"] = 1.0;
+    convert["KM/SEC"]["KM/SEC"] = 1.0;
     // Torque
     convert["FT*LBS"]["FT*LBS"] = 1.00;
     convert["N*M"]["N*M"] = 1.00;
@@ -478,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 an X triplet item for this column vector." << endl;
   }
   triplet(1) = value;
 
@@ -489,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 Y triplet item for this column vector." << endl;
   }
   triplet(2) = value;
 
@@ -500,7 +508,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;