all 36 comments

sorted by: hot top controversial new old
[–] 83 points 7 months ago (14 children)

Mark my words, someone's going to make a video game with 100% historical accuracy with this.

  • source
  • hideshow 14 child comments
  • [–] 23 points 7 months ago (7 children)

    You can automate control of your craft in KSP with a mod. All you need is to have it send the data to the Apollo computer and then send the output to the craft. It should probably work with the real solar system mod.

    Now that I saw this though, I swear I saw this exact video already. Scott Manley or someone may have already done this.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 6 points 6 months ago (6 children)

    If that works with the real solar system mod that is honestly the finest testament KSP can get for its mathematical accuracy.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 4 points 6 months ago (2 children)

    KSP is not mathematically accurate and it can't be or it would have trouble running on computers. They split up and use simplified 2 body dynamics in the game.

    We use super computers to model the n-body problem bcz of how complex it is.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 6 months ago (1 child)

    Of course, NASA ain’t modelling actual missions in KSP.

    I imagine KSP is simple Newtonian physics which is accurate at macro-scales, whereas obviously NASA is going to use Einstein’s equivalent. Far more computationally intense but really important once you scale up the small errors in Newton’s equations.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 6 months ago*

    Actually, we don't use relativity so much. For some stuff like light time delays, yes, but for orbit determination we use newtonian mechanics still. It's just that once you start adding more than two bodies, you have to shift to doing numerical integration to find solutions, which doesn't work for real-time stuff like video games.

    For most applications, F = -GM1M2/r^2 is still a valid approximation.

    Edit: And by most applications, i mean sending a satellite to a planet in our solar system. If you were trying to go to Alpha Centauri, you damn sure better use Relativity to model your trajectory.

  • source
  • parent
  • [–] 3 points 6 months ago (2 children)

    I haven't tried it, but yeah, at small scales KSP (which is just using floating point numbers) is pretty accurate. It's at large scales where it fucks up, which it does have to deal with too, being a game about traveling between planets.

    I assume it probably would work though. The Apollo computers, as I'm sure you know, weren't super complex. They basically just assisted the pilot. I'm not exactly sure what math they did, but it probably just had to do with descent rate/time to impact and stuff like that. Again, this is all just guessing. I don't remember it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 6 months ago (1 child)

    That makes sense, floating-point precision falls apart with large numbers but is pretty good with small numbers.

    Perhaps there’s a mod that can swap out the position system to use doubles instead of floats? But I’m pretty sure that’s a Unity thing with its Transform positioning system so that’d be quite a challenge to change.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 6 months ago* (last edited 6 months ago)

    Yeah, there's no way to do that. You can use doubles yourself to track things, but the engine is always going to use floats. When you send data to the engine, it has to be in float form.

    IIRC, UE5 actually switched to using doubles for everything. Standard size float makes floating point math faster to perform, but computers are fast enough now they decided it was worth it. It can now accurately store positions much further away without losing as much precision.

    KSA is also using doubles I think, on their custom engine. They can do a cool thing where they can render multiple vehicle views at once, in totally different locations. KSP couldn't do this because of floating point error.

  • source
  • parent
  • [–] 10 points 7 months ago (2 children)
  • [–] 33 points 7 months ago

    The article is technically correct in that the code has been open-sourced and published, except it happened in 2016, so I'm guessing the author just decided to ride the Artemis hype.

  • source
  • [–] 30 points 7 months ago (4 children)

    See ya losers I'm going to moon \s

  • source
  • hideshow 4 child comments
  • [+] -8 points 7 months ago (3 children)

    /s everywhere making the jokes less funny, its funny to see people not getting the jokes anyway. 

  • source
  • parent
  • hideshow 3 child comments
  • [–] 24 points 7 months ago* (last edited 7 months ago)

    Adding that the Apollo 11 soft isn't much more complex as the one of an current pocket calculator, I doubt that it can even run DOOM. NASA anyway has a huge OpenSource catalogue, all their soft used is OpenSource, despite some with restricted licenses only for official uses. Same for other Space agencies, eg. from the ESA. Good sources for astronomic fans.

  • source
  • [–] 20 points 6 months ago

    Just like with most open source code - I have absolutely no idea what to do with it, but I still love that it's freely available.

  • source
  • [–] 10 points 6 months ago

    Can it run doom

  • source
  • [–] 10 points 6 months ago (1 child)

    i've had a copy for years.... Why is this news now?

  • source
  • hideshow 1 child comment
  • [–] 15 points 6 months ago (3 children)
  • [–] 8 points 7 months ago (4 children)

    the crucial 30 lines of assembly for calculating Apollo 11's navigation trajectories.

    I was never skeptical we went to the moon until now.

    How the hell can you do all that in 30 lines?!?

  • source
  • hideshow 4 child comments
  • [–] 2 points 6 months ago

    Very efficiently.

    Or for a less cheeky answer, I believe the method they used at a high level was pointing a camera at a few guide stars, so the 30 lines of assembly might have been a loop that checked those cameras for any drift of those stars and did a correction pulse of the rotation boosters to keep them centered. Oh, one of the references might have been the signal strength from home, too (signal gets weaker if the antenna isn't aligned).

    Unless it was an emergency, it might only need to look at 5 pixels to determine alignment and correction.

    Also, just because it's assembly doesn't mean it can't call subroutines and functions, so that 30 lines might be misleading in the way those several lines in the other reply have way more going on. That said, if it's just doing a pixel brightness comparison, that's one line to read the central pixel, then for each direction one line to read that pixel, one more to compare, one line to jump to next comparison if center is brighter, one instruction to initiate correction burn, one instruction to stop it immediately after, then one instruction to return to the start of the loop... Which comes to 22 lines total, leaving 8 for logging or maybe timing the burn. And that's assuming their instruction set didn't have anything fancy like read and compare, compare and jump, or a single instruction burn pulse.

  • source
  • parent
  • [–] 4 points 7 months ago

    Wait, our own space program? Is that a thing we're supposed to have?

  • source