* Justin Smithies -- Monday 27 March 2006 01:14:
> Could you help me with the suggestion you made below for the rudder ?

Something like this, whereby you feed /controls/flight/rudder-fdm to the
fdm. And you need to tweak the values, or write a better coefficient.
(Shouldn't be hard, mine is probably nonsense. :-)


  pow = func(v, w) { math.exp(math.ln(v) * w) }

  var voltage = props.globals.getNode("/systems/electrical/volts", 1);
  var rudderIn = props.globals.getNode("/controls/flight/rudder");
  var rudderOut = props.globals.getNode("/controls/flight/rudder-fdm", 1);
  rudderOut.setValue(rudderIn.getValue());

  rudderFilter = func  {
          var coeff = 1 / pow(10, (22 - voltage.getValue()) / 10);
          rudderOut.setValue(rudderOut.getValue() * (1 - coeff)
                          + rudderIn.getValue() * coeff);
          settimer(rudderFilter, 0.01);
  }

  settimer(rudderFilter, 0);

m.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to