+
+ // If we haven't found clouds layers, we read the bounday layers table.
+ if (result > 0)
+ return result;
+
+
+ // Read boundary layers node
+ boundaryNode = fgGetNode("/environment/config/boundary");
+
+ if (boundaryNode != NULL) {
+ i = 0;
+
+ // For each boundary layers
+ while ( ( boundaryEntry = boundaryNode->getNode( "entry", i ) ) != NULL ) {
+ elev = boundaryEntry->getDoubleValue( "elevation-ft" );
+
+ if (elev > result)
+ result = elev;
+
+ ++i;
+ }
+ }
+
+ // Convert the result in meter
+ result = result * SG_FEET_TO_METER;
+