Jonathan Polley wrote:
> 
> On Monday, May 13, 2002, at 05:20 AM, David Megginson wrote:
> 
> > Jonathan Polley writes:
> >
> >> Sorry, I mistyped the incorrect macro.  The block of code reads:
> >>
> >> #ifdef FG_WEATHERCM
> >>      sgScaleVec3(fFriction, v, cw_envelope * wind_facing_area_of_balloon
> >> *
> >> WeatherDatabase->getAirDensity(position) * speed / 2.0);  //wind
> >> resistance
> >>      sgScaleVec3(fLift, gravity_vector, -balloon_envelope_volume *
> >> wdbpos.AirPressure / (287.14 * wdbpos.Temperature));
> >> #endif
> >>
> >>      sgAddVec3(fTotal, fLift);
> >>      sgAddVec3(fTotal, fFriction);
> >>
> >> The values for fLift and fFriction are only set if FG_WEATHERCM is
> >> defined.
> >
> > That means that they weren't being set before when FG_NEW_ENVIRONMENT
> > was defined.  Personally, I wasn't aware that the balloon sim was even
> > working (it wasn't a year ago), but I'd be happy to patch the file so
> > that it works with or without FG_WEATHERCM -- what would you suggest?
> >
> 
> That makes me wonder why I didn't see the error before, probably more fun
> with MSVC.  Should the two sgAddVec3() calls go inside the #ifdef/#endif?

You didn't see the error before, as by default FG_NEW_ENVIRONMENT wasn't
defined and thus both of them got set.

MSVC isn't guilty at all. It's gcc as it didn't triger a warning/error
that those values aren't getting set now (untested, but my experience
with gcc so far is that it's much too error tolerant, at least in the
2.xx branch)

How to fix the problem:
just add a new "path" (i.e. #ifdef FG_WEATHERCM /*...*/ #else /*code
here*/ #endif) where the new environment code gets queried for the
necessary environment variables.

CU,
Christian

PS: BalloonSim ist working, only the code to move the balloon any other
direction than vertical is missing. But you should be able to test it,
just give full throttle and wait a bit...

--
The idea is to die young as late as possible.        -- Ashley Montague

Whoever that is/was; (c) by Douglas Adams would have been better...

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to