Jump to content

Add CoM and CoA indicators to debug aero display


Recommended Posts

[Edit:  Per discussion in the thread below, a "center of aerodynamics" marker may not be as useful as this initial post would think... need to consider some more.  But adding a "center of mass" indicator to the aero display would be really helpful.]

 

An extremely common pain point for newcomers to KSP is aerodynamic stability.  How many times do we hear this:  "Why does my rocket keep flipping?"

Why do players have such a problem with this?  Here's why:  Aero instability happens when the center of drag gets in front of the center of mass.  But players have no way to see that.  It makes it very hard for them to diagnose the problems.

In an ideal world, we'd have a toggleable "center of drag" marker in the VAB / SPH ... except that that's not really a good option (which is why it's not already there in KSP).  There are very practical reasons that get in the way of such a display.  Drag depends on lots of stuff: velocity, angle of attack, atmospheric pressure.  Instability problems happen anywhere along a flight path-- a vehicle that's perfectly stable at one point may become unstable as fuel drains.  And so forth.  So I don't think it makes a lot of sense to try to add something there.

However:  We do have the aerodynamic overlay display.  It's nice to be able to see all those aero forces.  However, I don't think it's fully living up to its potential.  Unless something is glaringly obvious (i.e. a great big enormous drag arrow from something on the front of the craft), it can be hard for even an experienced player to glance at that display and quickly tell "is this craft stable?  unstable?  How stable or unstable?  Is its stability trending in the right direction?"

I think that adding two simple UI widgets to that display would make it much more useful; and, furthermore, I don't think they would be hard to add, in terms of programmability.

  • Center of mass indicator (CoM):  This would be the exact same black-and-yellow checkered ball that players are used to seeing in the VAB.
  • Center of aerodynamics indicator (CoA):  This would be the vector sum of all the current aerodynamic forces on the craft:  lift + drag.  And by "lift", I mean actual current lift (including body lift), not the explicit "lifting" parts such as wings that are currently in the CoL indicator in the vehicle editor.  This indicator would be another checkered ball (green, perhaps?).  Its location would be the geometric center of all the aero forces currently acting, and it would have an arrow drawn from it whose direction and magnitude would indicate the vector sum of those forces.

I think this would be programmatically very simple to add.  The game already knows where the CoM is (it centers the camera there, after all), and it also knows the offset, direction, and magnitude of all aerodynamic forces, so it can get the CoA just by adding those vectors together.

(There'd be some minimum threshold for aero forces, below which the CoA indicator would wink out, so you don't get it noisily and distractingly blipping around when the air gets really thin before escaping atmosphere.  Perhaps the radius of the sphere could be proportional to aero forces, so that it shrinks down to nothing as the aero forces do, or something.)

Having these two indicators pop up in the debug aero display would be incredibly useful to players.  You can just glance at it and see the position & direction of the CoA relative to the CoM, and that immediately tells you what your craft's stable orientation is, and how strongly it's going to be biased towards that direction.  You can see how it moves and responds to changing flight conditions:  your craft's speed, your draining of fuel, staging parts away, changing orientation, etc.

It makes explaining instability to a newbie (in a tutorial, or in the "gameplay questions" forum) much simpler:  "Turn on the aero display and look at the CoM and CoA markers.  You want your CoA to stay behind your CoM while you're in atmosphere."

Edited by Snark
Link to comment
Share on other sites

Very much agreed, with maybe one small difference. I think it would be useful to toggle between the traditional aero overlay that we already have, the overlay plus the new markers, and then be able to have only the new markers. 

My reasoning for this is that with some craft (especially big planes that have wings made from several parts) all those vecor lines can get a little jumbled. This might make it hard to see exactly what's going on with the two new markers. 

Link to comment
Share on other sites

1 hour ago, Snark said:

Aero instability happens when the center of drag gets in front of the center of mass

No it doesn't. It happens when positive AoA is followed by positive aerodynamics torque. Period. FAR-like static and dynamic analysis interface is a perfect example of complete and reliable display, while CoL is more than enough to eyeball.

Those, who don't understand aerodynamics will keep coming and asking questions. They are not lacking some explanation like

1 hour ago, Snark said:

"Turn on the aero display and look at the CoM and CoA markers.  You want your CoA to stay behind your CoM while you're in atmosphere."

they are lacking the understanding of flight dynamics. This instrumental approach can give a newbie a pitch-stable plane, then he'll fly around and enter flat-spin without a keel and come back to forum. There is plenty of plane design tutorials on this forum and on the wiki\reddit\whatever. Those, who want to learn, will do so. Those who don't want to, should be helped to understand, not to build.

In general, I think FAR-alike or a little bit more simplified tools (less scary for new players) would be of greater benefit for player, than some new markers. Also, geometric sum of forces is very poor indicator of stability. Summ of moments - much better one.

Edited by Boris-Barboris
typos
Link to comment
Share on other sites

7 minutes ago, Boris-Barboris said:

No it doesn't. It happens when positive AoA is followed by positive aerodynamics torque. Period.

And "positive aerodynamics torque" arises because... the sum of all torque forces is ahead of the CoM.

7 minutes ago, Boris-Barboris said:

This instrumental approach can give a newbie a pitch-stable plane, then he'll fly around and enter flat-spin without a keel and come back to forum.


And at the exact moment that the newbie enters into a flat spin, he will see that... the sum of all torque forces is ahead of the CoM.

Link to comment
Share on other sites

25 minutes ago, Boris-Barboris said:

No it doesn't. It happens when positive AoA is followed by positive aerodynamics torque. Period.

Care to elaborate on this?

Just to be clear:  I'm not expecting a tool that will indicate "will this ever lose control under any conditions."  I just want a very simple indicator that shows what is the actual sum of all the current forces on the ship.

"Positive aerodynamics torque" happens because the aero forces are pushing in a location+direction that cause the ship to twist away from prograde.

Okay, so, how do you tell whether that's happening?  If you have a simple visual indication that shows where and in what direction the sum of aero forces are acting, relative to the CoM, then that answers that question.  I'm not saying it solves everything, but it would be a helluva lot better than what we have now, in a really dead-simple and visually intuitive way.

One of the aspects of this that make diagnosing problems hard:  A typical "darn it, my ship flipped" scenario goes like this:

  1. the CoA location+direction ends up somewhere bad, relative to the CoM
  2. the ship flips

...and there's often a significant time lag between #1 and #2.  Even a ship that is "unstable" (in the sense that aero torque tends to increase rather than decrease the deviation from prograde) may remain controllable and flyable for a while, if it's sticking close enough to perfectly prograde to reduce the aero torque, and/or has enough reaction wheels.

That makes diagnosis difficult because the visual symptom (flipping) happens long enough after the initial problem (bad CoA relative to CoM) occurs that cause-and-effect may not be apparent. 

So adding indicators like this would show you right away things like "okay, my ship was stable, and then here's the point where my CoM starts moving up, and now it gets above my CoA, and ... oh look now it flips."

25 minutes ago, Boris-Barboris said:

Those, who don't understand aerodynamics will keep coming and asking questions. They are not lacking some explanation like

1 hour ago, Snark said:

"Turn on the aero display and look at the CoM and CoA markers.  You want your CoA to stay behind your CoM while you're in atmosphere."

they are lacking the understanding of flight dynamics. This instrumental approach can give a newbie a pitch-stable plane, then he'll fly around and enter flat-spin without a keel and come back to forum.

Except that being able to see the CoM and CoA will help to give them an understanding of flight dynamics.  You can see what is actually happening when you spin out of control.  If your plane is pitch-stable but yaw-unstable, you can see:  Okay, here I'm flying.  Now I pitch up and down, I can see how the forces move when it keeps me level.  Now I yaw left and I can see the point at which it goes south.

I don't expect that we'll stop having newbies posting questions in the forums.  This isn't a silver bullet, and it's not a substitute for having an actual understanding of aerodynamics, any more than having a dV display in KER is any substitute for having an actual understanding of how rockets work.  But it would make debugging problems a lot easier, and it would be a very handy communication tool when helping newbies in the forums.

Newbie:  "Help, my ship's flipping, why?"
Old hand:  "Screenshot with aero display, please."
Newbie:  "Here you go."
Old hand:  "See that you've got that green-thing with-aero positioned and pointed in a way that's twisting your ship around?  You want the green thing behind the yellow thing, pointing aft."

The description that the old hand gives is a lot easier and simpler if there's one single thing to point at, rather than a whole bunch of arrows all over the place.

Edited by Snark
Link to comment
Share on other sites

Just now, Boris-Barboris said:

Torque force?

Moments of force, if you prefer. Or if you really prefer, the "sum of forces inducing torque". Or any other wording which conveys - to your satisfaction - the principle that each part of a craft is individually contributing to change (or absence of change) in the angular momentum of your craft.

Link to comment
Share on other sites

4 minutes ago, Snark said:

Okay, so, how do you tell whether that's happening?

Very easy. Your plane flips. Why do you need a separate indicator to give you the knowledge you already have? For demonstration? Maybe, maybe, but for me it seems like a very empty thing. Flipping is a symptom of bad airframe. Wrong torque is also a symptom of the same thing. Why diagnose one problem with two sufficient signs? And the solution will be the same for both cases - move wings back.

10 minutes ago, Snark said:

So adding indicators like this would show you right away things like "okay, my ship was stable, and then here's the point where my CoM starts moving up, and now it gets above my CoA, and ... oh look now it flips."

And what kind of knowledge does it give? Let me rephrase that chain of events: "okay, my ship was stable, and here's the point where it becomes unstable, and it flips." And the same old solution - move wings back a little, CoM forward.

13 minutes ago, Snark said:

Except that being able to see the CoM and CoA will help to give them an understanding of flight dynamics.  You can see what is actually happening when you spin out of control.

Good point... Maybe it's too hard for me to grasp of what helps people, physics is in my blood for too long. Perhaps you're right, some people will be able to understand physics faster with CoP indicator.

 

Link to comment
Share on other sites

To reiterate:  It's not trying to be a silver bullet.  It's just that the aero display currently shows a whole mess of vectors.  This is a bewildering visual array, and it's useful to know "Okay, so what's the sum of all these arrows?"  That's very hard to take in at a glance.  Having a simple, obvious visual indicator of what the sum is, would be helpful.

And that's information that's fairly useless if you don't know where is the center of mass.  So including that also helps to make things relevant.  Heck, a CoM indicator would be helpful even if you didn't have any CoA indicator at all.

(While we're at it, a center-of-thrust indicator wouldn't be amiss, either.  Wouldn't do much for designs that keep the CoT reliably on-axis through the CoM, like radially-symmetric rocket designs, but would help for folks flying airplanes, shuttles, etc. where the CoT may be offset.)

Edited by Snark
Link to comment
Share on other sites

23 minutes ago, Plusck said:

Moments of force, if you prefer.

Torque is the moment of force. Displaying torque is bad idea, it's pointing towards left wing for unstable plane (try to explain that to new player). And sum force being ahead of CoM doesn't mean instability.

Link to comment
Share on other sites

8 minutes ago, Boris-Barboris said:

Torque is the moment of force. Displaying torque is bad idea, it's pointing towards left wing for unstable plane (try to explain that to new player). And sum force being ahead of CoM doesn't mean instability.

Would you be able to give an example where sum force being ahead of CoM is stable?

Or conversely, where sum force being behind CoM is unstable and not self-correcting?

Link to comment
Share on other sites

39 minutes ago, Boris-Barboris said:

Origin must be chosen. In the end you get constantly moving resizing vector. 

Actually, I think that's the point, that you can see when the CoA moves in front of CoM as it happens to give you an idea of when and how things went wrong to cause your craft to flip. 

Edited by FullMetalMachinist
Link to comment
Share on other sites

11 minutes ago, Plusck said:

Would you be able to give an example where sum force being ahead of CoM is stable?

Of course. 0 AoA, yet the plane is stable.
demonstration.png

The same 0 AoA trick with wings close to nose and aerobrakes close to tail will give you unstable plane with CoP behind CoM.

Link to comment
Share on other sites

2 minutes ago, Boris-Barboris said:

Of course. 0 AoA, yet the plane is stable.
demonstration.png

The same 0 AoA trick with wings close to nose and aerobrakes close to tail will give you unstable plane with CoP behind CoM.

There is zero torque in your example. The CoP is certainly not where you've drawn it in level flight. That aircraft is not stable since any change in AoA will immediately cause it to flip - the CoP could not move behind CoM fast enough with changing AoA to permit recovery. And anyway, Snark is talking about the centre of aerodynamic forces which is more like the notion of aerodynamic centre, which in your example must be behind the CoM otherwise it would not be stable. I find it astonishing that you marked a CoP which is so very far from the a.c.

Link to comment
Share on other sites

13 minutes ago, Plusck said:

There is zero torque in your example.

You ask, i draw.

13 minutes ago, Plusck said:

The CoP is certainly not where you've drawn it in level flight. That aircraft is not stable since any change in AoA will immediately cause it to flip - the CoP could not move behind CoM fast enough with changing AoA to permit recovery.

And who said it was in level flight? And it's not a CoL, it's CoP. It instantly moves behind CoM when AoA deviates from zero, confirming how little sense it makes for diagnostics.

13 minutes ago, Plusck said:

I find it astonishing that you marked a CoP which is so very far from the a.c.

Yes, I too find physics very interesting.

Edited by Boris-Barboris
Link to comment
Share on other sites

1 minute ago, Boris-Barboris said:

You ask, i draw.

And who said it was in level flight? And it's not a CoL, it's CoP. It instantly moves behind CoM when AoA deviates from zero, confirming how lottle sense it makes for diagnostics.

Yes, I too find physics very interesting.

Drawing something that cannot exist - or can only exist for an instant in a dynamic system - doesn't count. You indicate that as being a "wing" but it must be a dragless (and therefore liftless) wing to make the drawing true. Your claim that it instantly moves behind CoM is merely confirming that the sum of forces is, indeed, behind the CoM at all times except for the unstable 0 AoA configuration (because what you drew cannot ever remain at 0 AoA but will aways oscillate around it).

If CoP were displayed by the game, it would only blip forward of CoM (in your example) for an instant as the ship rotated perfectly through 0 AoA. The rest of the time it would settle reassuringly behind CoM, therefore clearly indicating that the craft is stable.

Link to comment
Share on other sites

@Plusck What does "doesn't count" mean? Does changing the question after getting the answer count then? Not to mention, if you add control system (even primitive one, like -AoA on canards from FAR), you once again can get CoP ahead of CoM while being stable, but you'll say "it doesn't count" again, since we're not a fixed airframe anymore (are we discussing one?). And wings are not dragless, it's just that on 0 AoA their drag is much less than that of a nosecone, that's why CoP is so far forward.

Either way, let's move on from that, I feel like we both understand that situation very well, you just forgot about 0 AoA case, and i got you there.

My point is: okay, I'm a noob, i'm flying my first plane, i pitch up, it flips, green dot moves around like crazy, it's vector rescales like crazy, what do i even learn from it? When i see overlay now, i see how forces are created, i see canards creating lift when i'm pressing S, i see them not creating them when i release S. This gives understanding. Some movearound dot won't give it to me. Static analysis graph won't give me understanding, but it will give me already baked pitching moment graph. I look and see, hmmm, it moves down, nice, it's stable. No crazy jumping green dots, no approximation. No flight testing, all in SPH.

You've mentioned aerodynamic center above. That would be a closest thing i think Snark ment. And it's not as jumpy as well, but, I'm afraid, it's not so easy to calculate for N-part craft. Still, it would be a good alternative to CoL in the editor. P.S. I just realised it is CoL by definition, lol.

Sorry, it's getting late in my timezone, let's continue tomorrow, if you will.

Edited by Boris-Barboris
Link to comment
Share on other sites

1 hour ago, Boris-Barboris said:

Of course. 0 AoA, yet the plane is stable.
demonstration.png

The same 0 AoA trick with wings close to nose and aerobrakes close to tail will give you unstable plane with CoP behind CoM.

There may be some confusion of nomenclature here.  What you just drew is what I call "unstable":  deviations tend to magnify rather than diminish.

A ball resting at the bottom of a depression is "stable" in the sense that if you displace it from the ideal stationary spot, it experiences a force that restores it there.  The farther away from the ideal spot it gets, the stronger the force moving it back to that spot.

A ball perched on the top of a hill is "unstable" in the sense that if you displace it from the ideal stationary spot at the apex, it experiences a force that moves it farther away.  The farther away from the spot it gets, the stronger the force moving it away from that spot becomes.

I call that second case "unstable", even if the ball happens to be perched perfectly stationary, because the smallest breath of disturbance will cause it to roll off the hill; I call the ball in the first case "stable" because you can disturb it from its rest location by quite a bit, but it gets restored back again.

The airplane diagram you've posted is the equivalent of the ball perched on top of a hill.  It may be perfectly capable of flying without spinning out of control, as long as (for example) you don't disturb it much off of prograde, and/or you have plenty of reaction torque or something to help correct for very small errors.

But if I'm flying that plane, it's really helpful to see that that CoA is way out in front of the CoM, because that gives me a hint of "here's the problem," as in "why does this plane spin out of control when I do a hard turn, but that plane turns like it's on rails?"

[Edit] Ah, I see what you mean.  You have a plane that's generally stable, but when it's flying straight ahead, the nose of the plane takes the brunt of the drag, so the CoA marker would be up front.  The fact that it's a stable plane is that if you then turn it a bit so that it's not zero AoA, the control surfaces at the rear of the plane start generating forces that restore it to pointing forward.  The effect of that in-game, if these markers were present, would be that when you go to a different AoA, the CoA marker would move backwards, back behind the CoM while the ship is being forced back to prograde.

That's an interesting point.  The question is, in practice, what would that look like.  Would it be confusing noise?  Or would it be a useful utility to see what's going on?  Hard to say without actually trying it.  Hmm... makes me kinda tempted to write a mod and then see how it actually plays out. :)

Edited by Snark
Link to comment
Share on other sites

36 minutes ago, Boris-Barboris said:

You've mentioned aerodynamic center above. That would be a closest thing i think Snark ment.

Yeah, he says that in the OP. 

37 minutes ago, Boris-Barboris said:

My point is: okay, I'm a noob, i'm flying my first plane, i pitch up, it flips, green dot moves around like crazy, it's vector rescales like crazy, what do i even learn from it? When i see overlay now, i see how forces are created, i see canards creating lift when i'm pressing S, i see them not creating them when i release S. This gives understanding. Some movearound dot won't give it to me.

Exactly why I suggested being able to toggle between 4 options :

1. Current aero overlay 

2. Current overlay in addition to the new markers 

3. New markers only 

4. Off

Link to comment
Share on other sites

3 hours ago, Plusck said:

There is zero torque in your example. The CoP is certainly not where you've drawn it in level flight. That aircraft is not stable since any change in AoA will immediately cause it to flip - the CoP could not move behind CoM fast enough with changing AoA to permit recovery. And anyway, Snark is talking about the centre of aerodynamic forces which is more like the notion of aerodynamic centre, which in your example must be behind the CoM otherwise it would not be stable. I find it astonishing that you marked a CoP which is so very far from the a.c.

That was also my immediate reaction to @Boris-Barboris's diagram, then I realized his actual point:

Suppose you have an actually aerodynamically stable airplane (i.e. one that's properly designed).  What would the aero forces look like in flight?  Set aside lift for the moment-- what does drag look like?

If it happens to be flying at zero AoA, so that all of its control surfaces are perfectly parallel to the airflow, they're generating minimal (near-zero) drag.  And there's no body lift from cylindrical components in the fuselage.  The biggest drag source is going to be the nose of the plane.  So if you had my proposed "center of aero" marker in that situation... it probably would be up by the nose of the plane, as Boris has drawn it.

Now, let's picture what happens if you take this stable aircraft that wants to be prograde ('coz it's stable) and you disturb it by giving some AoA in flight-- i.e. it's pointing slightly up or down.  Now all the control surfaces aren't parallel to the airflow any more, they have some "bite", and they move the plane back to prograde again.  Essentially, what you'd see if you had this CoA display on would be:  it's right up at the nose of the plane in zero-AoA level flight, then when you disturb the plane to give it some deviation from perfectly prograde, the CoA marker would "pounce" suddenly to the back of the plane, then snap back up to the front as it goes back to prograde.  If the plane wobbles a bit as it oscillates back and forth slightly to settle into prograde again, you'd see the CoA marker bounce back and forth from front to back of the plane.

So, yeah.  Some issues there.  That's not to say that something couldn't be done that might be helpful, but it's not as trivial as I was initially thinking.  :)

That said:  It would be trivially easy to add a CoM display to the aero overlay, and that would be quite helpful even by itself-- it would help to make sense of the arrows, by seeing how far from the CoM they are (not to mention which side of it).  You can kinda-sorta deduce the CoM now, because the camera always points straight at it, so by wobbling the camera back and forth you can sort of see where the CoM is.  But an explicitly drawn marker would be lots nicer.  (And would also help a lot with screenshots, if you're posting to the forums).

Edited by Snark
Link to comment
Share on other sites

When I said it "doesn't count" I mean that it is a situation that can only exist conceptually, and not in fact. It is also the sort of situation that, hopefully, the coding of the game cannot ever reproduce because it is a guaranteed "divide by zero / NaN / Kraken" moment. imho.

To illustrate, I made a picture myself of some "stable" situations. Admittedly, one of the three examples is simply ridiculous:
ghlHxmR.gif

To answer Snark's comment, yes the proposed indicator will suffer some jitter. However the jitteriness of the indicator is always going to indicate that the situation is balanced. You'd quickly understand that it can be ignored because it indicates natural (and stable) oscillation around a non-stable optimal AoA.

If the CoP or aerodynamic centre is ahead of the CoM then you have a problem. That problem is either (a) you cannot counteract the induced torque or (b) you could apply sufficient control if you were a computer managing canards, but you're not and KSP pilots aren't designed to be that either.

And to Boris-Barboris, I really don't think I was changing the question, since I was talking about stability. Obviously we disagree on that, but I do agree that moving on is the best way forward. At 0 AoA preferably. ;)

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...