![](https://forum.kerbalspaceprogram.com/uploads/set_resources_17/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://forum.kerbalspaceprogram.com/uploads/set_resources_17/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
Holy-Fire
Members-
Posts
7 -
Joined
-
Last visited
Reputation
0 NeutralProfile Information
-
About me
Bottle Rocketeer
-
I promised I'd report what I found, so... My results were inconclusive. It seems I could not even get consistent results even with the velocity, let alone acceleration. That is, given a segment where vertical velocity ranged in [a, b], the difference in altitude was outside the range [a dt, b dt]. So there's definitely something weird going on, maybe some discrepancies in the coordinate system. I've given up on trying to replicate it.
-
I'll clarify that, now that I know that the instantaneous altitude reported by the game isn't accurate (lags by some amount), I no longer have evidence for a problem in the instantaneous acceleration. I only see a difference in max altitude. None that I've seen. I'll try it. If this solves the altitude lag and I can get fine-grained, accurate altitude measurements, interpolating acceleration is relatively easy. Update: Time Control turns out to be only marginally useful. Kerbulator, on the other hand, is extremely useful. I'll play around a bit and report what I find.
-
THIS. In all of my recent measurements, I used these reported values mid-flight, because I wanted to isolate away the thrust phase. I was hoping they give me the correct value, and I could find the rest by interpolation. But if those are inaccurate... It can easily explain the discrepancies. So I simulated the short flights from launch, and the discrepancy in max height is small. This still leaves me with a discrepancy that accumulates over longer flights, which is what I started with before trying to isolate things. I did, or at least I thought I did. Playing around in the debug window revealed that there are two drag values associated with each part. I tried a ship made purely of parts with equal min and max drag, but it doesn't help much. I didn't find in the debug menu a way to get altitude and velocity values ("Flight debug stats" seems to just have some useless stuff). Can you suggest a way to get the data? If not in stock, perhaps an existing plugin, doing one myself is too much for me. If I could find a way to measure local values accurately, it will certainly help. My current setting is max dt/frame = 0.03 sec, which is too low to explain the discrepancy. I use a slightly fancier integration method, but I need a step size of ~2 secs to reach this kind of error. If all else fails I might try to rewrite my integration to match, but I doubt this is it.
-
I don't think they use a piecewise function for the atmospheric density. First, it would make little sense for them to do so, since it's actually more complicated; and, it's not consistent with measured results. For example, if you descend with a deployed parachute, your speed will be essentially equal to terminal velocity, and you can see it gradually go down as density increases. If they do use a very fine lookup table, it shouldn't materially affect the results. I doubt this is it. The gap is too big to be the result of any sane truncating; and, a game of this type should be expected to use high accuracy - all calculations being done in double, or at least single, precision floating-point, with no rounding except for display purposes.
-
Well, it seems weird that there would be such a difference. Any insights about how it could work? Ideally I would be able to collect enough data to determine the difference as a function of speed and height. But collecting data is too time-consuming for me. Which mods make it easier to collect such data? I mentioned a gap of 3.6 m/s^2; the inaccuracy is enough for that figure to actually be anywhere from 3 to 4 m/s^2, but I doubt it's outside this range. Even if only 3, it's very significant. The exact difference in max alt varies; in this case, I predict 3339 m and reach 3404 m, so about 2%. Anyway, the difference of 10% persists only for a short period of time; as the speed goes down, gravity dominates, and seems to work as expected. I doubt it. Centrifugal force has only a small effect, and other rotation effects turned out to be negligible in my calculations, definitely at lower altitudes. Isp is calculated based on g=9.82. But the actual g is 9.81 as far as I can tell. Hard to measure ground gravity directly with all the confounding factors, but measuring gravity in orbit confirms that at R=600000 it should be 9.81. I think this was also supported by my measurements of terminal velocity with a parachute, though maybe it wasn't accurate enough to be definite. Sounds odd - Coriolis force shouldn't apply torque to a rigid body - but it doesn't take much to tip an unstable equilibrium, and it could result from higher order effects. But assuming a point body and talking about max altitude, in the low atmosphere, it's not significant. Not quite. Yes, the actual centrifugal force is w^2*602000, but, as you go up to 2000, Coriolis force gives you a side velocity of w*2000. Coriolis force from this side velocity applies a downward force of w^2*2000. This exactly cancels out with the increase in centrifugal force. Other affects of the side velocity are negligible in this scenario. So it's safe to simply talk about a constant centrifugal force of w^2*600000. The thing is, it can't be simply "different drag" since simulating a fixed change in drag doesn't result in the experimental trajectory. There seems to be a dependence on the altitude or speed, but I can't figure out what it is. I might. Most of what I've read about 1.x makes me feel I will enjoy it less than 0.90. And this mystery has become a mostly academic thing now, I hope to solve it before moving on. Is there a way to ask the developers about this? Surely they would know...
-
I doubt it. It's too big of an error. And it's not just something that accumulates over a long time, I can detect differences in short timescales as well. Maybe... But how exactly are they messed up? What's missing compared to the calculation above? Yes. In this example I just have 3 parts - Probodobodyne HECS, Oscar-B Fuel Tank, Rockomax 48-7S. Of course, this happens also with other simple liquid-only configurations.
-
To help me build better ships, I programmed a numerical simulator in Mathematica that allows me to input the attributes of the ship's stages and output how far it can go. This was back in the <=0.90 era, I haven't moved to 1.x yet. I've included in it pretty much everything I could think of (including some not-completely-trivial aspects of the rotating reference frame), but the results are still a bit off compared to what I see in-game. With simple rockets that stay within the atmosphere or briefly exit it, the highest altitude reached is about 1% different from simulation. Not something that would materially affect ship design, but not good enough for a perfectionist like me. This has been driving me crazy and I've spent several hours trying to isolate the problem. I've recently collected some data from a rocket in flight (after the thrust phase, to keep it simple), applied locally cubic regression with a Gaussian kernel, and investigated the result. (Edit: The following example, it appears, is merely an artifact of incorrect altitude values reported by the game. But, there is still something I can't account for, which is apparent in longer flights (about 1% difference at 10km).) For example, I concluded that when my rocket was at 2000m and moving upwards (the direction shouldn't differ materially from straight up, and anyway, I calculated that a slight deviation wouldn't explain the discrepancy) at a speed of 252.1 m/s, the acceleration in-game is -47.77 m/s^2. What I would expect: Gravity: -9.81 * (600000/602000)^2 = -9.745 Centrifugal force: (2pi/21600)^2 * 600000 = 0.051 Drag: -0.5 * 0.008 * 1.2231 * 0.2 * Exp(-2000/5000) * 252.1^2 = -41.685 Total: -51.38 m/s^2 So my deceleration in-game is 3.6 m/s^2 lower that what my math says. I experimented with a lift force proportional to speed, and it does seem to help a bit, but I still don't get consistent results, and I don't understand why there should be such a force - the parts I've used don't have a lift rating AFAICT. And yeah, I know 0.90 aerodynamics aren't realistic, but I'm not looking for realistic, I'm looking for internally consistent. Could someone please put me out of my misery and explain what is going on? Thanks.