Last time on Spacey Balls P, we watched Tom as he struggled to find his way to Fr?fdal, the land in which he believed God to reside. This time, after redoing his orbit because apparently he wasn’t close enough for the automatic landing to kick in, we watch as he attempts to scan Fr?fdal for gases, lower his orbit to a suitable location and take lots of pretty pictures and videos while finding a landing spot. Can he do it, or will he fall and crash multiple times while talking to people who aren’t even there or even rapping against a fucking chair? Find out in this exciting new space-themed blog post of Spacer Stalls B!
So yeah, anyways, ignore that terrible intro please. It has… unsavoury influences. Anyways! I really wanted to land on Fr?fdal, and to do that, I needed to do a couple of things first; first of all being scanning the atmosphere to find what kind of gases there are.
I had data (so much fucking data) showing me a range of light frequencies and how much each was registered as coming off Fr?fdal, under a fuckton of disturbances and noise (like, not actual noise, this isn't fucking Star Wars, space ain't got noise, but you probably got that):
So I had to *cracks knuckles* drag out some real *stretches arms* hardcore data analysis methods *cracks neck* to take this beasty down!
If by hardcore methods you mean the least squared method I mentioned and performed in an earlier blog post, that is. If you remember, lucky you! I am still going to explain it again (at least partially), because now the magnitude of the noise varies, so there are slight differences I have to mention. Technically, these small differences mean we are using a method called “least χ method” (that is a greek xhi, not an x btw).
So let’s start with what we expect the graph to actually look like! Since this is an absorption spectrum, meaning we are looking at what light frequencies the gases in the atmosphere absorb, there should be some dips in the graph showing what has been absorbed.
If we want to model this dip mathematically, we can start by having some constant that is the maximum height Fmax, and some part (Fmin – Fmax)g(x) where g(x) becomes very small when it moves away from a point, and becomes 1 when at that point. This makes it so that at that point, the point of the frequency that was actually absorbed, the model becomes Fmax + (Fmin – Fmax) = Fmin, and further away it just becomes Fmax. Here’s an example of such a graph in action, centered around a frequency of 50 (I just chose that number because why the fuck not).
Note that the drop is not completely thin, and has some width. This is because of temperature, making particles go in random directions, causing doppler effects with both increases and decreases in wavelength. This spreads out the dip, making it look like it does.
So now we gotta figure out what g(x) looks like. We could make something ourselves, and feel pretty proud, but we could also just steal someone else’s work and be lazy. I quite prefer being lazy so we steal some of the function for a gaussian bell curve, which you might have seen before, and we modify it; \(e^{-\frac{(\lambda - \lambda_{center})^2}{2\sigma^2}}\) . This thing has the amazing ability of going towards \(e^0 = 1\), when λ, the thing that varies across the x-axis, gets close to λcenter , a constant that shows where the dip is centered. It also goes towards 0 as we get further away from the given center, as we get something to the power of a large negative number, which becomes very small. The σ us another constant that shows how wide the gap is. Not quite sure why we bother squaring it, but Gauss did it, so we might as well. I mean, Gauss was a very smart fellow, so I’m gonna trust him to have some clue what he was doing.
So now we have a function that can model shit, getting a reverse bell curve-ish with a bottom Fmin and a top Fmax, now we just need to find what constants to put into that model to best fit the “graph” we’re going to check (to be honest, can we call it a graph? More like blob amirite?). We could do this by the method of least square, but the amount of noise is not constant, meaning that some of the data will be closer to the truth than other pieces of data. If we have an estimate for how much noise there is as a function of time, we can weigh the datapoints so that the points with less noise count more. I will explain how to do this when we get to it.
Basically, the only difference between the least square method and the χ method is this variance in noise, and for some reasons mathematicians decided that that was enough to distinguish them from eachother.
So we take the model and test for some constants λcenter, σ and Fmin, find the difference between the model and the actual data in each point and divide it by the noise level for that point. This way the points that have lots of noise don’t count as much towards the χ value, while the ones who have little noise will be more important. Then we square those so that being very far off have more to say, because the electoral college is a good system, and this is totally related (sure, it's so fair for people of less populous states to have a disproportionate vote, leading to the president to be chosen with minority vote) . We do this for a fuckton of different combinations of constants (like 270 000 combinations, I’m not fucking around here), and the one with the smallest total difference, χ, is the best fit:
The actual method is given mathematically as \(\sum_{i = 0}^{k} \frac{(P_i - m_i)^2}{2\sigma_i^2} = \chi\), where k is the amount of datapoints we're checking, P refers to the observed datapoints, m refers to the datapoints given by the model and \(\sigma\) is the noise for that datapoint. The model with the smallest \(\chi\) is the model that fits best
As you can see, some are more obvious than others and I need to go through each spot where we expect a dip and see if there is one, with the model as help.
Basically, I check for the presence of 6 different gases; O2, H2O, CO2, CH4, CO, N2O. In a laboratory setting, with no doppler shifts, they show holes in the absorption spectras as such (the numbers are in nanometers and refer to the wavelength that is missing from the spectrum):
O2
630
690
760
H2O
720
820
940
CO2
1400
1600
CH4
1660
2200
CO
2340
N2O
2870
And I found signs of CO, O2, H2O and CH4, meaning I should probably be careful with matches down there.
I could try to find out how much there is of each gas… or I could just assume they all exist in equal amounts…
…
I think we all know what I’m gonna do here.
…
So now that we’ve established the atmosphere is composed of 25% carbon monoxide, 25% oxygen, 25% water and 25% methane, we can start working out some things we need to know to land there, like how dense the atmosphere is. Since this is mostly just maths, I’m gonna save it for later, but suffice to say we make some assumptions to simplify the problem.
We also need some miscellaneous equations, like the terminal velocity close to the surface and size of a parachute needed to achieve a certain velocity near the surface. We mostly want the parachute because crashing and dying sucks.
\(F_D = \frac{1}{2}\rho C_DAv^2\)
\(F_G = \frac{GMm}{R^2}\)
The terminal velocity means that the force from the air resistance, given as FD, and the force from gravity, given as FG, cancel each other out; \(F_G = F_D\).
With some readjustment, this gives \(V_{term} = \sqrt{\frac{2GMm}{R^2\rho_0A}}\) , Where G is the gravitational constant, M is the mass of the planet, m is the mass of the satellite, R is the distance from the planet or as we use in this instance the radius of the planet itself, ρ0 is the density of the atmosphere at the surface and A is the area of the satellite/parachute.
In order to find the size of a parachute needed to reach a terminal velocity of 3 m/s, we just reorder the equation so that A is alone on the left side (allll byyy itseeeeeeelf). Apparently, I managed to fuck this up and put in the pressure P instead of the density ρ (easy to make that mistake, ok?). Mistakenly using the pressure instead of the density gave me an area of 0.01 m2, which raised some alarm bells. Luckily, I applied my expert troubleshooting skills and found the problem almost immediately. And by that I mean that I didn’t bother fixing it until right now when I’m writing this. Nice.
Anyways, fixing the codes gave me a parachute size of 46.7 m2, which makes more sense.
Now that we have those things, we can start working on our actual goal this time! Getting into lower orbit and getting badass footage while doing it! We want to go down as close as we can before air resistance starts fuckign us up and sends us spiralling in and crashing. A good spot to start could be anywhere where \(\frac{F_G}{F_D} > 1000\), so that the air resistance is negligible.
What I did was make a simulation software, just like the one I made earlier to simulate the satellites path through the star system, except I added in the effect of air resistance.
There might be some very clever ways of decreasing altitude, but I believe I had the most clever method of all; remove all velocity with an initial boost and let yourself fall downwards, then speed up again when you’re as low as you want. I did this in my simulation, and calculated \(\frac{F_G}{F_D}\) as I fell. When \(\frac{F_G}{F_D}\) looked good, I gave an explosive boost that brought me into low orbit.
It worked pretty well, I think. You can do a lot when you boost yourself with what is basically explosions and have no consideration for your own wellbeing.
We're not flying, we're falling with style
In order to find out what velocity I needed to have when in low orbit, I used the handy-dandy function that I fou- *cough*… ehhh…. Made, I mean. Yes, I did that all by myself, I did not give in to laziness this time, no sir. Anyways, I’m go to, for reasons that may or may not be explained later, just give you the formula and not explain where it came from:
\(v = \sqrt{\frac{Gm}{r}}\)
And here, because you're worth it, are some cool things:
Aight, now that we have the cool shit out of the way, I'mma hit yous with sum maths! Bam! Pow! Onomatopoeia!
Anyways, I promised a calculation for the density profile of the atmosphere, so here goes:
We have a starting point with two equations; the equation for hydrostatic pressure and the equation for gravitational force:
\(P(r) = \frac{k\rho(r)T(r)}{\mu}\)
\(\frac{dP(r)}{dr} = -\rho(r)g(r)\)
k is the stefan-boltzmann constant, \(\rho \) is the density, T is the temperature, g is the gravitational acelleration, P is the pressure and r is the radial distance to the centre of the planet
Respectable mathematicians usually use \(\mu M_H\), where \(\mu\) is the mean molecular weight of all molecules in the atmosphere measured in hydrogen masses, and \(M_H\) is the mass of a hydrogen. For some reason they just don't do it so \(\mu\) is the mean molecular weight just in general and not bother with the extra term, but they do, and I say fuck that, because that's dumb.
If we want a stable atmosphere, the pressure given by gravity has to cancel out the pressure from things wanting to not be pushed together (are particles asocial?)
Now, you might note, with your impeccable observations skills, that there are a lot of functions in these equations, and since I want to differentiate the first equation so I can set the right sides as equal to eachother, those functions will prove to be a giant bitch.
So we ignore them.
I swear, this isn't that big a deal; the atmosphere is pretty damn thin in comparison to the rest of the planet, so we can assume \(g(r) = g_{\text{at the planets surface}}\) without too much of a hassle, and we calculate with T as a constant just because fuckit.
This is a pretty standard differential equation, and can be solved by \(\rho(h) = \rho_0e^{-\frac{h }{h_0}}\) where \(h_0 = \frac{kT }{ g\mu}\), h is the height above the planets surface, and \(\rho_0\) is some constant.
How do I know what \(\rho\) is? meh, I just look at it and think "what can I raise e to the power to make this work". Apparently, this thing works.
I can also read the \( \rho_0\) from our good old data librarby, full of useful stuff.
So there we have a model for the density! yay!
oh! Also!
Note on the landing coordinates I mentioned under the picture of my landing spot: I can basically read out the coordinates of my satellite in relation to the planets starting position, but it will have rotated by then, so I had to compensate for that. It was a pretty simple thing of just taking the rotational speed of the planet, multiplying it by the time it took to get down to the spot I wanted to land on, and removing that from the \(\phi\)-coordinate.
By
Hulk Hogan
PublishedNov. 28, 2017 8:45 PM - Last modifiedNov. 29, 2017 1:03 AM
Log in to comment