]> git.mxchange.org Git - flightgear.git/commitdiff
Cleanup, no functional change
authorTorsten Dreyer <torsten@t3r.de>
Wed, 5 Mar 2014 13:09:40 +0000 (14:09 +0100)
committerTorsten Dreyer <torsten@t3r.de>
Wed, 5 Mar 2014 13:09:40 +0000 (14:09 +0100)
src/Main/fg_commands.cxx

index 206a92b57532b25ed56589ac910a0ab4474e38d4..f58e9317d1330b5eea48e17e6c51e38989cf76f5 100644 (file)
@@ -534,138 +534,6 @@ do_materials_reload (const SGPropertyNode * arg)
     return true;
 }
 
-
-#if 0
-These do_set_(some-environment-parameters) are deprecated and no longer 
-useful/functional - Torsten Dreyer, January 2011
-/**
- * Set the sea level outside air temperature and assigning that to all
- * boundary and aloft environment layers.
- */
-static bool
-do_set_sea_level_degc ( double temp_sea_level_degc)
-{
-    SGPropertyNode *node, *child;
-
-    // boundary layers
-    node = fgGetNode( "/environment/config/boundary" );
-    if ( node != NULL ) {
-      int i = 0;
-      while ( ( child = node->getNode( "entry", i ) ) != NULL ) {
-       child->setDoubleValue( "temperature-sea-level-degc",
-                              temp_sea_level_degc );
-       ++i;
-      }
-    }
-
-    // aloft layers
-    node = fgGetNode( "/environment/config/aloft" );
-    if ( node != NULL ) {
-      int i = 0;
-      while ( ( child = node->getNode( "entry", i ) ) != NULL ) {
-       child->setDoubleValue( "temperature-sea-level-degc",
-                              temp_sea_level_degc );
-       ++i;
-      }
-    }
-
-    return true;
-}
-
-static bool
-do_set_sea_level_degc (const SGPropertyNode * arg)
-{
-    return do_set_sea_level_degc( arg->getDoubleValue("temp-degc", 15.0) );
-}
-
-
-/**
- * Set the outside air temperature at the "current" altitude by first
- * calculating the corresponding sea level temp, and assigning that to
- * all boundary and aloft environment layers.
- */
-static bool
-do_set_oat_degc (const SGPropertyNode * arg)
-{
-    double oat_degc = arg->getDoubleValue("temp-degc", 15.0);
-    // check for an altitude specified in the arguments, otherwise use
-    // current aircraft altitude.
-    const SGPropertyNode *altitude_ft = arg->getChild("altitude-ft");
-    if ( altitude_ft == NULL ) {
-        altitude_ft = fgGetNode("/position/altitude-ft");
-    }
-
-    FGEnvironment dummy;       // instantiate a dummy so we can leech a method
-    dummy.set_elevation_ft( altitude_ft->getDoubleValue() );
-    dummy.set_temperature_degc( oat_degc );
-    return do_set_sea_level_degc( dummy.get_temperature_sea_level_degc());
-}
-
-/**
- * Set the sea level outside air dewpoint and assigning that to all
- * boundary and aloft environment layers.
- */
-static bool
-do_set_dewpoint_sea_level_degc (double dewpoint_sea_level_degc)
-{
-
-    SGPropertyNode *node, *child;
-
-    // boundary layers
-    node = fgGetNode( "/environment/config/boundary" );
-    if ( node != NULL ) {
-      int i = 0;
-      while ( ( child = node->getNode( "entry", i ) ) != NULL ) {
-       child->setDoubleValue( "dewpoint-sea-level-degc",
-                              dewpoint_sea_level_degc );
-       ++i;
-      }
-    }
-
-    // aloft layers
-    node = fgGetNode( "/environment/config/aloft" );
-    if ( node != NULL ) {
-      int i = 0;
-      while ( ( child = node->getNode( "entry", i ) ) != NULL ) {
-       child->setDoubleValue( "dewpoint-sea-level-degc",
-                              dewpoint_sea_level_degc );
-       ++i;
-      }
-    }
-
-    return true;
-}
-
-static bool
-do_set_dewpoint_sea_level_degc (const SGPropertyNode * arg)
-{
-    return do_set_dewpoint_sea_level_degc(arg->getDoubleValue("dewpoint-degc", 5.0));
-}
-
-/**
- * Set the outside air dewpoint at the "current" altitude by first
- * calculating the corresponding sea level dewpoint, and assigning
- * that to all boundary and aloft environment layers.
- */
-static bool
-do_set_dewpoint_degc (const SGPropertyNode * arg)
-{
-    double dewpoint_degc = arg->getDoubleValue("dewpoint-degc", 5.0);
-
-    // check for an altitude specified in the arguments, otherwise use
-    // current aircraft altitude.
-    const SGPropertyNode *altitude_ft = arg->getChild("altitude-ft");
-    if ( altitude_ft == NULL ) {
-        altitude_ft = fgGetNode("/position/altitude-ft");
-    }
-
-    FGEnvironment dummy;       // instantiate a dummy so we can leech a method
-    dummy.set_elevation_ft( altitude_ft->getDoubleValue() );
-    dummy.set_dewpoint_degc( dewpoint_degc );
-    return do_set_dewpoint_sea_level_degc(dummy.get_dewpoint_sea_level_degc());
-}
-#endif
-
 /**
  * Built-in command: toggle a bool property value.
  *