Andy Ross writes:
> Is the problem with the CAS output number, or is the whole
> simulator ignoring the wind?
Fortunately, it's just the CAS output number. I tried doing a
full-stall landing into a 25 kt headwind in the J3 Cub and was able to
set it straight down like a helicopter -- it's just that the ASI is
off.
> If it's just the output, the problem is likely in YASim.cxx; maybe
> it's using an absolute velocity incorrectly where it should have to
> add the wind itself?
Here's your code:
// Airflow velocity.
float wind[3];
wind[0] = get_V_north_airmass() * FT2M * -1.0; // Wind in NED
wind[1] = get_V_east_airmass() * FT2M * -1.0;
wind[2] = get_V_down_airmass() * FT2M * -1.0;
Math::tmul33(xyz2ned, wind, wind); // Wind in global
Math::sub3(s->v, wind, v); // V - wind in global
Math::vmul33(s->orient, s->v, v); // to body coordinates
_set_Velocities_Wind_Body(v[0]*M2FT, -v[1]*M2FT, -v[2]*M2FT);
_set_V_rel_wind(Math::mag3(v)*M2FT); // units?
Hmm. Should the fourth last line be this instead?
Math::vmul33(s->orient, v, v); // to body coordinates
I'll give it a try.
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel