Jump to content

Landing Gear


Recommended Posts

I apologize if this has been answered before. I searched but couldn't find the answer.

Does raising/lowering your landing gear have any effect at all on the drag or aerodynamics (like making it pitch up or down) of a plane at the moment?

Link to comment
Share on other sites

Does raising/lowering your landing gear have any effect at all on the drag or aerodynamics (like making it pitch up or down) of a plane at the moment?

Not from my experience, no. I've flown SSTOs into orbit only to notice once up there that my gear was still down cause I was too stressed during takeoff to remember to raise them.

But rather than a definite no, I'll just say 'not in a significant enough manner'.

Link to comment
Share on other sites

it also affects the mass of your craft, as they have no mass when retracted.

I just tested it, there's no change in mass to the craft between deployed or retracted landing gear. I think you may be confusing it with the fact that they have a mass in the SPH/VAB and will there change your CoM, but as you launch they have no mass.

Link to comment
Share on other sites

From what I have read, the base KSP program it calculates them as drag or additional mass when they are down. Only for landing gear, not for legs.

I tested in my KSP but I have the FAR mod on it, and it does make a difference.

Link to comment
Share on other sites

Having looked through the equations, there is no difference in drag in the slightest, its a fixed constant. Raising or lowering the gear does nothing to the flight in any way, so knowing this I always leave them down unless I'm taking photos. The change in gear only starts the animation.

Link to comment
Share on other sites

I can't vouch for what the numbers say, but I can tell you what happens in flight. If you're flying along in a descent towards landing and you lower the landing gear, the airiplane will both slow down slightly and pitch down slightly. This is with stock air, not FAR.

Link to comment
Share on other sites

Having looked through the equations, there is no difference in drag in the slightest, its a fixed constant. Raising or lowering the gear does nothing to the flight in any way, so knowing this I always leave them down unless I'm taking photos. The change in gear only starts the animation.

I made a complete fool out of myself with this one. The drag of the landing gear jumps from 0.1 to 0.7 when comparing stowed to deployed.

Link to comment
Share on other sites

Its probably best to assume that it makes a difference, or probably will make a difference in a future KSP version. When I design craft, I try to design with probable future updates or refinements of the simulation. I can say that plane landing gear does have mass and/ or drag effects while flying; retracted or extended. You may test this by taking off without piloting. See how the plane behaves. Then in the SPH slide the forward gear either toward the front or toward the back a little. Then repeat the test. You should see a different behavior in the second test.

Your results may vary.

Update: I tested my Air Wasp plane (its in my package of "self flying planes" at the Spaceport). Prior to the addition of ladders to the craft, when flying at 1/3 throttle, pilotless and without SAS or any autopilot, with gear retracted, it flames out and attains an altitude of somewhere near 24000 meters and then tends to partially recover until it finally crashes about 15 minutes into the flight. However, when I test it now with gear extended, its maximum altitude is 18150 m, max speed is 545, and it flies for 50 minutes. After that it glides for another 10 minutes. It gets to about 300 meters altitude and speed of about 15 m/s, then due to the lack of forward momentum and lift, it dives the rest of the way; hitting water (in this case) at about 60 m/s, destroying the craft and killing my Kerbal. So landing gear does in practice affect flight. My Kerbal should have ejected. Hmmm. Wait. Someday?

I must say that when flying without piloting, there are probably random variables in KSP which may yield varying flight results, so I can't say for sure what elements have the most influence on variation between flights.

Edited by Dispatcher
I forgot the bolded words. Added the italicized.
Link to comment
Share on other sites

The aircraft landing gear (as opposed to the folding landing legs) are massless (and therefore dragless) in flight, whether extended or retracted. Check the mass of a craft in flight (info button in the map screen) before adding landing gear. Then add a bunch of them, and check the mass again. Makes no difference in the stock game. FAR likely changes this.

They are good at doing their job of being landing gear though, so they do serve that function. Where you place them on a plane makes a difference to how much aerodynamic moment you need to lift off the runway, but it doesn't actually change the center of mass. The CoM indicator in the SPH lies. Only trust it before you put the landing gear on.

All of this may change in future versions, but as of 0.21 I'm absolutely positive of this.

Link to comment
Share on other sites

So I'm hoping someone else can shed more light on this than I have done so far. Near as I can tell their are two classes within Kerbal that implement the Landing Gear Behaviour, "LandingGear" and "ModuleLandingGear", the latter of which is the one employed by the gear in question. From what little I can read into it, the "LandingGear" sets the drag values I stated before and implements them correctly, ie updating the values based on wether their stowed or deployed. It does this in the onPartFixedUpdate() method, and without testing it I can't be sure, but I'm fairly certain the behaviour is correct. The ModuleLandingGear, which is relevant as its the one we are actually using, does not assign any values to the stowed and deployed drag properties of the class object by default, and looking through the part.cfg for landing gear, can't see an ovveride, so my assumption is these are left as null, and thus the debate on wether drag comes into this in any way arises. ModuleLandingGear does in fact update the drag values with the relevant ones in its Update() method, but I don't know for certain if that method is Ever called, and even if it were, with null's representing those variables no doubt headache's would ensue.

In Summary, I looked behind the curtain, and I'm amazed Kerbal works at all sometimes. if your feeling daring try updating the landing gear's module to what I think is the correct one (LandingGear) and see if that makes a difference. I didn't see anything wrong with the mass, I'm assuming that's all inherited nicely, but I'll need to look into that further and get back to you all to be absolutely sure.

Edit: To Clarrify LandingGear extends the Part class directly, whilst ModuleLandingGear extends partModule, so you can't really swap them like I suggested, and they both have no relation to each other, other than being similarly named.

Edited by ChevronTango
Link to comment
Share on other sites

I've been studying this further. I did a quick experiment with a single rocket launched straight up, then again but with as many small landing gears strapped to it as I could get on it, both deployed and stowed, and each time I reached a max height of exactly 2353m. Draw your own conclusions about mass and drag.

yhk4.jpg

Link to comment
Share on other sites

The old setup (from before I started playing) was that parts derived from Part. The new setup is that you use the default Part and add modules derived from PartNodule. So I bet the LandingGear is obsolete code, while ModuleLandingGear is current.

Link to comment
Share on other sites

Ok, now I am truly confused. LOL

Should I attempt to account for the extra mass on the bottom of the plane in SPH when attempting to line up the CoT properly? I've been putting one off stuff on top to try and balance the mass of 3 wheels on the bottom (i.e., RCS fuel, a single solar panel, radial mount battery, etc.).

I will fly under the assumption that it does cause drag and should be stowed in flight. If it doesn't make a difference, I'm not hurting anything, and if it does...

The main issue then is whether or not you should try to balance the mass of the wheels to line up your CoT (or try to use them to shift CoM forward or back like I have also done).

EDIT: Chevron, could you launch that rocket one more time with all (but ONLY) the gears stripped off? That should settle the question of if it counts as 0 mass in flight for balancing purposes. If you don't want to let me know and I'll run an experiment myself, figured I'd ask since you have the rocket and the baseline numbers already. :D

EDIT 2: Never mind, I just reread your post. I misunderstood, on second reading it appears you DID launch it once without any gears on it. Thanks for that, and apparently they are indeed massless in flight. :)

Edited by iueras
Cause I can't read
Link to comment
Share on other sites

Strangely enough, I think I may have narrowed in on the exact cause of this little bug, so if any kerbal developers are watching please take a look at this.

The parts class, which almost all part use as base module either directly or as an extension module, uses a rigidbody property to set things like mass and drag and pass it on to the unity physics engine, however, for reasons beyond my understanding the parts module has a "Rigidbody" property in addition to the "rigidbody" property defined its its base class, namely the unity component class. For all parts these two distinct properties are in sync, ie the same, however for the landing gear they are out of sync, specifically the inherited component property "rigidbody" is null, meaning the Part class has had to instantiate a new Rigidbody for its own use, and obviously this is not good. when they are in sync they're fine, however quite a few of the calculations, namely mass and drag, rely on this object, which is null. The precise reasons for this being null on the landing gear is as of yet unknown to me as my debugging of the kerbal source is very limited, but I'm sure this may be of some interest to any developer working on the problem.

Edited by ChevronTango
Link to comment
Share on other sites

Nice bug-tracking to figure out why this is. If the Squad folks see and fix this, can you please make them less than half a ton in mass? Many many people will complain about spaceplanes that used to work not working any more if this bug is fixed without any other simultaneous changes to the aerodynamics or jet/intake mechanics.

Link to comment
Share on other sites

I have actually fixed the problem now. It turns out that the reason for it not counting mass and drag, despite all the properties being present, was on Load it was told to discount any sort of physical presence of the landing gear, Intentionally. One rogue line of code was all it took to cause all this. Bright side, I can fix the problem easily with a small plugin, bad news, you'll need to alter the landing gears cfg with a couple extra lines so it uses the fix, not perfectly ideal really.

The attached plugin is the fixed class for landing gear. You'll need to go into the part cfg for small landing gear and change:


MODULE
{
name = ModuleLandingGear
}

to


MODULE
{
name = ModuleLandingGearFix
stowedDragMin = 0.1
stowedDragMax = 0.1
deployedDragMin = 0.7
deployedDragMax = 0.7
}

and then install the plugin. That should give landing gear drag and weight as needed. The only thing of note is that the mass of landing gear is 0.5 Tons, which is a lot, but that's not the problem I'm trying to solve. Feel free to edit the cfg and reduce that if you so wish. It's made a lot of my planes suddenly very heavy.

plugin: http://www./download/oxzjx5uydph8f4c/ModuleLandingGearFix.dll

Source: http://www./view/3re8r5ncdb49npa/ModuleLandingGearFix.cs

Edited by ChevronTango
Link to comment
Share on other sites

Interesting thread. Im glad the landing gears dont have a weight because there to heavy any way. 100Kg at most considering there size would be suitable. I hope we get Medium and Heavy landing gears in the future.

Link to comment
Share on other sites

You can just adjust the mass to your liking. The default one adds about 2 tons to most of my planes which coupled with the drag makes previously easily takeoffs much more hairy. It's rather fun actually. Deploying gear mid flight now gives a noticeable deceleration.

Hopefully next update might have this in along with more sensible mass values.

Edit: Newly Discovered Problem, and perhaps the reason why physics for the landing gear was turned off in the first place, on landing or takeing off with larger aircraft the force on the wheels can be enough to break them. Solution: Turn up the crashTolerance, breakingForce, and breaking Torque.

revised and slightly more sensible part.cfg for the smallgearbay

Edited by ChevronTango
Link to comment
Share on other sites

Wow, thanks for the responses and effort here Chevron! Downloading that fix and .cfg now. I may lighten the gear some, though. I always felt it was too heavy, just from the amount of stuff I had to pile on top of a plane to balance 3 wheels in the SPH (not realizing that they were massless in flight).

Link to comment
Share on other sites

It turns out that the reason for it not counting mass and drag, despite all the properties being present, was on Load it was told to discount any sort of physical presence of the landing gear, Intentionally. One rogue line of code was all it took to cause all this.

Was this PhysicsSignificance (like with the cubic and octo-struts), or something else? Nice work.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...