Hacker News new | past | comments | ask | show | jobs | submit login
Orbital Mechanics (braeunig.us)
216 points by belter on April 30, 2023 | hide | past | favorite | 59 comments



This type of learning material, lacking any desperate 'ELI5' oversimplifications and laying out the proper amount definitions and equations without having to resort to fancy animations to keep the -quite often indolent- reader engaged, is unfortunately scarce in today's web, as is evident from the website's layout.

Here are two favorite readings for anyone willing to delve more into the subject:

    Orbital Mechanics for Engineering Students by Howard D. Curtis
https://www.amazon.com/Orbital-Mechanics-Engineering-Student...

    Fundamentals of Astrodynamics (aka BMW) by  Roger R. Bate, Donald D. Mueller, Jerry E. White, William W. Saylor
https://www.amazon.com/Fundamentals-Astrodynamics-Second-Dov...

Another great textbook as suggested by musgravepeter in the comments is

    Fundamentals of Astrodynamics and Applications by David A. Vallado, Wayne D. McClain
https://www.amazon.com/Fundamentals-Astrodynamics-Applicatio...


Better yet, keep proper definitions and equations and then drive interesting animations from "real deal" code!

I've been working for a couple of years on a computer algebra system written in Clojure (named "Emmy") designed for writing this like. It's a port of Gerald Sussman's scmutils library, plugged in to a bunch of modern graphics libraries.

Here are a few examples, shamefully lacking exposition since much of this is JUST working and I was powering through demos for a talk:

- particle in a quartic potential well: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Phase Portrait of the Pendulum: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Colin's torus geodesics: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Taylor Series https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- (p, q) torus knot: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

- Dual Number Visualization: https://sritchie.github.io/clojure-conj-2023/notebooks/conj/...

I'd love a textbook like the one you link above with figures that feel almost like Kerbal games, powered by the real code in the book that is ALSO generating the math you see.

See https://github.com/mentat-collective/emmy for more information if this is interesting.


That's really cool work you've done there !!

Indeed the key to efficient learning is to provide the user the ability to have some sort of parameters play around interaction to better understand the underlying complicated equations involved in the examples you posted.

Projects like Manim are cool, don't get me wrong, but I've observed that since 3B1B's skyrocketing popularity, similar channels are in a way misusing it to only create fancier videos without necessarily containing the respective high-quality material imperative to convey concepts.

Hopefully Emmy gains the traction it deserves which should be high even going by the preliminary demos you've shared.


Both these books are on my book shelf and are very good. Bate et. al. especially since it is a Dover book and very affordable.

The book that is always on my DESK is "Fundamentals of Astrodynamics and Applications" by Vallado. There is also a website with code from the book for Hohmann and Lambert transfers among other things. <self-promotion>This has been indispensable in creating my Unity Asset "Gravity Engine".</self-promotion>


Apologies if this is in the books you linked, but there's something I've always been curious about and can't seem to find good resources on anywhere: how do you actually plan and optimize the trajectory of a rocket?

I understand orbital mechanics at a basic level and there are lots of resources out there to get a better understanding of those, but then to put them into practice in Kerbal Space Program, I just kind of drag the sliders and nodes around until the line goes where I want it to. Obviously NASA had nothing like that in the 60s, so I've always wondered how they actually calculated when the launch windows were and so on.


I've been trying to dive into this myself and there are a paucity of good resources on the subject. One that I found really good though was Longuski's Optimal Control with Aerospace Application. It has a good balance of math and application, even some MATLAB code at the end to implement some of it.

One note I'll make is that usually there's 2 separate optimization programs for a rocket. The first stage runs on "open-loop" guidance, i.e. a trajectory is created beforehand (and by trajectory I mean something like a pitch-velocity lookup table - when you are at this velocity, pitch by this amount) and the rocket flies this trajectory without optimizing it in real time.

After stage separation the upper stage will run closed loop guidance (typically something like Powered Explicit Guidance or PEG) that actually takes into account orbital parameters and fixes error in inclination, RAAN, apogree, perigee, etc. that may have been introduced by the first stage.

I've worked at one aerospace company where I know they follow this pattern, and I believe others do as well though can't confirm from personal experience.

Longuski's book mostly deals with the latter part of things. I haven't found a good reference for how to create an optimized first stage trajectory.


> How do you actually plan and optimize the trajectory of a rocket?

You're looking into Control Theory and specifically the field of Optimal Control.

If you have some college Math {1,2}XX literacy, I remember

    Optimal Control Theory: An Introduction by Donald E. Kirk
https://www.amazon.com/Optimal-Control-Theory-Introduction-E...

having some chapter or two dedicated to trajectory optimization. Although it's not an easy reading by any means, it greatly serves its purpose as the title states; an adequate optimal control introductory. You really want a good grasp of optimal control's fundamentals before you go into trajectory/path optimization so it's advised you start from the very beginning.

However in case you want an alternative to the book and wonder what trajectory optimization is about here's the relevant chapter of MIT's Underactuated Robotics course

https://underactuated.mit.edu/trajopt.html

whose parts are also good alternatives to the Kirk book.


There is also a little simplified web version of the Howard's book: https://orbital-mechanics.space/intro.html


Whats wrong with this? https://ciechanow.ski/gps/

I do really enjoy interactive content. Lets you experiment and get practical... oh, I'm the practical guy.


I don't see how poor mobile-hostile web design helps education.


Probably the optimal way to learn orbital mechanics (n=1 it worked flawlessly for me):

1. Install KSP, try to get to orbit. Don’t overthink it, just use the base game in sandbox mode, don’t bother with science, just build something that looks good and pilot it the way you think it should work. Do a few iterations to fix problems if you think you see an obvious fix, but don’t spend too long here or drive yourself to quit in frustration.

2. Look up a guide to orbit. Scott Manley has a comforting accent and good pedagogical skills, so I recommend https://youtube.com/watch?v=F0KiePxOuuc

3. Implement the guide and get to orbit. (If you did achieve orbit in step 1, compare your orbit with what the tutorial achieved and make changes to your approach if the tutorial orbit looks better to you.) Save your game once in orbit, you can try again from this position multiple times.

4. Use the in-game intercept planner / orbit planner (click on your orbit and drag the handles to plan burns and see where it takes you) to try to get to another stellar body. The Mun is a good first target. Don’t overthink it or do much research, just do what you think should work. Try a few times restarting from orbit. You may need to restart from Kerbin building a bigger launch rocket so you end up with more fuel once in orbit. Aim to get a stable orbit as close as possible to the surface to marvel at how it looks, don’t worry about landing or returning to Kerbin, that’s more advanced. Don’t drive yourself to frustration, your goal is just to familiarize yourself with common difficulties.

5. Open this linked article on orbital mechanics and implement its teachings to get to Mun orbit and then to other stellar bodies. They’re all very pretty and worth seeing up close!


Jeb’s wife made me promise to get him home. No Kerbals left behind.


I figured out rendezvous pretty late, some time after figuring out landing on other bodies but before returning from other bodies. I think I had five Kerbals in orbit around various planets before I decided to go rescue all of them and it was an awesome experience planning and executing the rescue missions to bring them all back home.


Unfortunately the promise did not specify how many pieces Jeb was to return in.

Uh.. the spirit of the promise was kept?


If you want to learn orbital mechanics, just play KSP.


The mathematical explanations on this page will teach you lots of stuff that will be useful when playing KSP, but the reverse is much less true.

Yes, KSP will help you build an intuition for orbital mechanics, but you can play it for years and never learn how to calculate something as simple as the length of an orbital period at a given altitude.


I find the intuition extremely helpful - without the intuition, it's hard to build a gut feeling for the interrelation and relative importance of the bits in the jargon soup for any given question - apijove vs ascending node, and so on.

What works best is therefore a combination of the two: I have often found myself digging into the math when I want to get something /really working/ in KSP. You start the game by trying to keep the burning end pointing down (and eventually sideways), but the Rocket Equation forces us learn about Hohmann Transfers if we want to get anywhere interesting. (And maybe even get back again.)

Notably, it's the /constraints/ that create the need to optimize, which push us from playing back to the math. The sibling commenter who doesn't like dealing with fuel misses the point: Caring about fuel pushes us to find the mathematical tools to solve our problems.

Compare to Outer Wilds, which has a really fun physics simulation - you can whip around planets like a madman - but there's no real constraints on fuel, and the solar system is small enough that speed isn't really a problem, either. No constraints means no one ever has to figure out a Hohmann transfer.


If delta V isn’t a concern, you can optimize for brachistochrone trajectories instead.


KSP drove me to learn those things. While attempting to reach further planets, I ended up researching specific impulse, calculating Δv, relating altitude to speed to orbital period, and so on. I even downloaded a program that calculated optimal launch windows.

So yes, none of this was in the game per se, but I wouldn't have done any of it if it wasn't for the game. The median person has exactly zero use for orbital mechanics, and KSP is about as close as it gets to a practical application unless you work at a space agency.


I don't work for NASA, so my calculations would be useless.


If you want to play KSP, learn orbital mechanics.

Seriously, understanding dynamics and other basic physics in depth never hurt anyone, while real use of orbital calculations is much rarer than playing games, writing SF and so on.


I think I used this site or a similar one when learning KSP - learning is easy when you make it fun.


This _specific_ page was instrumental when learning orbital mechanics via playing KSP.


Sort of. KSP teaches you rocket building and how precious fuel is. You need to invest a lot of time to get to the stage where you transfer between planets. You also can't just pick up the resident star, give it a whack, and see what happens to the solar system (because it's all two-body mechanics).

That's what I wanted to learn about: orbital mechanics, but as a game. I could not find anything online so I built it myself. The UX is bad, I've been meaning to improve it but you know how it goes. Apologies in advance if the interface is beyond comprehension: it's not you, it's me.

Default 3-body demo: https://lucgommans.nl/p/badgravity/

Earth orbit: https://lucgommans.nl/p/badgravity/#b64params=eyJ0aW1lcGVyc3...

Use arrow keys to control the space craft that looks oddly similar to the letter "A". You're orbiting Earth (denoted with E) and there is also the international space station roaming around, as well as the moon if you scroll to zoom out.

Try getting near the ISS or even the moon! It's tricky if you're doing this for the first time.

For me, this really helped to get a feel for orbital mechanics. I never played KSP more than a few minutes on a friend's PC, but based on Juno:NewOrigins (simplerockets2) being rather similar, I don't really enjoy the engine building aspect or the aspect of constantly being out of fuel. It's more realistic obviously, but spacecraft design wasn't my goal. I wanted to understand how things in orbits affect each other and this lets you do that.

You can also take control of the earth in the "bodies" menu. Set engine thrust to some giganewtons or whatever and fly the earth to a new place :). Or try some of the scenarios in the menu. Also note the simulation speed on the top left, otherwise getting to e.g. the moon takes a while.


Better to not say “just” - from HN front page https://justsimply.dev/


Nice website! Dunno if you're the owner but I'd add "obvious" to your list of words to scan. Nothing's more frustrating than when the author says "and obviously [not obvious thing]"

Actually this reminds me of a funny story about a math professor. He's teaching a class and is going through a proof and skips part of it, saying "I'll skip this part because it's trivial." A student comes up after class and asks about the trivial part. He tries to explain it for a few minutes, and can't quite get it, and the student has to go to her next class, so they agree to revisit the issue next class.

The next day the professor tells the student "I stayed up all night working on this and can confirm that it is indeed trivial"


Then how about: One common way to learn orbital mechanics is playing ksp. For this you need to [buy a computer] [purchase and install the game] and [do the tutorial]. For maximum enjoyment it is recommended to watch [Scott Manley's playthroughs on YouTube] between sessions to deepen your understanding.


No this really is a “just.”


Not for me at least (though I think loloquwowndueo was mostly joking)


Then you install Principia and realize that everything you know is a lie and it's all about N times more complicated.


> is a lie

I think the word you're looking for is "useful model" :D



A lot of interesting topics are not listed there:

- Interplanetary transfers[1], phasing[2], and Lambert's problem

- Gravity assists

- Rendezvous and launch window planning (porkchop plots)

- Rocket equation, dV planning and staging

[1]: https://orbital-mechanics.space/orbital-maneuvers/non-hohman...

[2]: https://orbital-mechanics.space/interplanetary-maneuvers/int...


Love the clarity and crispness of the pixelated illustrations/graphs.


I wonder how they are created



Thanks! Macroexpanded:

Basics of Space Flight: Orbital Mechanics - https://news.ycombinator.com/item?id=10345734 - Oct 2015 (57 comments)

Orbital Mechanics - https://news.ycombinator.com/item?id=6228016 - Aug 2013 (1 comment)


I wish I could read this but it displays as white text on an off-white background on chrome for Android. Is everyone else seeing it that way?


When I saw the reference to conic sections right from the start I felt a familiar cloud settling over my mind. Without telling me how orbiting bodies (or the Solar System as an example) are like a cone, I find even the mention of conic sections to be tangential at best (perhaps distracting at worst?).

I got off the rails a bit staring at the diagram. A circle is of course a very specific case of an ellipse — seems off-topic to even include that specificity except for the fact that everyone does include it in a conic section diagram.

A parabola looks like another very-much edge case where the slice has to be exactly parallel to a line running the length of the cone. Not as steep and it is instead a very long ellipse. Steeper and it stays within the cone all the way down to infinity — a hyperbola, I guess. Or is it only a hyperbola when the slice is exactly vertical? (The diagram has no response.)

It looks like if I read the text some of these are explained. Maybe I'm a picture-book kind of guy.

But then there are all the edge cases one can imagine if the slice goes through the very vertex of the cone. Leaving those possibilities on the table without explanation also leaves my mind wandering, probably derailed from the original intent of the discussion....

Maybe I'm overthinking it, ha ha.


> I got off the rails a bit staring at the diagram. A circle is of course a very specific case of an ellipse — seems off-topic to even include that specificity except for the fact that everyone does include it in a conic section diagram.

Circles are mathematically special and horrible and can cause real singularities in the mathematics. Normally you measure Keplerian elements relative to the Periapsis which is the closest approach of the orbit. A perfectly circular orbit has no closest approach, it is all closest.

Circular, equatorial, polar and parabolic orbits often need to be treated specially. For any algorithm those are often corner cases, they definitely need testing.

I've found division by zero errors in a professionally written implementation of Shepperd's method of orbit propagation in a circular retrograde orbit.

That same method of orbit propagation has fairly horrible problems with near-parabolic orbits, intrinsically.


You are overthinking it. Conic sections are critical to the math here, and the difference between elliptical and hyperbolic orbits is the difference between capture and slingshot.


Personally I’ve seen a privileging of geometry over algebra that leads people in the wrong direction. Who cares what you can do with a straightedge and compasss? Based on what we know now the ‘conic sections’ would better be called the ‘gravitational curves’ or something like that.


People learn in different ways. Abstract equations make no sense to me, but if I see a little picture of conic sections, it makes perfect sense to me. Because I'm a visual thinker with a strong geometric intuition.

The pieces are there for the people who need it.


It's funny... I'm almost 40, and I'm pretty sure I must have missed the day in high school math where Conic Sections were described this way. A couple of months ago I saw an almost identical diagram and had this "aha!!!" moment. I've worked with the abstract equations my entire career and have had no problem with it, but the visual aid really helped understand why they're called that and where they come from. More likely, though, than it being useful for understanding the nature of the different conic sections, it'll be more useful for understanding trajectories on a cone at some point :)



This was my favourite bookmark site when I started playing KSP


> Satellite orbits can be any of the four conic sections.

This seemed to leave out something important. All "orbits" are in reality, spirals. Away, or toward things they're orbiting.

Seems like it should be made clear at the outset that the ideal of an orbit as these ellipses or cones is only an idealised version of reality that is actually impossible, without additional, specific input generated to reach it.


> All "orbits" are in reality, spirals. Away, or toward things they're orbiting.

What are you basing this on? In Newtonian gravity, which is the model used by the article in question, it's false.


> in reality


As long as we don't have a Perfect, True, Unified theory of gravity, I don't think you get to say that "in reality" is self-explanatory. It can reasonably mean Newtonian dynamics or relativity, or I don't know what else.

Would you clarify?


Sure.

Let's meet again on this site in about 7 or 8 billion years, maybe 9.

I'm sure it'll become crystal clear.


Then you're confusing what the dscussion is about.

All "lines" "in reality" have thickness and none are infinite.

"Orbits" "in reality" are not conical sections. But they are not very useful to talk about because there is no model which describes them accurately to an arbitrary level of nitpicking.

But orbits as discussed here are the the are conical sections, and that's why they are discussed: they can be modelled and predicted. The nitpicking that makes them impossible to model is deliberatly left out.


I started this comment thread, so I'm quite confident I know what it's about.

It's specifically about the fact that the article makes no mention of a simple, important aspect of the underlying reality it's modelling. It'd take only a sentence or two to clarify and provide a stronger foundation for those learning.

As evidenced by responses here, it's obvious this is needed. We all should be keenly aware that models only approximate reality, they always get it wrong and the matter is the magnitude of this error. That's important.

A student starting out with the idea that the path of one body in a coupled rotation around another is a perfect ellipse or halves of a cone is a wildly idealised version of an underlying reality that's practically different.

Emphasising the reality, that there is a natural, built-in, constant pull or push toward entropy and dissolution of the shape of an "orbit" should be essential. It's that part the student will most likely spend their career fighting against.


> the reality, that there is a natural, built-in, constant pull or push toward entropy and dissolution of the shape of an "orbit" should be essential

Again, what are you basing this on? What theory or evidence tells you that "the reality" is what you say it is?


I think the "constant" is throwing off the message here. I think the parent is trying to summarize all the unreliable, occasional, and probablilistic factors that models ignore (because they are hard to model), but which still influence practical outcomes of every situation.


No, that won't do. Model builders are well aware that there are factors that aren't included in the models. But in many domains, and orbital mechanics is one of them, the accuracy of our experimental knowledge is high enough that we can be sure that whatever factors are not in our models are negligible. So just waving one's hands and muttering "entropy" or "dissolution" or "something something unreliable, occasional, and probabilistic factors" doesn't cut it in this domain. detrites needs to back up the very strong claim he made, that I originally responded to, with something much more specific than that.


The parent is correct, and maybe we're somewhat at cross-purposes here. I'm not criticising the model, I'm criticising the way it's presented. I find it's common in older texts to present a model as if it is reality.

And why, ever, do this? It's only bad. As you state, model creators are well aware of the limitations. But, this text is targeted at learners. They're just beginning such a journey and may not at all be so keenly aware of such.

I can't supply what you seek of something within the model that violates the model. Which is fine, as it's beside the point and target of my criticism, which isn't of the model but of one aspect of the style used to present it.


> I can't supply what you seek of something within the model that violates the model.

That's not what I asked for. I asked you what you are basing this claim on: "All "orbits" are in reality, spirals. Away, or toward things they're orbiting." Waving your hands and saying "entropy" or "dissolution" or "I don't like the way the models are presented" does not answer that question.

Here's an example of a valid answer to the question, but for a particular case, not for "all" orbits: the "orbit" of the Moon around the Earth is in fact not a closed ellipse but a spiral, slowly spiraling away from Earth. Why? Because the action of the Moon's gravity on the tidal bulge in the Earth caused by the Moon causes the Earth's rate of spin to slowly decrease and the Moon's orbital energy and angular momentum (which determine its perigee and apogee) to slowly increase. But note that in this particular case, the effect has nothing to do with "entropy" or "dissolution", and the model that includes it is commonly presented in textbooks and is not a mystery at all.

Here's another example for a different particular case: the Hulse-Taylor binary pulsar. The "orbits" of the two pulsars around each other are not closed ellipses: the pulsars are slowly spiraling towards each other as they emit gravitational waves, which carry away energy and angular momentum. Here, again, the effect has nothing to do with "entropy" or "dissolution", and the model that includes it, while generally only presented to students majoring in physics, is again not a mystery at all.

But these are just two particular cases. A valid answer from you to my question about your claim, which claimed to cover all cases ("all" orbits), would be something along the same lines as above, but citing an effect which is known to be present in all orbits.


... well this is embarrassing




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: