On Tue, 2008-03-11 at 10:05 +0100, Nicolas wrote: > Hi, > Thank's for this quickly integration. > I send you a little improvement to fix : > - no rain when there isn't clouds layer > => Now, I read the boundary layer too > - disable the precipitation if the user doesn't want them ! > => Now, I read the property tree to know if precipitation are enable / > disable > (sgEnviro.get_precipitation_enable_state()) > > Regards > Nicolas >
Hi Nicolas, Great work on the rain so far! A couple of points on this patch: > + SGPropertyNode *node, *child; Can we have better names for these variables? > + // For each boundary layers > + while ( ( child = node->getNode( "entry", i ) ) != NULL ) { > + elev = child->getDoubleValue( "elevation-ft" ); > + > + if (elev > result) > + result = elev * SG_FEET_TO_METER; > + > + ++i; > + } "result" is stored in meters and compared to "elev" which is feet! How about: // For each boundary layers while ( ( child = node->getNode( "entry", i ) ) != NULL ) { elev = child->getDoubleValue( "elevation-ft" ) * SG_FEET_TO_METER; if (elev > result) result = elev; ++i; } > + * To seems real, we stop the precipitation above of clouds layer (or > bounday layer). > + * If METAR informations don't give us this altitude, we will be able to > find precipitations > + * in the space... > + * Moreover, above 0°C, we turn off the rain to snow. How about: * To seem real, we stop the precipitation above the cloud or boundry layer. * If METAR information doesn't give us this altitude, we will see precipitation * in space... * Moreover, above 0°C we change snow into rain. Thanks, Ron ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel