Space Shuttle Ultra 1.25 Revision B development

Right, now it starts to be rather clear to me. I will also give it a try.
 
I think we have a problem with the new SRB performance code. Just did a launch and the boosters shot off like missiles off an F/A-18 at staging and the left booster nearly impacting the orbiter, missing only by some 13 m or so!

That's way too close!
 
Are you using the code I checked in yesterday (Rev 1228)? For me, the separation looks normal for both the regular and FWC SRBs.
 
Are you using the code I checked in yesterday (Rev 1228)? For me, the separation looks normal for both the regular and FWC SRBs.
Yes. I'll make another launch after a clean recompile.

---------- Post added at 03:29 PM ---------- Previous post was at 03:20 PM ----------

A clean recompile seems to have eliminated the problem, so the report can be disregarded.
 
I eliminated altitude-error reentry method. Yesterday I was trying to land with altitude error in debug string. I was keeping the error at max ~1km. This method resulted in very low energy. I was 4500nm from base at EI, entry angle was 1.2°. Now I'll be trying to use drag as reference somehow.
 
I eliminated altitude-error reentry method. Yesterday I was trying to land with altitude error in debug string. I was keeping the error at max ~1km. This method resulted in very low energy. I was 4500nm from base at EI, entry angle was 1.2°. Now I'll be trying to use drag as reference somehow.
That could be due to a number of issues: your drag profile is wrong, you're not correctly calculating the target altitude from the drag, or there's some other problem.

What I was thinking was that you could first make sure the drag reference was correct by displaying drag error and flying manually, then try writing the autopilot to maintain the required drag level.
 
Yeah I know, I just wanted to test my idea, and now I know what happened ;)

That could be due to a number of issues: your drag profile is wrong, you're not correctly calculating the target altitude from the drag, or there's some other problem.
The last option here - I just wrote lookup table for altitude at given groundspeed. Table has been taken from Entry Cue Card for KSC15. Now I'll try to play with drag.

So, my idea: I need to check lookup table for desired drag at certain groundspeed, then calculate altitude where I can achieve that drag? Lookup table for air density will be needed too, as you mentioned. This is what you mean? Also, about calculating needed drag as well: as we assume our velocity is constant at particular moment, we can estimate how much drag we need to have 1mach right above landing site - downrange in that point is 0, and it is HAC entry point. Can that be useful?

EDIT
I made some drag calculations, and it looks like my idea is not acceptable due to hight results, for example peak drag obtained is 51fps, which is waaay too much.
 
Last edited:
So, my idea: I need to check lookup table for desired drag at certain groundspeed, then calculate altitude where I can achieve that drag? Lookup table for air density will be needed too, as you mentioned. This is what you mean?
That's what I had in mind. It might be possible to look at that shuttle document you found and see how the actual shuttle calculates the target drag, and use that. Otherwise, I suspect a drag vs. speed table is the best way of calculating target drag.
 
Yesterday I read whole document and there isn't any info about drag formula, only algorithms and function names, for example: if something then execute function. No function bodies, but I wonder if they are published in ALT book. Anyway, I'll give it a try.
 
Yesterday I read whole document and there isn't any info about drag formula, only algorithms and function names, for example: if something then execute function. No function bodies, but I wonder if they are published in ALT book. Anyway, I'll give it a try.
Doubt it as the ALT flights were subsonic and drag control is only in play during hyper/supersonic regions.
 
Good news. Fizyk helped me to find equations to calculate required average drag needed to arrive over the base with ground speed of 300m/s, and equation to estimate atmosphere density at given altitude with given speed, so we don't need any lookup table now. So I did first test with drag equation only, and it seem to work very good. I was 1 mach when starting my turn to intercept HAC.

TODO:
-Autopilot that will follow drag profile and keep altitudes error as close 0 as possible. Should be ready in few days.
-Base selection we want to reenter to. Now it's only KSC. I'm thinking of loading base list from file, but maybe there is simplier formula.
 
And thank you Fizyk !!
 
Good news. Fizyk helped me to find equations to calculate required average drag needed to arrive over the base with ground speed of 300m/s, and equation to estimate atmosphere density at given altitude with given speed, so we don't need any lookup table now. So I did first test with drag equation only, and it seem to work very good. I was 1 mach when starting my turn to intercept HAC.

TODO:
-Autopilot that will follow drag profile and keep altitudes error as close 0 as possible. Should be ready in few days.
-Base selection we want to reenter to. Now it's only KSC. I'm thinking of loading base list from file, but maybe there is simplier formula.
I'd be interested in hearing other opinions, but the the base list should probably go in the mission file. The code for selecting the landing site is already available, although only KSC is listed at the moment. You can look at the AerojetDAP::CalculateRangeAndDELAZ function to see how it works (no sure if you've seen this already).

I implemented part of the TAEM guidance (from HAC intercept to touchdown) a while ago. Once you've got the entry autopilot working, I'll write the guidance for the rest of TAEM (from Mach 2.5 to HAC intercept).
 
Awesome news!

I'd be interested in hearing other opinions, but the the base list should probably go in the mission file.
I have nothing against it ;) I did small "base storage" graph, but this is rather cccccc combo breaker than useful ;)
t7bedi.jpg


The code for selecting the landing site is already available, although only KSC is listed at the moment. You can look at the AerojetDAP::CalculateRangeAndDELAZ function to see how it works (no sure if you've seen this already).
Yeah, I've seen that function already. I'm using it to calculate delAZ and range at the moment ;)
 
Oookay, I've done few tests, this time with altitude error, but at first:
This function very gently represents orbiter atmosphere density at given altitude:
[math]2.04959*e^{-0.000156935h}[/math], where h is altitude.
I generated table for altitude vs. density, and Fizyk generated that function using GNUPlot. I'm also using this drag equation to get required density to achieve target drag:
Eqn_Lift&Drag.gif


The problem is, that it works fine till ~50km. Then this function returns less air density than it should. Example: target drag to arrive at HAC with 300m/s speed was 8m/s^2(because function from above was failing earlier, compensation was included). On SurfaceMFD, indicated drag was -6.11, let's say absolute, 6.11. We need to increase drag, so we need to descent to get more air density. But function that return required density, returned less density than it should, so in result, delta altitude was positive, that means we have to climb. I'd blame drag coefficients in this equations, as they don't match SSU drag profile. There is site with all equations and drag coefficients:
http://www.columbiassacrifice.com/$A_reentry.htm

Any suggestions?

Ah, I forgot... SC: I was totally WOOOW when I was approaching flare, and noticed triangles coming up!
 
Last edited:
The site you linked to is about some conspiracy theory about the loss of space shuttle Columbia, so I wouldn't trust anything posted there. I think the easiest way of getting lift/drag coefficients is to use the same lookup tables SSU uses to give Orbiter the lift/drag coefficients. I'll add a function to the Atlantis class to calculate the lift/drag coefficients, and you can use that. One important thing to note is that the aerosurface positions have a fairly large impact on the values, so you may want to keep a running average of these values.

Also, how accurate is the function you're using to get atmosphere density? Using a lookup table and linear interpolation might be move accurate - there are linear interpolation functions in UltraMath.h

---------- Post added at 11:34 PM ---------- Previous post was at 07:29 PM ----------

Checked in the changes; the aerodynamic parameter values have been moved to ParameterValues.h
 
Values returned by this exponent function are very accurate. They match orbiter's atmosphere profile in almost 100%. I'm 100% sure, that the problem is with drag function. About conspiracy site, I knew that, but I was hoping, at least drag equation isn't conspired :P

---------- Post added at 10:14 PM ---------- Previous post was at 11:31 AM ----------

Right. I obtained drag coefficient from verticalLookup, with setting deflation to aerosurfaces.bodyFlap. Result's weren't so good. At some time It was showing me, that I have to descent 3km more, to achieve target drag, in spite of drag was already higher than target one. So, what is the best deflation should I refer to? Combined left and right elevon maybe? Or just set it to 0?
 
You can just pass the entire aerosurfaces struct to the lookup function, for the moment. What really makes a difference to the lift/drag values are the elevon positions; the body flap is currently set to 0 the whole time, IIRC. Averaging the elevon positions might be a good idea in case the elevons move sharply for a few seconds, throwing off your calculations.
 
I tested the function with elevons. There is almost no difference between body flap and elevons deflation. My conclusion - lookup table return too low drag coefficient. In result, this drag function returns lower drag, than orbiter's built-in GetDrag() returns. If I refer to GetDrag(), reentry is almost perfect every time. If I'm referring to altitude error, I'm descending too low, and loose too much energy at the beginning of the entry.
 
Can you post the code you have? The lookup function should return the exact drag coefficient used by Orbiter (assuming the Mach, AOA values are the same). I suspect something else is going on here.
 
Back
Top