Hi Curt, and Torsten
My initial investigations have turned up this in environment_mgr.cxx :
osg::Vec3 windVec(-_environment->get_wind_from_north_fps(),
-_environment->get_wind_from_east_fps(),
_environment->get_wind_from_down_fps());
simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER);
and this in particle.hxx
/**
* Set and get the wind vector for particles in the
* atmosphere. This vector is in the Z-up Y-north frame, and the
* magnitude is the velocity in meters per second.
*/
static void setWindVector(const osg::Vec3& wind) { _wind = wind; }
so it looks as if one or the other might be in error. I've tried
exchanging the x and y elements of the vector. It might be a bit better, but
it's still different to the submodels. Looks like the bug is more than this
apparent error.
Vivian
-----Original Message-----
From: Torsten Dreyer [mailto:tors...@t3r.de]
Sent: 21 July 2010 17:00
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] weather conditions and winds aloft not
working correctly..
Am 21.07.10 17:15, schrieb Curtis Olson:
On Wed, Jul 21, 2010 at 9:26 AM, Curtis Olson wrote:
Hi Vivian,
Thanks for checking out the submodels. Your image illustrates the problem
really well.
It sounds like this could very well be an issue in translating coordinate
frames, or possibly it's a kts. to mps conversion issue? I guess I need to
go hunt around and see if I can find where this is in the code.
Just to follow up my own message here. I setup the Rascal 110 which flies
slow and can emit smoke. I set the weather for "stormy monday" which puts
the wind at 70 kts.
What I am observing is that the smoke particles are flowing directly north.
There doesn't seem to be any east component to the smoke particle movement?
That's strange because I've verified that the wind velocity vector is being
computed correctly and sent to the particle system.
There is an #ifdef in particle.cxx ... #ifdef OSG_PARTICLE_FIX, I wonder if
that's somehow related. It get's defined #if SG_OSG_VERSION >= 27004
earlier in particles.cxx
Hmmm, could we be dealing with some sort of OSG bug? Or some difference in
behavior between OSG versions? The OSG_PARTICLE_FIX code is substantially
more complicated than without, but the way the #ifdef structure is setup, it
implies that OSG particles were *broken* in v2.7.4 and the fix applies to
any versions after that? Is that the case???
I don't know if it's somehow related, but the 3d clouds don't seem to drift
with the wind, either. Flying with crosswind with a magnitude as your
airspeed let you fly toward the clouds at a 45 degree angle. My setup was:
Wind from 1...@100, flying heading 270 with 100KTS. The clouds came in from
45degrees out of the right hand side.
Torsten
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel