- Joined
- May 30, 2008
- Messages
- 5,580
- Reaction score
- 2
- Points
- 0
One of the most annoying things about wheeled Orbiter vessels is that the nosewheel steering is extremely poor. I've got this great airport Wideawake, but none of the vessels out there can turn tight enough for the taxiways!
Sample Solution:
https://webspace.utexas.edu/btb289/www/Orbiter/Modules/DeltaGlider_wheel.zip
This is a replacement for the default DeltaGlider.dll in the Modules directory of your Orbiter install. Make a backup beforehand, if it matters to you.
The Details:
There is an undocumented function in the Vessel class, SetNosewheelSteering(bool), which wheeled vessels currently use. However, the turn rate even with this active is still fairly pitiful and makes it difficult to navigate taxiways.
Here's a simple solution I came up with which adds a more realistic tighter turning radius to the default DG: (all code first, then an analysis after)
Note that this adds a clbkPreStep function to the DG, which doesn't currently have it.
The maths:
This only turns the ship if the gear is deployed, the vessel is moving, and the nosegear is on the ground (estimated by checking the altitude).
This determines the length of the wheelbase in meters by finding the distance between the nose gear and the point between the main gears, in the z direction.
This calculates the maximum angle of the nosegear--for speeds under 10m/s, the maximum angle is 15 degrees...for speeds between 10 and 100 m/s, the maximum angle is a decreasing line from 15 to 0 degrees, and for speeds above 100m/s the maximum angle is 0 degrees. These numbers can be adjusted to suit the desires of the vessel.
This determines the actual angle of the nosegear (theta), based on the rudder deflection.
This determines the rotational velocity by making use of the equations:
and
The PI / 180 is to convert "90-theta" into radians from degrees.
Thoughts?
Sample Solution:
https://webspace.utexas.edu/btb289/www/Orbiter/Modules/DeltaGlider_wheel.zip
This is a replacement for the default DeltaGlider.dll in the Modules directory of your Orbiter install. Make a backup beforehand, if it matters to you.
The Details:
There is an undocumented function in the Vessel class, SetNosewheelSteering(bool), which wheeled vessels currently use. However, the turn rate even with this active is still fairly pitiful and makes it difficult to navigate taxiways.
Here's a simple solution I came up with which adds a more realistic tighter turning radius to the default DG: (all code first, then an analysis after)
Code:
void DeltaGlider::clbkPreStep (double simt, double simdt, double mjd)
{
if (gear_status == DOOR_OPEN && GetAirspeed() > 0 && GetAltitude() < GetCOG_elev() + .001) {
VECTOR3 pt1, pt2, pt3;
double airspd = GetAirspeed();
GetTouchdownPoints(pt1, pt2, pt3);
double wheelbase = pt1.z - (pt2.z + pt3.z) / 2.0;
double max_deflection = airspd < 10.0 ? 15.0 : 15.0 - 15.0 * ((airspd - 10.0) / 90.0);
if (max_deflection < 0.0)
max_deflection = 0.0;
double theta = -max_deflection * GetControlSurfaceLevel(AIRCTRL_RUDDER);
VECTOR3 avel;
GetAngularVel(avel);
avel.y = airspd/(wheelbase * tan((90 - theta) * PI / 180));
SetAngularVel(avel);
}
}
The maths:
Code:
if (gear_status == DOOR_OPEN && GetAirspeed() > 0 && GetAltitude() < GetCOG_elev() + .001) {
Code:
double wheelbase = pt1.z - (pt2.z + pt3.z) / 2.0;
Code:
double max_deflection = airspd < 10.0 ? 15.0 : 15.0 - 15.0 * ((airspd - 10.0) / 90.0);
if (max_deflection < 0.0)
max_deflection = 0.0;
Code:
double theta = -max_deflection * GetControlSurfaceLevel(AIRCTRL_RUDDER);
Code:
avel.y = airspd/(wheelbase * tan((90 - theta) * PI / 180));
Code:
radius (m) = wheelbase * tan(90 - theta)
Code:
turning rate (rad/s) = spd / radius
Thoughts?
Last edited: