A space race challenge. Orbiter vs. Reentry

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,271
Reaction score
3,244
Points
203
Location
Toulouse
Are the Apollo and Space Shuttle fuel cells very different ? I would say its pretty much the same tech (now I might be wrong). So yes, you people might want to share a "common fuel cell subsystem/class" that would work on both projects. ?

We also have some really useful things like the connector class, that allows us to send messages between vessels

That's something I'd really love to have on my current projects. Sadly my C++ skills are yet too limited to use interdependent classes hierarchy. I'll have to dig seriously into this at some point.
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
I don't imagine they were much different on a cell-basis. They had more cells (96 iirc) for a higher power output (vs 31 in Apollo), given that the nominal voltage is approximately the same, I would say individual cells has similar voltage/current density properties. I also know that both were build by Pratt and Whitney/UTC Power. and that they were KOH Bacon-type fuel cells.

If you're interested in my branch, which is still under heavy testing: https://github.com/orbiternassp/NASSP/compare/Orbiter2016...n7275:FuelCellVoltageTemperature

And keep in mind, this systems stuff goes back ~17 years before I ever made any contributions to it. my stuff is a drop in the bucket by comparison to others.

The connector thing is an invention of @movieman back in the day, if memory serves and is an Orbiter friendly wrapper for SendMessage()
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I don't imagine they were much different on a cell-basis. They had more cells (96 iirc) for a higher power output (vs 31 in Apollo), given that the nominal voltage is approximately the same, I would say individual cells has similar voltage/current density properties. I also know that both were build by Pratt and Whitney/UTC Power. and that they were KOH Bacon-type fuel cells.

If you're interested in my branch, which is still under heavy testing: https://github.com/orbiternassp/NASSP/compare/Orbiter2016...n7275:FuelCellVoltageTemperature

And keep in mind, this systems stuff goes back ~17 years before I ever made any contributions to it. my stuff is a drop in the bucket by comparison to others.

The connector thing is an invention of @movieman back in the day, if memory serves and is an Orbiter friendly wrapper for SendMessage()

I think the Space Shuttle ones are only in small details different to the Apollo ones. For example, they can be restarted in space, while Apollo only allowed starting a fuel cell by using GSE.

Generally, the main issue I have with using your component is that we would need to move to a different framework along the way for it. But considering the poor state of SSU in the moment, it is likely the faster solution than adapting your math into the SSU object life cycle. Maybe we can at least wrap your library into the libUltra framework.

But I grow old, I really should focus on the DPS now, I can't write code for any subsystem in SSU without melting my brain. ?
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,687
Reaction score
1,337
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
At this point, it probably wouldn't be good to make either one project dependent on the other, too much refactoring that needs to be done on both sides, and we'll both be stuck with bad code forever.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,588
Reaction score
2,312
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
At this point, it probably wouldn't be good to make either one project dependent on the other, too much refactoring that needs to be done on both sides, and we'll both be stuck with bad code forever.

I agree there. Also your code is existing, ours not, so it would be pretty much a one-way migration for a long time, before something comes from SSU that you might consider useful.
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Find historical flights [...] And see how accurate the flight is without deviating or correcting it.
This is an interesting challenge. And it lets me write about some of the things I spent half a year on for my Project Mercury X addon.
So quick backstory, for those who don't know: Project Mercury was NASA's first manned space program. First, two manned suborbital flights were launched with the Mercury-Redstone rocket. As human spaceflight was something brand new in 1961, the rockets were made as simple as possible (the Redstone was actually a direct descendant of the already then 20 year old V-2). No active navigation was used during launch, just a simple speed integrator for engine shutoff ("if total gained speed reaches 2010 m/s, then shut off engine"), and a pitch rate of either 0 or 0.67 deg/s decided by a gyroscope and a clock.
1618047459815.png
Image from NTRS document 19670028606 page 53.

In the Project Mercury X addon, the engine parameters (thrust, isp, fuel mass) and component masses are based on a wide range of conflicting sources, making a general value very uncertain. A problem therein, lies in the fact that just five Mercury-Redstones (MR) were ever launched, all with different recorded values. Take for example the engine thrust for the Redstone booster. For four different boosters over just six months (MR-2, MR-BD, MR-3, MR-4), it was listed as 82680 lbs, 78780 lbs, 78860 lbs and 79220 lbs respectively (NTRS document 19670028606 page 243). Now, what value am I supposed to pick for the rocket in Orbiter?

This headscratching is evident in the code for the addon, where I set the masses and thrusts for the rocket, escape tower, retropack and capsule itself (// denotes a comment):
C++:
STAGE1_MASS = 28440.0 - 607.5; // 28440, but now shaving off to get correct total weight (66 000 lbs = ) - 28089 kg
STAGE1_DRY_MASS = 3717; // Total booster dry weight 8 195 lbs
STAGE1_FUEL_MASS = STAGE1_MASS - STAGE1_DRY_MASS;
STAGE1_ISP_SL = 217.4 * G; // Value from MR-4
STAGE1_THRUST_SL = 79220.0 * 4.448; // Value from MR-4 (1 lb force = 4.448 N)
STAGE1_THRUST = 383e3; // For expected MR-BD data, vac thrust is 383e3 (from expected cutoff mass times expected cutoff acceleration). For actual MR-BD data, the value is 385e3 +- 12e3 N.
STAGE1_ISP_VAC = STAGE1_THRUST / STAGE1_THRUST_SL * STAGE1_ISP_SL;
// STAGE1_ISP_SL = 217.63*G; // Sea Level (235), 216 according to NTRS. MR-BD had 216.32 sec, which was 0.6 % below predicted
// STAGE1_THRUST = 383e3; // 414340, or 395892 (89 000 lbs). F = Isp * g0 * mdot. Flow rate for MR-BD was 364.19. 58.5 m/s^2 at cutoff of MR-BD. Predicted 57.0, which for predicted mass 14826 lb gives 383.3e3 N. This value is likely an underestimate
// STAGE1_ISP_VAC = STAGE1_THRUST / (78000.0 * 4.448) * STAGE1_ISP_SL; // This maybe has to be fixed. Don't know where to get a value, or if there is any calculation that can be done from other values.

ABORT_MASS_FUEL = 131.77; // For Little Joe it was 290.5 lb (19670022198 page 27)
ABORT_THRUST = 231308; // or 1267, or 231.3 kN, 52000 lb force
ABORT_ISP = 1.1 * ABORT_THRUST / ABORT_MASS_FUEL; // Calculated to give burn time 0.78 sec. But total impulse is 56795 lb s (p. 27 in same doc). Which gives burn time 1.1 sec
ABORT_MASS = 460.4; // or 580 kg. For Little Joe it was 1015 lbs. Total mass (wet)

RETRO_MASS = 237.0; // 237 kg, according to astronautix and http://www.braeunig.us/space/specs/mercury.htm
POSIGRADE_MASS_FUEL = 3.6; // Total 24 lb set (3.6 kg * 3), according to https://www.wired.com/2014/09/one-man-space-station-1960/. But edited to result dV 28 ft/s
POSIGRADE_THRUST = 1779; // MA-6 results pdf, page 14, 400 lb force (1779 N). Total dV is 28 ft/s. But that is from exerting force on booster, which cannot be simulated. Without it should be something like 15 ft/s
POSIGRADE_ISP = 1.0 * POSIGRADE_THRUST / POSIGRADE_MASS_FUEL; // Seems like Isp should be similar to retro. Is now 494 s
RETRO_MASS_FUEL = 20.0; // Astronautix, total 60 kg
RETRO_MASS_EMPTY = RETRO_MASS - RETRO_MASS_FUEL * 3 - POSIGRADE_MASS_FUEL * 3; // should be 177 kg
RETRO_THRUST = 4600; // MA-6 results pdf, page 14, 1000 lb force (4448 N). Total dV is 440 ft/s (134 m/s), but at an angle of 34 deg. Each retro produces 0.4 G acc (tot. 1.2 G)
RETRO_ISP = 11.5 * RETRO_THRUST / RETRO_MASS_FUEL; // 10 sec. burn time. Isp should be approx 230 s (astronautix) or 233 s (old proj.mercury addon). Now is 226.7 s. Some sources cite 12 sec. MA-9 postlaunch report part 1 shows 11.5 s

CAPSULE_MASS = 1224.24; // Was 1224.24 kg. According to Astronautix and 19670022650 it is closer to 1100 kg, plus person inside, which becomes something like 1224 kg anyway

Now, with all this in mind, let us compare the addon to a real flight. Luckily, there is a document with very accurate trajectory data for the MR-4 flight of Gus Grissom, July 21st 1961.

First, let's look at the position of the spacecraft, i.e. where it is, compared to where the real was.
Position.png
Pretty good. X is distance downrange, Y is altitude, and Z is sideways distance from target heading. The solid lines are historic, and the dotted are from Orbiter. We can immediately see that the simulation is accurate.
Let us look at the difference between historic and Orbiter positions.
Position difference.png
During the initial phase, the altitude (orange dashed) in Orbiter is higher than the real was. So either my thrust is too high, the drag too low, or the pitch program too slow to pitch down.
At engine cutoff at 142 seconds, the offset is almost 2 kilometers. In Orbiter, I'm at 63.2 km, where as Grissom was at 60.8 km (they had planned to be at 61.3 km). So it's off, but not terrible.
At apogee/retrofire at 315 seconds, the altitude is closer to the correct one. I'm at 189.7 km, while Grissom reached 190.4 km.
The downrange distance (blue dashed) is closer to the historic value, but after retrofire, it overshoots, ending at 5 km past the target.
The sideways deviation (green dashed) comes mainly from wind during launch, and lack of certain launch azimuth. Some sources state a heading of 99 degrees for MR-4, others state 100 degrees.

Next up, let's look at the velocity components: Speed params.png
The lines are from Orbiter, while the crosses are historic data. I got tired of manually copying down numbers from the historic PDF, so there aren't many data points shown here. But we can still see that both the speed and its angle fit very well to the historic data.
The biggest deviation is at the end, after reentry, when the capsule is free-falling towards the carrier. The big deviation at the end (solid green, right hand side), is mostly due to Orbiter 2016 having a heavy wind implemented, which causes a strong sideways drift. So while the real MR-4 fell straight down (180 degrees), the one in Orbiter drifts somewhat sideways (< 180 degrees).
If a real-life launch, such strong winds at the landing site would probably have led to a scrub and postponement of the launch.

Finally, let us look at the supersonic speeds and dynamic pressures: Atmosphere params.png
Now, here we see the biggest "errors" in the Orbiter simulation, and Orbiter's weakest point, physical simulation wise. It is notoriously difficult to predict weather, compared to orbital mechanics (which is why we know which second a solar eclipse will start in the year 3606, but not what the temperature will be in 8 days).
The dynamic pressure in Orbiter (green line) is much too high at reentry.
The mach speed is ridiculously off between 170 s and 450 s. But remember that the altitude is above 100 km during this time, so no well-defined atmosphere exists to compare speed of sound with.

The good thing about a rocket, is that it's made to be aerodynamic (i.e. made to not be influenced by the atmosphere), so the inaccuracies don't make a huge impact on the trajectory anyway.


Summary:
So the simulated capsule landed 9 km off from the historic point. How bad is this?
Well, considering that the entire flight is determined by the launch burn and the retrorocket burn, with no ability to correct the trajectory inbetween or thereafter, I think that it is pretty good.
Considering that the historic MR-4 flight itself landed 6.1 km from the target they themselves had set, I think the 9 km is definitely within the uncertainties of a nominal launch.

And remember, this is not just a simulation of this one flight. This is an interactive simulation. I initiated the launch myself. I initiated the retrofire myself. The capsule in Orbiter uses attitude control based on the actual pitch, yaw and roll observed in-game. It truly lives and breathes as the real capsule did. If you handed the data from Orbiter to the Mission Control in Florida in 1961, I don't think that they would have noticed any difference from any real life launch.
 
Top