Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for castering nosewheel with angle limiter. #880

Open
1 of 2 tasks
MariuszXC opened this issue Apr 5, 2023 · 8 comments
Open
1 of 2 tasks

Missing support for castering nosewheel with angle limiter. #880

MariuszXC opened this issue Apr 5, 2023 · 8 comments

Comments

@MariuszXC
Copy link

MariuszXC commented Apr 5, 2023

I'm submitting a ...

  • bug report
  • feature request

Describe the issue
[quotes from documentation] Currently JSBSim defines a castering wheel as "free to rotate and their angle is computed by JSBSim at any time from the local tangential speed" and "For any value of <max_steer> other than 0 and 360 degrees, the gear is assumed to be steerable".

There is no support for cases, where nose wheel is free castering (not steerable), but has mechanical end-stops to limit the available rotation angle. Please add such support, in the simplest form it could be an additional xml tag, for example:

<max_steer>360</max_steer><!-- free castering -->
<l_r_limit>30</l_r_limit><!-- compute angles no greater than this value -->

What is the current behavior?
Currently there is no way to specify rotation limits on a free castering whel.

What is the expected behavior?
Having a method to instruct JSBSim to limit the computed rotation angle.
This probably would have an impact on forces transferred from ground friction.

What is the motivation / use case for changing the behavior?
Better support for real use cases. An example is Diamond DA40NG.

Please tell us about your environment:
JSBSim version as included in current FlightGear sim.

Other information
In some aircraft the rotation axis is also slightly angled fore-aft. This, together with the force from supported mass creates an additional centering force-moment. It would be perfect to include this effect in the angle computation.

@bcoconni
Copy link
Member

bcoconni commented Apr 8, 2023

What is the motivation / use case for changing the behavior?
Better support for real use cases. An example is Diamond DA40NG.

Given the landing gears configuration of this aircraft I doubt very much that its nose leg has a caster wheel because that would make it unstable... and deadly during take off and landing.

Diamond DA40NG

Caster wheels are always at the rear of an aircraft for that very reason and I don't see much point in limiting the range of their rotating angle.

Are you sure you mean a caster wheel ?

@MariuszXC
Copy link
Author

MariuszXC commented Apr 17, 2023

It may be a language barrier, but I meant an unsteered front wheel, free to rotate around its (almost)vertical rotation axis.
Of the fact it is unsteered I am 100% certain. Ditto about +/- 30deg end-stops.

Please refer to DA40NG AMM: http://support.diamond-air.at/fileadmin/uploads/files/after_sales_support/DA40%20New%20Generation/Airplane_Maintenance_Manual/Basic_Manual/60215-r3-DA40-NG-AMM-complete.pdf
Section 32-20 (pdf document page 950 and onwards).

@gallonmate
Copy link
Contributor

gallonmate commented Apr 18, 2023

JSBSim already supports caster wheels with a angle limit. At least it did.
Try this in the aircraft file

<castered> 1.0 </castered>
<max_steer unit="DEG"> 30 </max_steer>

Edit: Nevermind, this doesn't work as a limit. I misunderstood some old code.

@bcoconni
Copy link
Member

It may be a language barrier, but I meant an unsteered front wheel, free to rotate around its (almost)vertical rotation axis. Of the fact it is unsteered I am 100% certain. Ditto about +/- 30deg end-stops.

Please refer to DA40NG AMM: http://support.diamond-air.at/fileadmin/uploads/files/after_sales_support/DA40%20New%20Generation/Airplane_Maintenance_Manual/Basic_Manual/60215-r3-DA40-NG-AMM-complete.pdf Section 32-20 (pdf document page 950 and onwards).

Thanks for the link @MariuszXC. I was indeed wrong in my assumptions.

@bcoconni
Copy link
Member

<castered> 1.0 </castered>
<max_steer unit="DEG"> 30 </max_steer>

Edit: Nevermind, this doesn't work as a limit. I misunderstood some old code.

<max_steer> does not work as a limit for caster wheel yet but it could ! 😄

Your suggestion provides the syntax that we need to address the feature requested by @MariuszXC. I'd say we only need to modify the method FGLGear::ComputeSteeringAngle so that is fabs(SteerAngle) is kept below MaxSteerAngle. Something like:

void FGLGear::ComputeSteeringAngle(void)
{
  if (Castered) {
      // Check that the speed is non-null otherwise keep the current angle
      if (vWhlVelVec.Magnitude(eX,eY) > 0.1)
        SteerAngle = atan2(vWhlVelVec(eY), fabs(vWhlVelVec(eX)));

      SteerAngle = Constrain(-MaxSteerAngle, SteerAngle, MaxSteerAngle);
  }
}

@MariuszXC
Copy link
Author

I would have to dive deeper into the unfamiliar code, so I'll better simply ask here.
What will happen when the nose wheel angle is constrained as in the code above, but the aircraft trajectory path is such, that a larger angle would have been computed? Will an additional force-moment due to increased ground friction be calculated and included in the sum of forces acting on the ac body?

@bcoconni
Copy link
Member

bcoconni commented May 9, 2023

What will happen when the nose wheel angle is constrained as in the code above, but the aircraft trajectory path is such, that a larger angle would have been computed?

The wheel will slip, a situation that JSBSim is perfectly capable of modeling.

Will an additional force-moment due to increased ground friction be calculated and included in the sum of forces acting on the ac body?

Yes. JSBSim uses a friction model to compute the forces that are induced by landing gears and their resulting force and moment. The code is located in src/models/FGAcceleration.cpp if you'd like to review it:

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Computes the contact forces just before integrating the EOM.
// This routine is using Lagrange multipliers and the projected Gauss-Seidel
// (PGS) method.
// Reference: See Erin Catto, "Iterative Dynamics with Temporal Coherence",
// February 22, 2005
// In JSBSim there is only one rigid body (the aircraft) and there can be
// multiple points of contact between the aircraft and the ground. As a
// consequence our matrix Jac*M^-1*Jac^T is not sparse and the algorithm
// described in Catto's paper has been adapted accordingly.
// The friction forces are resolved in the body frame relative to the origin
// (Earth center).
void FGAccelerations::CalculateFrictionForces(double dt)

@MariuszXC
Copy link
Author

Noted and appreciated. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants