Board index FlightGear Development Aircraft Flight dynamics model

FDM rudder on ground and brake system

Good sims require good FDMs (the "thing" that makes an aircraft behave like an aircraft).

FDM rudder on ground and brake system

Postby mmgfg2 » Sun Sep 20, 2015 8:07 am

In last time flight with side wind, the plane gound control of FG at last drove me to very limit of my patience.

No, really, guys, FG plane behaviour on ground is fenomenal:
- plane speen is less 5 km/h (human walk speed), i move rudder to the left to value about 1 degrees and the plane begin pwerful rotation to the left;
that is absolutely incorrect behaviour.

I beleive the wind (aver pressure P) to rudder (aver square S) rotated (to angle A) gives roation force Fr ~ P*S*Sin(A);
and the wind (pressure P) depends on air flow relative plane (IAS V) and additional air flow due to propeller (coeff Cp(RPM,IAS)), and since for any V,F m*V^2/2=F+L, Fr and P ~ V^2, that means P ~ V^2*Cp;
it results to Fr ~ V^2*Cp*S*Sin(A) and in the case of V=5km/h and Sin(3.14/180rad) is very near to zero, the Fr is very very low also.

All depends on plane, but i suppose we need IAS 60 km/h and more to feel air rudder light influence to movement trajectory in high angle rotated rudder on my probe plane.

It is curiouse to me, am i only person in the world for all the time who try to drive on FG plane on ground? Or what?

As i know, in the plane as YAK-52/53, that are without active nose or tail gear wheel, there is "brake force reduction (differentiation)" depends on rudder rotation angle, in other words, the more rudder is rotated to left, the more pressure to the brake of left gear wheel is applied in comparison with right gear wheel.

And i need move rudder to left in large angle and press lever of "main brake with reduction mechanism" by value before reduction between [0.0-1.0] to valuable rotate left plane with the low speed on the ground (or use separated wheel brakes if it exist in the plane).

So, in FG should be
- noticable changes in rudder influence to flight direction depended on non-linear IAS^2 and Cp(RPM,IAS);
- correct plane turns on ground.

Who is familiar with FG internals and can explain me how the behaviour could be expressed in FG with JSB?
I've taken a first look in FG source and found something like this:
JSBSim.cxx
FCS->SetDrCmd( -globals->get_controls()->get_rudder() );

To avoid digging the whole code, we need to
- know how the plane rotaion evaluated with "DrCmd";
- in which place;
- and how to turn the evaluation in right order.
Your advices.

2.
And also, how to adjust wheel brake system of FG plane to ensure brakes are applied with right forces and brake/unbrake time is specified correctly.

I am not sure, but by my feelings, no one plane in the world, as FG planes do, gives you so many energy to the high and even accelerated rotation around single brakeed side gear in slowing down light (2500kg) plane with low speed, othewise we need only airplanes instead of power stations.
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby Thorsten » Sun Sep 20, 2015 8:35 am

No, really, guys, FG plane behaviour on ground is fenomenal:
- plane speen is less 5 km/h (human walk speed), i move rudder to the left to value about 1 degrees and the plane begin pwerful rotation to the left;
that is absolutely incorrect behaviour.


It would perhaps help to know what plane you're talking about, since this is clearly FDM-specific behavior and has nothing to do with how FG works.

Who is familiar with FG internals and can explain me how the behaviour could be expressed in FG with JSB?


The forces and moments acting are completely determined by the FDM xml, there's no need to even look at the source code.

The yawing moment caused by the airstream of given rudder deflection is given by the relevant coefficient table of the yaw channel of the FDM declaration, the yawing moment caused by differential braking by the difference in rolling friction vs. dynamic friction coefficient of the contact point declaration of the relevant wheels, the effect of Nose wheel steering arises from the amount of steering available and the differences in rolling vs. dynamic friction, and the reaction to these forces is given by the yaw eigenvalue of the inertia tensor.

If the plane reacts oddly on the ground, one or more of these are not what they should be - the correct solution is to fix the numbers to the real ones.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: FDM rudder on ground and brake system

Postby Richard » Sun Sep 20, 2015 10:42 pm

The FDM isn't built into the core; it's all in the models which is great because it means you can fix things that aren't right and submit the changes back.

Generally when reporting a problem that is related to aircraft handling it helps anyone answering if you specify exactly what aeroplane you're flying, with a link to any aircraft that have come from somewhere other than the main flightgear.org aircraft download page.

A model may have nose wheel steering linked to the rudder; usually because of controller limitations. All of the airliners that I've seen have a tiller wheel that is a separate control but most joystick setups don't have this.

For the F-14 and F-15 there is an automatic system on the aircraft that links the rudders to the nose wheel sterring. The F-14 has NWS active at a variable rate when less than 80 knots. The F-15 has NWS always active when on the ground but two modes (there is a button on the back of the stick for this for FG it is bound to the keyboard, although there is no reason it couldn't be bound to the joystick).

There probably should be a standard way to choose this in the control binding to allow controls to be setup accordingly following an agreed standard.

You may also be able to use differential braking, although this also needs binding to a proportional controller as the keyboard on/off is too harsh).

If the aircraft doesn't have steerable nose wheel it's very easy to change the JSBSim model.

Open the model.xml file, find the following section and change the max_steer to 360 which is a magic number that tells JSBSim that you want an unsteered castering .

Code: Select all
  <contact type="BOGEY" name="NOSE">
...
   <max_steer unit="DEG"> 360 </max_steer>


If it's not a JSBSim model then I'm not exactly sure how you'd do this.

Finally I'd hope that you find the JSBSim F-14 and F-15 ground handling is well modelled as I spent a lot of time getting it right; and it does take a reasonable amount of time from the aircraft developer to get good ground handling.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Thu Sep 24, 2015 8:12 am

1.
Thorsten wrote in Sun Sep 20, 2015 8:35 am:It would perhaps help to know what plane you're talking about, since this is clearly FDM-specific behavior and has nothing to do with how FG works.
Ok, i can repeat, if i did not ensure readers about, that i did not enumerate planes, just becasue all planes i saw and used had the same behaviour i've listed. Even on not-FG sims that uses the same FDM JSB model, but i did not use very many planes in FG.

Thorsten wrote in Sun Sep 20, 2015 8:35 am:If the plane reacts oddly on the ground, one or more of these /relevant coefficient table of the yaw channel of the FDM declaration/ are not what they should be - the correct solution is to fix the numbers to the real ones.
You are right. And as i guess and wrote about, maybe not very clear, but in addition there are two separated rudder control systems on many real planes:
- base air rudder by air flow;
- additional gound steering by wheels.
The additional gound steering system by wheels is not mandatory and, for example in YAK-52/53, is replaced by reduction of side brakes, and concerning rudder control of plane in FG, the two rudder systems leads to appearing of two separated rudder control systems (that means in general you need 2 pairs of keys on keyboard to control wheel and air rudder separatedly, but in FG is just one).

But in current FG state, by my feeling, just any plane touch the ground, the plane became uses wheels as main rudder systems (even the system does not exist in plane), but in the time the position of rudder reflects only air rudder surface position, and there are no any correlations beween positions of the 2 separated rudders as itself, if no special mechanism works in plane. That leads to incorrect instant large stepping in plane behaviour "in yaw channel".

And, also by my feelings, the work of each rudder systems in FG is incorrect:
- air rudder must have more influence depends on IAS and the dependens ~V^2, that is not observed in FG;
- plane can not rotate in 90 degrees angle with IAS near zero even by very nice steering wheel, even car with direct transmission to side wheels can not do it.
In other words, the FG plane rotating as test program object, changing yaw vector just by keyboard add/sub angle command.

If you are beleive the reported are not bugs then consider it just as information to think about:
- std FG brake scripts (tuned brake force [0-1] and specified brake/unbrake reaction time);
- and the difficulties with adjusting of FG rudder system.
maybe one finds that the current impelmentation is not very good.

2.
Richard wrote in Sun Sep 20, 2015 10:42 pm:I spent a lot of time getting it right
Thanks for your efforts and hope you spent the time usefully for itself also. And concerning my case, with YAK-53M1, i want to find the way to tune the correct behaviour of the plane and any other plane i will use.

As i see, you suggested to change <max_steer unit="DEG"> </max_steer> of "NOSE" from my 50.0 to "magic number" 360.0.

I'll try to test 360.0 right now, but i want to mark, that "limited angle of rotation" is not the same as "uncontrolled wheel": being uncontrolled wheel can have limited angle of rotation also. The side effect must be evidently replaced by separated direct control word of FDM, by <controlable_wheel type="bool"> for example.

3.
Also the are many planes with tail controlable rudder wheel controlled by the same pedals as air rudder, but in the case i want to install system to pass reduced, different angle to rudder wheel in comparison with air rudder. For example pedal 45, air rudder 45, wheel 05. How the stuff can be implemented?

4.
While i still mark the question with wrong rudder control as not resolved.
And the Yak-53M1 plane FDM files can be downloaded who want to checkout it by ref to the model Yak-53M1.
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby Thorsten » Thu Sep 24, 2015 9:02 am

But in current FG state, by my feeling, just any plane touch the ground, the plane became uses wheels as main rudder systems (even the system does not exist in plane), but in the time the position of rudder reflects only air rudder surface position, and there are no any correlations beween positions of the 2 separated rudders as itself, if no special mechanism works in plane.


To state this again: the yawing moment of a plane on the ground or in air is not coded in any place in FG. What a plane does when you give a rudder command (i.e. whether it uses nose wheel steering, moves the rudder, does nothing or fires a selection of RCS thrusters) is in JSBSim entirely up to the specifics of the plane.

To give you an example, dependent on mission phase, the Space Shuttle might gimbal the main engines, fire the aft RCS thrusters or use a nose wheel when you give a rudder command (the one thing it rarely does is move the rudder, because that's under automatic control...)

So whatever your feeling may be, there is no FG-wide trend for planes to do weird things once they touch the ground and nothing that could be changed in the FG core to fix any problems.

(that means in general you need 2 pairs of keys on keyboard to control wheel and air rudder separatedly, but in FG is just one).


Again, what key / control input you map to what behaviour is entirely plane specific. I've seen airliners which implement a separate tiller to control nose wheel steering. It is however true that in many cases in reality pedals control both rudder and NWS, but that is in no way mandatory in the FG implementation.

- air rudder must have more influence depends on IAS and the dependens ~V^2, that is not observed in FG;


Here's a rudder yawing moment encoded (again, that's the Space Shuttle, data is from NASA in-situ and wind tunnel measurements):

Code: Select all
  <function name="aero/coefficient/Cndr">
       <description>Yaw_moment_due_to_rudder</description>
       <product>
           <property>aero/qbar-psf</property>
           <property>metrics/Sw-sqft</property>
           <property>metrics/bw-ft</property>
           <property>fcs/rudder-pos-rad</property>
      <property>systems/failures/airfoils-yaw-condition</property>
      <property>systems/apu/hyd-pressure-available</property>
      <value>57.2975</value>
      <table>
                  <independentVar lookup="row">velocities/mach</independentVar>
                  <tableData>
                          0.4   -0.0013
           0.6   -0.0013
           0.8   -0.00145
           1.0   -0.0015
           2.0   -0.00055
           4.0   -0.00025
           6.0   -0.00005
           10.0   0.0
           20.0   0.0   
                  </tableData>
         </table>
          <!--<value>-0.1</value>-->
       </product>
    </function>


The yawing moment is proportional to aero/qbar-psf which is the dynamical pressure of the air stream, and that goes to zero if the air velocity goes to zero. In addition, you'll notice that in this particular case the rudder action is Mach number dependent and goes effectively to zero above Mach 6 (the reason is that for hypersonic velocities most of the rudder is shadowed by the fuselage and not reached by the airstream), so for most of the atmospheric entry the Shuttle has to use yaw thrusters to stabilize.

So rather than realistic behavior 'not being observed' in FG, we have the ability to encode very complex dependencies on all sorts of parameters. Having said this, let me state again that the amount of realism is airplane-specific. There are certainly airplanes in which this is done the wrong way.

- plane can not rotate in 90 degrees angle with IAS near zero even by very nice steering wheel, even car with direct transmission to side wheels can not do it.


I assure you it can if you can vector the engines....

maybe one finds that the current impelmentation is not very good.


Again, of what plane? The current implementation of the Space Shuttle for instance is based on tons of data from NASA, and it behaves rather like the manual describes the real thing.

I'll try to test 360.0 right now, but i want to mark, that "limited angle of rotation" is not the same as "uncontrolled wheel": being uncontrolled wheel can have limited angle of rotation also. The side effect must be evidently replaced by separated direct control word of FDM, by <controlable_wheel type="bool"> for example.


Then look into the JSBSim manual and set the parameter right - there is a provision to describe a non-controlled wheel as well.

Also the are many planes with tail controlable rudder wheel controlled by the same pedals as air rudder, but in the case i want to install system to pass reduced, different angle to rudder wheel in comparison with air rudder. For example pedal 45, air rudder 45, wheel 05. How the stuff can be implemented?


<pure_gain> for a linear dependence, <fcs_function> or a table for a non-linear dependence, JSBSim has tons of support to make this as complicated as you like.

I'm not interested personally in the specific airplane which may or may not be problematic, but again - what you say is airplane specific and has no bearing on FG as a platform.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Thu Sep 24, 2015 9:36 am

Thorsten wrote in Thu Sep 24, 2015 9:02 am:To state this again: the yawing moment of a plane on the ground or in air is not coded in any place in FG.
Thank you for the reply. To say in true, while i do not understad why it is made in FG in that way, but i will think about.

By my current point of view, there are std situations, where we no need JSBsim tons of manual, just because all small airplanes, that is known to me, depends on rudder only by one way, that could be expressed in the FG JSBsim one time via effective square of air rudder surface and angle range of it's rotation. And the same with ground steering by wheels.

As i guess to get corect response i must tune "Yaw_moment_due_to_rudder" product, including in the expression all conditions on_gound/on_fly of my concrete aircraft. It looks as not easy work and i even do not know from which tail of the problem of evaluation of single production for all possible conditions i must begin (but in other way it gives ability to make aircrafts with very complex rudder systems).
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby hamzaalloush » Thu Sep 24, 2015 11:30 am

for what it's worth, i don't have much background on JSBSim, but it's tire model coefficients are derived from The Pacejka "Magic Formula", which is known to not work well at low speeds.

IIRC, the constants for the Pacejka formula can be found in the JSB Sim code, so if you think this is the main culprit, i would suggest to look there.

https://github.com/arktools/jsbsim/blob/master/src/models/FGLGear.cpp#L225

https://sourceforge.net/p/jsbsim/mailman/message/31621221/
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Thu Sep 24, 2015 12:38 pm

1.
Solution "magic number" <max_steer unit="DEG">360.0</max_steer> of "NOSE" works in first attempt:
- air rudder 've begun response ~V^2 on ground (approx.);
- nose wheel 've terminated steering by rudder control.
Anyrate max_steer backside effect is bad idea of JSBSim to express steering of nose wheel.

To ensure the solution is working i must rewrite brake script
Code: Select all
var fullBrakeTime = 0.5;
var applyBrakes = func(v, which = 0) {
    if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); }
    if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); }
}

linking v to abs(/controls/flight/rudder) and tune fullBrakeTime to correct angle of rotate in each and autorepeated brake key pressed.

2.
there is </controls/gear/nose-wheel-steering n="0" type="bool"> true by default, changed it to false does not work, the only known way is
"magic number" <max_steer unit="DEG">360.0</max_steer> of "NOSE"
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Thu Sep 24, 2015 4:39 pm

This is test example of new brake script for YAK-53M1-I (who is not ready to wait the new release of the plane but want correct its brake behaviour)
"local/Nasal/keyb_brakes_rud.nas"
Code: Select all
# user aircraft control
# each included nasal file must be in own namespace
# namespace keyb_brakes_rud

#var fullBrakeTime = 0.5;
#var applyBrakes = func (v, which = 0) {
#    if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); }
#    if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); }}

##########################################################################################
# brakes by rudder reduction
##########################################################################################
#
var brake_on_time = 0.5;
var brake_off_time = 0.1;

#rudder>0 moved right
#0.00-0.25 both brakes to max
#0.25-1.00 reducing right brake from max to br_shift
#0.25-0.50 reducing left brake from max/2 to zero
var lim_both = 0.25;
var lim_opp = 0.50;
var br_shift = 0.10;

# count brake reduction
# rud must be >0
var syn_brake = func (rud){

   if(rud < lim_both)return 1.0;

   var k = (br_shift - 1.0)/(1.0 - lim_both);
   var b = 1.0 - (k*lim_both);
   var tmp = k*rud + b;
   return tmp;
}

# count opposite brake reduction
# rud must be >0
var opp_brake = func (rud){

   if(rud >= lim_opp)return 0.0;
   if(rud < lim_both)return 1.0;

   var k = (0.0 - 0.5)/(lim_opp - lim_both);
   var b = 0.5 - (k*lim_both);
   var tmp = k*rud + b;
   return tmp;
}

#
var brakes_on = func () {
   
   #
   var rud = getprop("controls/flight/rudder");
    if( rud == nil ){ return; }
    if( rud > 1.0 ){ return; }
    if( rud < -1.0 ){ return; }

    #
   var l_brake = getprop("controls/gear/brake-left");
    if( l_brake == nil ){ return; }
   var r_brake = getprop("controls/gear/brake-right");
    if( r_brake == nil ){ return; }

    #
    if( (rud < lim_both) and (rud > (-lim_both)) ){
    interpolate("controls/gear/brake-left", 1.0, brake_on_time);
    interpolate("controls/gear/brake-right", 1.0, brake_on_time);
    return;
    }

    #
    if( rud > 0 ){
    interpolate("controls/gear/brake-left", opp_brake(rud), brake_on_time);
    interpolate("controls/gear/brake-right", syn_brake(rud), brake_on_time);
    return;
    }

    #
    if( rud < 0 ){
    interpolate("controls/gear/brake-left", syn_brake(-rud), brake_on_time);
    interpolate("controls/gear/brake-right", opp_brake(-rud), brake_on_time);
    return;
    }
}

#
var brakes_off = func () {

    interpolate("controls/gear/brake-left", 0, brake_off_time);
    interpolate("controls/gear/brake-right", 0, brake_off_time);
}

##########################################################################################

the nasal script can be used in "local/keyb-dcf-brakes-rud.xml"
Code: Select all
<?xml version="1.0"?>
<!--
Key binding definitions for yaw on ground
for plane that

has no steer wheel
has no separated brakes
has reduction of brake to left-right by rudder position
-->
<PropertyList>

 <key n="78">
  <name>N</name>
  <desc>Toggle parking brake on or off</desc>
  <binding>
   <command>nasal</command>
   <script>
   controls.applyParkingBrake(1);
   keyb_brakes_rud.brakes_off();
   </script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>
    controls.applyParkingBrake(0);
    </script>
   </binding>
  </mod-up>
 </key>

 <key n="98">
  <name>b</name>
  <desc>Move rudder left</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>controls/flight/rudder</property>
   <step type="double">-0.25</step>
  </binding>
 </key>

 <key n="109">
  <name>m</name>
  <desc>Move rudder right</desc>
  <repeatable type="bool">true</repeatable>
  <binding>
   <command>property-adjust</command>
   <property>controls/flight/rudder</property>
   <step type="double">0.25</step>
  </binding>
 </key>

 <key n="110">
  <name>n</name>
  <desc>Apply all brakes by rudder position</desc>
  <binding>
   <command>nasal</command>
   <script>keyb_brakes_rud.brakes_on()</script>
  </binding>
  <mod-up>
   <binding>
    <command>nasal</command>
    <script>keyb_brakes_rud.brakes_off()</script>
   </binding>
  </mod-up>
 </key>

</PropertyList>

and both in "Yak-53M1-I-set.xml"
Code: Select all
<input>
   <!-- Key bindings -->
   <keyboard n="0" include="local/keyb.xml"/>
   <keyboard n="0" include="local/keyb-dcf.xml"/>
   !<keyboard n="0" include="local/keyb-dcf-brakes-rud.xml"/>
   <keyboard n="0" include="set/Yak-53M1-keyb.xml"/>
...
   <!-- common user properties -->   
      <keyb> <file>local/Nasal/keyb-dcf.nas</file> </keyb>
      !<keyb_brakes_rud> <file>local/Nasal/keyb-dcf-brakes-rud.nas</file> </keyb_brakes_rud>
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby Thorsten » Thu Sep 24, 2015 5:14 pm

Anyrate max_steer backside effect is bad idea of JSBSim to express steering of nose wheel.


I rather get the impression you still don't really have the right idea how JSBSim works and what it aims to do, so you're probably doing one scripted hack to counter-act another hack rather than fix the physics, but since I failed to explain the idea two times already, I'm probably the wrong person.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: FDM rudder on ground and brake system

Postby Richard » Thu Sep 24, 2015 9:31 pm

hamzaalloush wrote in Thu Sep 24, 2015 11:30 am: The Pacejka "Magic Formula", which is known to not work well at low speeds.


That's often said; and for a driving simulation it holds a lot truer that the ground handling dynamics of an aircraft; the inertia of an aircraft at low speed (say < 20 kts) is still large compared to a car. What this means is that most of the time in an aircraft if you turn too quickly you'll just get smoke & squealing. I'm fairly sure that even on Level D sims the tyre isn't modeled even except for a friction coefficient.

hamzaalloush wrote in Thu Sep 24, 2015 11:30 am: the constants for the Pacejka formula can be found in the JSB Sim code, so if you think this is the main culprit, i would suggest to look there.[/url]


Mostly except for the ones in the individual gear model which can be set, i.e. static_friction, dynamic_friction, rolling_friction.

I've not changed my view that the JSBSim ground handling is perfectly acceptable. To clarify this I mean that a model can be tuned to give behaviour that is more than good enough.
Last edited by Richard on Thu Sep 24, 2015 10:30 pm, edited 1 time in total.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: FDM rudder on ground and brake system

Postby Richard » Thu Sep 24, 2015 10:22 pm

mmgfg2 wrote in Thu Sep 24, 2015 8:12 am:But in current FG state, by my feeling, just any plane touch the ground, the plane became uses wheels as main rudder systems


The F-14 doesn't do this. the steering is only active below 80 kts, with 15 degrees maximum deflection at 80kts which washes out at 0.27deg per kt until 135 knots when the nosewheel steering becomes inoperative. I did have the nosewheel steering completly inoperative below 80 knots and what's there now is the result of some old tuning work - and it might get removed in the next set of updates. reference: f14a.xml line 1002 to line 1028.

The F-15 has a different system; by default the nosewheel steering is only 3 degrees, with a button on the back of the stick to activate 'manuevering mode' which increases the deflection to 15 degrees.

There are a lot of aircraft that have basic flight models, such as those created by aeromatic.

And, also by my feelings, the work of each rudder systems in FG is incorrect:
- air rudder must have more influence depends on IAS and the dependens ~V^2, that is not observed in FG;

mmgfg2 wrote in Thu Sep 24, 2015 8:12 am:- plane can not rotate in 90 degrees angle with IAS near zero even by very nice steering wheel, even car with direct transmission to side wheels can not do it.

The centre of gravity on most aircraft is around the main gear and often the steering wheel is a long way in front of this; the F-14 nosewheel is 6 metres in front of the centre of gravity, and also it is just a single wheel on the centre line so the forces acting on the aircraft are different to a car.

mmgfg2 wrote in Thu Sep 24, 2015 8:12 am:If you are beleive the reported are not bugs then consider it just as information to think about:


They are limitations of the particular aircraft model and it is the model that needs to be improved; JSBSim is doing what it is told.

There are standard areas of FlightGear that affect all models, such as the joystick and keyboard input handling. These are standard but can all be changed.

mmgfg2 wrote in Thu Sep 24, 2015 8:12 am:Also the are many planes with tail controlable rudder wheel controlled by the same pedals as air rudder,


/fdm/jsbsim/fcs/steer-pos-deg[0]
/fdm/jsbsim/fcs/steer-pos-deg[1]

By default these will probably be all bound to the same input controller; this is something that might need to be handling differently in the input bindings. I haven't actually done this but I think you could have different channels for multiple steerable wheels, if indeed an aircraft was ever made with such a crazy configuration.

mmgfg2 wrote in Thu Sep 24, 2015 8:12 am:And the Yak-53M1 plane FDM files can be downloaded who want to checkout it by ref to the model Yak-53M1.


I've had a look at it seems to be a basic aeromatic model.

Please note that IAS is calculated in the formula for calculating side force due to rudder by way of qbar and doesn't need to be considered seperately.

There are a few things in the core code that I've had to code around (e.g. carrier initialization); but most things can be changed.

I've made the mistake in the past of thinking something needed to be changed when I just didn't understand how it should be done.

Often things need to be understood rather than changed.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Fri Sep 25, 2015 2:37 pm

Richard wrote in Thu Sep 24, 2015 10:22 pm:I've had a look at /Yak-53M1/ seems to be a basic aeromatic model.
the source of the model is unknown for me, somebody did the FDM for test base YAK-52 model and put it into net.

Richard wrote in Thu Sep 24, 2015 10:22 pm:reference: f14a.xml line 1002 to line 1028.
i guess you advise compare in the F14/F15 code. I will try, but i asked because thought the problem is well known and was resolved many years ago, that there is short and good solution and i no need to do raw work to express new "YAW_channel" for the trivial plane as cessna172 or YAK-52.

And for infomation, i'm repeating, that most models existed in the world, i've seen, even outside FG, nice from external view does the same wrong behaviour with rudder control as the basic aeromatic model.

Concerning "~V^2", when JSBSim does not treat nose wheel as steering wheel, the influence if air rudder is enough good for first stage of sim approximation. Now plane is controllable on ground by rudder. The all problems were in nose steering wheel that acted in the concrete JSBSim model similar to "value of constant angle of yaw rotation that was set by rudder angle".

The solution for right rudder control behaviour on gound results in appearance of second aircraft steering system, that controlled by separated keys on keyboard (b,m+n in the example in comparison with w,e for air rudder), by separated rudder controller in real aircraft or special real aircraft device to link both steering systems similar to brake reductor of YAK-52.

Richard wrote in Thu Sep 24, 2015 10:22 pm:/fdm/jsbsim/fcs/steer-pos-deg
that means i should consider check JSBSim manual to enumerate and learn purpose of all actual FDM parameters itself and FDM in FG-host environment. Not sure the manual exist.

So, as temporary solution, i do "direct sim" for really exist device of Yak-53M1 - brake reductor, the reduction device can be operative expressed by easy nasal script, that i 've done. And after some testing i decided to use another version of the script "local/Nasal/keyb_brakes_rud.nas"
Code: Select all
# user aircraft control
# each included nasal file must be in own namespace
# namespace keyb_brakes_rud

#var fullBrakeTime = 0.5;
#var applyBrakes = func (v, which = 0) {
#    if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); }
#    if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); }}

##########################################################################################
# brakes by rudder reduction
##########################################################################################
#
var brake_on_time = 0.4;
var brake_off_time = 0.1;

#rudder>0 moved right
#[0.00-0.25) both brakes to max
#[0.25-0.50) reducing left brake from max/2 to zero
#[0.25-0.50) reducing right brake from max to br_shift
#[0.50-1.00] increasing right brake from br_shift to max
var lim_both = 0.25;
var lim_opp = 0.50;
var br_shift = 0.10;

# count brake reduction
# rud must be >0
var syn_brake = func (rud){

   if(rud < lim_both)return 1.0;

   if(rud < lim_opp){
   var k = (br_shift - 1.0)/(lim_opp - lim_both);
   var b = 1.0 - (k*lim_both);
   return k*rud + b;
   }

   var k = (1.0 - br_shift)/(1.0 - lim_opp);
   var b = 1.0 - (k*1.0);
   return k*rud + b;
}

# count opposite brake reduction
# rud must be >0
var opp_brake = func (rud){

   if(rud < lim_both)return 1.0;

   if(rud < lim_opp){
   var k = (0.0 - 0.5)/(lim_opp - lim_both);
   var b = 0.5 - (k*lim_both);
   return k*rud + b;
   }

   return 0.0;
}

#
var brakes_on = func () {
   
   #
   var rud = getprop("controls/flight/rudder");
    if( rud == nil ){ return; }
    if( rud > 1.0 ){ return; }
    if( rud < -1.0 ){ return; }

    #
   var l_brake = getprop("controls/gear/brake-left");
    if( l_brake == nil ){ return; }
   var r_brake = getprop("controls/gear/brake-right");
    if( r_brake == nil ){ return; }

    #
    if( rud >= lim_both ){
    interpolate("controls/gear/brake-right", syn_brake(rud), brake_on_time);
    interpolate("controls/gear/brake-left", opp_brake(rud), brake_on_time);
    return;
    }

    #
    if( rud <= -lim_both ){
    interpolate("controls/gear/brake-left", syn_brake(-rud), brake_on_time);
    interpolate("controls/gear/brake-right", opp_brake(-rud), brake_on_time);
    return;
    }

    #
    if( rud >= 0 ){
    interpolate("controls/gear/brake-right", 1.0, brake_on_time);
    interpolate("controls/gear/brake-left", 1.0, brake_on_time);
    return;
    }

    #
    if( rud <= 0 ){
    interpolate("controls/gear/brake-left", 1.0, brake_on_time);
    interpolate("controls/gear/brake-right", 1.0, brake_on_time);
    return;
    }
}

#
var brakes_off = func () {

    interpolate("controls/gear/brake-left", 0, brake_off_time);
    interpolate("controls/gear/brake-right", 0, brake_off_time);
}

##########################################################################################

the reasones to change:
- in stress conditions of maximum rotation request pilot instinctively moves pedal to maximum angle and the position must be the most high value of separated brake also, otherwise there is no time to find middle of rudder to higher brake force;
- during acceleration for take off, even with side wind, it is prohibited by aircraft design to use brakes on Yak-53M1 and on some other aircrafts i know, so the position of max separated brake in position of max air rudder angle is not a problem;
- interpolation of brake force during 0.4 sec allows to reduce brake force by short pressing of brake lever in any high brake force rudder position;
- during taxi maximal speed is limited by aircraft design to very low values (<30 km/h), it is enough time to find position 0.5 to low separated brake force 0.1 and it is easy to move rudder around center on low angles during taxi to change move direction;
- rudder position less 0.25 is common brake and unrelated to separated brake used for steering, so the ugly 1-0-1 brake force value curve is not a problem.
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Re: FDM rudder on ground and brake system

Postby Richard » Fri Sep 25, 2015 9:21 pm

mmgfg2 wrote in Fri Sep 25, 2015 2:37 pm:the problem is well known and was resolved many years ago, that there is short and good solution and i no need to do raw work to express new "YAW_channel" for the trivial plane as cessna172 or YAK-52.

And for infomation, i'm repeating, that most models existed in the world, i've seen, even outside FG, nice from external view does the same wrong behaviour with rudder control as the basic aeromatic model.


There are a lot of basic aeroplane models out there, such as the YAK-52, that are just waiting for someone to make a proper aerodynamic model, but getting the aerodynamic data isn't easy.

The yaw moment from the rudder should be enough to turn the aeroplane after you get to a certain speed; however if the coefficients aren't right, or if the geometry (wheels, centre of gravity, aerorp) isn't right then it won't work right. This is where the JSBSim model is easily fixed as long as you understand the physics behind it.

I find that creating a JSBSim model is actually comparatively easy; I've read the JSBSim document but after I'd started; If you understand the physics the modelling isn't too hard. Using Nasal isn't brilliant, but is easy to grasp as it's a programming language, but I find it easier to model in JSBSim because the numbers are a lot clearer and the model structure is very component oriented.

JSBSim documentation http://jsbsim.sf.net/JSBSimReferenceManual.pdf, how to make an aircraft model in JSBSim: http://jsbsim.sourceforge.net/CreatingJ ... rcraft.pdf

One of the great things about models in FlightGear is that you can change pretty much anything to suit yourself.

Aeromatic gives you a model that will fly - but it isn't possible with the limited information that is provided to generate a model that is realistic. However it isn't an easy task to do this.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: FDM rudder on ground and brake system

Postby mmgfg2 » Tue Sep 29, 2015 12:19 pm

Thorsten wrote in Thu Sep 24, 2015 5:14 pm:I rather get the impression you still don't really have the right idea how JSBSim works
1. My intentioins is another subject of discussion.

In general case "changing the subject" and "reference to participants personalities" are 2 well-known ways from 5 to get result by violating rule "avoid lie" (others 3 are: ignoring opponents statemets at all and do not answering in conjuncion with them; state lair expressions; for each opponent note about the lair expression provide more another lair expressions). Just for information. Sweet time of preach.

In our case the ways lead to wrong idea that as far "i am not familiar with JSBSim programming" as "the plane can't steer because of my preferences", but that is not true.

The subject is how to force the plane steer in right manner, took in account there are many planes with the same steer behaviour already exist.

2. It is important to note, that there is non-zero observed default JSBSim behaviour of steering on ground: JSBSim is monitoring "on ground state" and itself change steering rules in accordance, without any my efforts.

From my point of view JSBSim should be specific aircraft skeleton, so observed by me the default JSBSim behaviour of steering on ground is incorrect for all aircraft, maybe excepting aircraft with "tail steering wheel" (or even "tail steering stick") hard linked with rudder.

There are many specific rules of taxi on the tail-wheel aircrafts, but JSBSim shoud had a way to change the default behaviour at least to: "wheel without steering", "nose steering wheel".

I hoped there is something like "int=0,1,2,3" property of JSBSim to change the steer behaviour and i asked here (instead of manual) about the property, not about complete FDM redesign.

3. And "max_steer backside effect is bad idea of JSBSim to express steering of nose wheel" is true because the programming solution is well-known design flaw also. There must be separated property to express steer behaviour form several exist in JSBSim by default.

4. From other side, FDM expressions should be power stuff to express desired aircraft behaviour, but to avoid the same raw work from aircraft to aircraft, in FG should be complete library of the properties "in FDM expressions" (to change JSBSim default) and to include them in own FDM file" and "control them by well defined parameters", at least for steering, because it is hard avoid taxy in aircraft.

But i suspect, the FDM language is not very elaborated in comparison any general purpose language, as C does.

For example, in FG expressions: simgear requires more regular syntax to calculate expression (not only several specific cases), that means all entities:
<property>(O);
<value>(O);
<interpolation>(IO);
<expression>(IO) /<expression><sum><input> tag to add chain input to expression for example/;
should be able to be placed in free for O and combined in more free for IO manner in "output to input chain in declaration order".

As for me, i even can not imagine why somebody decided to make this in other way. And the evaluation should report errors in xml as alert on xml load (or once) instead of silently does nothing.

The following example is not working as should do
Code: Select all
<animation>
<type>rotate</type>
   <object-name></object-name> 
<property type="string">local/test</property > //ok property
<value type="double">0.3</value> //error value
<expression>
   <value type="double">0.3</value> //ok value
   <property type="string">local/test</property > //ok property
</expression>
<interpolation> //error expression+interpolation in combination gives zero output
        <entry><ind> 0.0</ind><dep> 0</dep></entry>
        <entry><ind> 1.0</ind><dep> -150</dep></entry>
</interpolation>
<axis>
   <x>1.0</x>
   <y>0.0</y>
   <z>0.0</z>
</axis>
</animation>
I think it is subject to change.

5. And returning to original target to force plane to rotate in right manner.

It was not easy to imagine good design of brake reductor previous version V02, that it could detach reductor from rudder when brake lever pressed. In real brake reductor, moving rudder while brake lever pressed, will cause a continuous respective changes of brake force reduction. New V03 implements the behaviour, i hope finally
Code: Select all
# user aircraft control
# each included nasal file must be in own namespace
# namespace keyb_brakes_rud

#var fullBrakeTime = 0.5;
#var applyBrakes = func (v, which = 0) {
#    if (which <= 0) { interpolate("/controls/gear/brake-left", v, fullBrakeTime); }
#    if (which >= 0) { interpolate("/controls/gear/brake-right", v, fullBrakeTime); }}

##########################################################################################
# brakes by rudder reduction
##########################################################################################
#
var version = 3.0;
var brake_on_time = 0.3;
var brake_off_time = 0.1;

var brake_on_proc_time = 0.1;
var brake_on_proc_start_val = 0.001;

#################################
#rudder>0 moved right
#[0.00-0.25) both brakes to max
#[0.25-0.50) reducing left brake from max/2 to zero
#[0.25-0.50) reducing right brake from max to br_shift
#[0.50-1.00] increasing right brake from br_shift to max
var lim_both = 0.25;
var lim_opp = 0.50;
var br_shift = 0.10;

# count brake reduction
# rud must be >0
var syn_brake = func (rud){

   if(rud < lim_both)return 1.0;

   if(rud < lim_opp){
   var k = (br_shift - 1.0)/(lim_opp - lim_both);
   var b = 1.0 - (k*lim_both);
   return k*rud + b;
   }

   var k = (1.0 - br_shift)/(1.0 - lim_opp);
   var b = 1.0 - (k*1.0);
   return k*rud + b;
}

# count opposite brake reduction
# rud must be >0
var opp_brake = func (rud){

   if(rud < lim_both)return 1.0;

   if(rud < lim_opp){
   var k = (0.0 - 0.5)/(lim_opp - lim_both);
   var b = 0.5 - (k*lim_both);
   return k*rud + b;
   }

   return 0.0;
}

#################################
#
var brakes_on_process = func () {

    #
   var br_pos = getprop("controls/gear/local/brake_on_interp_pos");
    if( br_pos == nil ){ return; }

    #end of brakes_on_process exec
    var eop = 0;
    if( br_pos < brake_on_proc_start_val ){
    
    eop = 1;
    #implements brake shoe disconnect system
    br_pos = 0;
    }

   #
   var rud = getprop("controls/flight/rudder");
    if( rud == nil ){ return; }
    if( rud > 1.0 ){ rud = 1.0; }
    if( rud < -1.0 ){ rud = -1.0; }

    #
   var l_brake = getprop("controls/gear/brake-left");
    if( l_brake == nil ){ return; }
   var r_brake = getprop("controls/gear/brake-right");
    if( r_brake == nil ){ return; }

    #
    while(1){

    if( rud >= lim_both ){
    setprop("controls/gear/brake-right", syn_brake(rud)*br_pos );
    setprop("controls/gear/brake-left",  opp_brake(rud)*br_pos );
    break;
    }

    #
    if( rud <= -lim_both ){
    setprop("controls/gear/brake-left",  syn_brake(-rud)*br_pos );
    setprop("controls/gear/brake-right", opp_brake(-rud)*br_pos );
    break;
    }

    #
    if( rud >= 0 ){
    setprop("controls/gear/brake-right", 1.0*br_pos );
    setprop("controls/gear/brake-left",  1.0*br_pos );
    break;
    }

    #
    if( rud <= 0 ){
    setprop("controls/gear/brake-left",  1.0*br_pos );
    setprop("controls/gear/brake-right", 1.0*br_pos );
    break;
    }

    break;
    }

    #
   if( !eop ){ settimer( brakes_on_process, brake_on_proc_time ); }
}

#################################
#
var brakes_on = func () {
   
   var tmp = getprop("controls/gear/local/brake_on_interp_pos");
    if( tmp == nil ){ return; }

    setprop("controls/gear/local/brake_on_interp_pos", brake_on_proc_start_val );
   interpolate ("controls/gear/local/brake_on_interp_pos", 1.0, brake_on_time );
   settimer( brakes_on_process, brake_on_proc_time );
}

#
var brakes_off = func () {

   interpolate ("controls/gear/local/brake_on_interp_pos", 0.0, brake_off_time );
}

##########################################################################################
mmgfg2
 
Posts: 47
Joined: Wed Feb 25, 2015 12:51 pm

Next

Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 2 guests