> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flightgear-devel-
> [EMAIL PROTECTED] On Behalf Of Vivian Meazza
> Sent: 20 June 2005 13:13
> To: 'FlightGear developers discussions'
> Subject: RE: [Flightgear-devel] Re: New turbo/supercharger code
> 
> Melchior FRANZ
> 
> >
> > * Vivian Meazza -- Saturday 18 June 2005 12:22:
> > > void Thruster::setThrottle(float throttle)
> > > {
> > >     _throttle = Math::clamp(throttle, 0, 1);
> > > }
> > >
> > > Will this prevent a negative value for:
> > >
> > > <control-input axis="/controls/engines/engine[0]/boost-control"
> > > control="THROTTLE"/>
> >
> > No, but this will:
> >
> > ControlMap.cpp:83:----------------------------------------------------
> >
> >       map->src0 = map->dst0 = rangeMin(type);
> >
> >
> > ControlMap.cpp:222:---------------------------------------------------
> >
> > float ControlMap::rangeMin(int type)
> > {
> >     // The minimum of the range for each type of control
> >     switch(type) {
> >     case FLAP0:    return -1;  // [-1:1]
> >     case FLAP1:    return -1;
> >     case STEER:    return -1;
> >     case CYCLICELE: return -1;
> >     case CYCLICAIL: return -1;
> >     case COLLECTIVE: return -1;
> >     case MAGNETOS: return 0;   // [0:3]
> >     default:       return 0;   // [0:1]
> >     }
> > }
> >
> >
> > There's no THROTTLE, so we get the default 0 set for map->{src,dst}0.
> > You can avoid that by setting {src,dst}{0,1} explicitly, for example:
> >
> >    <control-input axis="/controls/engines/engine[0]/boost-control"
> >                   src0="-1" src1="1" dst0="-1" dst1="1"
> > control="THROTTLE"/>
> >
> 
> Right - that fixes the problem.


With Melchior's valuable help I have developed a nasal simulation of the
Boost Control and Boost Control Cutout for the Hurricane. This should be
committed to cvs shortly. When a preset boost value is exceeded, the Boost
Control acts to reduce throttle opening. This action can be overridden by
the Boost Control Cutout which allows maximum boost. The output of the Boost
Control is smoothed by a low-pass filter selected by Melchior. You will
notice an overshoot and some lag if the throttle is opened quickly.

To make it work a patch (for cvs/head) is required to YASim - attached. A
new attribute 'supercharger' has been added to the aircraft config file.
When this is true, the attribute 'wastegate' no longer controls the
supercharger output. If you want to try the update to the Hurricane, you
will need to apply this patch. It will not adversely affect any other YASim
model, so far as I can tell.

Both the nasal and YASim patch are temporary; both will require reworking
when Andy comes up with his revision of YASim to include the new
supercharger code.

Any testing would be welcome, although Melchior is doing his best to break
it already! In particular any feedback on any adverse effects on other
models would be good.

Regards,

Vivian 

Attachment: yasim3.diff
Description: Binary data

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to