Hi there,

The rest of this mail will just deal with the gear friction issue for now.

Having looked at Gear.cpp I think I can understand the issue a bit 
better. The method that calculates tire friction is Gear::calcFriction. 
It looks like this:

float Gear::calcFriction(float wgt, float v) //used on solid ground
{
     // How slow is stopped?  10 cm/second?
     const float STOP = 0.1f;
     const float iSTOP = 1.0f/STOP;
     v = Math::abs(v);
     if(v < STOP) return v*iSTOP * wgt * _sfric;
     else         return wgt * _dfric;
}

Note the constant in there that marks the point where static friction 
starts to get used. Also note that the constant is multiplied by v, so 
at zero speed, there is zero friction. This is perfectly fine on water, 
but not on solid ground. It also explains what's happening -- the force 
of the wind pushing against the plane will meet with no resistance until 
it starts to equal v*iSTOP * wgt * _sfric and the plane will eventually 
roll with that constant speed.

The reality is that on solid ground the force caused by static friction 
will be equal to the force acting upon the wheel (the bearings 
actually), up to a threshold of Fmax, when the wheel/bearing assembly 
will unstick and start to rotate.

Right now it seems that to fix this, reality must be modelled in this 
respect. If I take Andy's suggestion and just try to clamp the static 
friction to an arbitary fixed value, then the force returned may or may 
not be larger than the force pushing against the wheel, and the result 
will be that the plane rocks with the (3 knot) wind while very slowly 
turning into the wind, while stopped on tarmac...

The question is, where do I get the force acting upon the wheel?
To try to figure that out, I had to look into Model.cpp where I ran into 
further difficulties:

     // The landing gear
     for(i=0; i<_gears.size(); i++) {
         float force[3], contact[3];
         Gear* g = (Gear*)_gears.get(i);

         g->calcForce(&_body, s, lv, lrot);
         g->getForce(force, contact);
         _body.addForce(contact, force);
     }

Here the forces created by fricion on all the gears are added up. So if 
I was to keep the model stationary without any jitter, the sum of the 
resistive forces from the gears must exactly equal the sum of the force 
acting upon the gears. This is out of scope of just modifying Gear.cpp 
and definitely out of my league for both the knowledge of C++ and the 
Flightgear codebase.

Could someone please help me with this? Thanks in advance!

Cheers,
Vik



On 07/05/2012 09:34 PM, Andy Ross wrote:
> (Happened to be browsing in time to see a question)
>
> On 07/05/2012 06:21 AM, Viktor Radnai wrote:
>> I don't see any obvious properties to set to take the engine's
>> resistance to turning over, or the friction of the wheels into account
>> to stop these unrealistic things from happening. How should I go about
>> fixing them?
>
> That sounds right to me.  Aircraft parked in gentle winds weren't really
> part of the original test regime. :)
>
> For the gear thing, see Gear.cpp:450 or so, and look at clamping the
> static friction coefficient to some minimum value (probably tunable).
>
> For the engine, you can likewise add some fixed negative torque value
> near PistonEngine.cpp:214 to model internal resistance (currently the
> code only models output power).
>
> Andy
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to