Live data from Hacker News

Exploring the software that flies SpaceX rockets and starships

stackoverflow.blog

71–80 of 118 posts

Re: Exploring the software that flies SpaceX rockets and starships

#72
post #2

The article is a bit light on technical details, but the following is noteworthy: > Flight software for rockets at SpaceX is structured around the concept of a control cycle. “You read all of your inputs: sensors that we read in through an ADC, packets from the network, data from an IMU, updates from a star tracker or guidance sensor, commands from the ground,” explains Gerding. “You do some processing of those to de…

That's basically how an arduino works and, IIRC, the Apollo Guidance Computer.

And didn't the Apollo Guidance Computer do some of it in analog?

Re: Exploring the software that flies SpaceX rockets and starships

#73
I work in avionics and the principles are exactly the same. And I think it applies to all somewhat critical embedded systems.

There are some details that may change, for example, we use mostly C, specialized software and a bit of ADA, no C++ in embedded systems. But the input-output periodic loops, isolation and making sure things continue working in degraded condition principles are the same.

Nothing special about SpaceX here, for good reasons. In fact, some of it might be mandatory if you want to fly something that can cause serious damage if you it fails, be it a rocket or a plane.

Re: Exploring the software that flies SpaceX rockets and starships

#74
post #66
post #37

Earlier quoted context omitted.

> including garbage collection. Not only does flight control software typically never use garbage collection, it is also preferable to never allocate memory during the runtime -- all memory ever needed is allocated at program startup, and memory is not acquired or released until landing or some other major end event. Because memory issues are often the most significant causes of crashes, which you don't want to trans…

They've been known to leak memory ... https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98... >This sparked an interesting memory for me. I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". H…

I think we've solved the GC vs Manual debate. Just add more RAM and explode your computer when it's done running

Re: Exploring the software that flies SpaceX rockets and starships

#75

Earlier quoted context omitted.

Do you have a link to bjarnes writeup? My ask Jeeves skills are failing me.

This one might also be interesting https://web.cecs.pdx.edu/~kimchris/cs201/handouts/The%20Powe... It's basically just a quick list of 10 useful rules to follow for safety-critical code. (I've seen a different format in the past, that wasn't quite as fancy, but this is the only version I can find at the moment)

Interesting. I wonder how compiler-dependent rule 10 is. Like, if I'm writing for a compiler that gives really bad and usually unhelpful warnings that make my code worse... but I suppose these are more very strict guidelines than rules.

Re: Exploring the software that flies SpaceX rockets and starships

#76
post #66
post #37

Earlier quoted context omitted.

> including garbage collection. Not only does flight control software typically never use garbage collection, it is also preferable to never allocate memory during the runtime -- all memory ever needed is allocated at program startup, and memory is not acquired or released until landing or some other major end event. Because memory issues are often the most significant causes of crashes, which you don't want to trans…

They've been known to leak memory ... https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98... >This sparked an interesting memory for me. I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". H…

That is a great story, but I cringed at the part about adding additional hardware to support their leaky code. Surely there had to be a better way?

Re: Exploring the software that flies SpaceX rockets and starships

#77
post #66

Earlier quoted context omitted.

They've been known to leak memory ... https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98... >This sparked an interesting memory for me. I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". H…

I think we've solved the GC vs Manual debate. Just add more RAM and explode your computer when it's done running

Really, this is just region-based memory management or actor-based memory management.

Re: Exploring the software that flies SpaceX rockets and starships

#79
post #36
post #6

Earlier quoted context omitted.

SpaceX has been hiring game developers for years now, they even showed up at GDC once to pick up game devs.

Makes sense from a financial standpoint too since game devs are known to be passionate enough to accept lower salaries if they can work on cool stuff. Not necessarily knocking it (not my preference), but it matches exactly what I hear from people that work there. The recruiters even say the pay is low, but you'll have "SpaceX" on your resume so it's worth it.

Do we know how much lower?

Re: Exploring the software that flies SpaceX rockets and starships

#80
post #2

The article is a bit light on technical details, but the following is noteworthy: > Flight software for rockets at SpaceX is structured around the concept of a control cycle. “You read all of your inputs: sensors that we read in through an ADC, packets from the network, data from an IMU, updates from a star tracker or guidance sensor, commands from the ground,” explains Gerding. “You do some processing of those to de…

This is an extremely common pattern for robotics processing... so I wonder if they just consider the rockets a robot where you're just using a finite state machine based on inputs.
Post reply on HN