Earlier quoted context omitted.
You could abstractly structure the computation as a graph (there are many concrete approaches to that) and only recompute the parts that change due to changed input or changed intermediate results. If you have multiple outputs you can also have a scheduling/prioritization system for the subtasks. And yes, use interrupts or multiple timers to detect only changed parts without having to compare current input to previou…
Right, but since you typically want timing guarantees (for example, "respond to change in measured acceleration within 20ms"), you'd often end up structuring and resourcing everything for the worst case (everything needs to be computed) anyways... which means that your graph optimization didn't end up saving any resources. Also, there sometimes ARE interrupts meshed in with these main loop based systems (for whatever…
Exploring the software that flies SpaceX rockets and starships
81–90 of 118 posts
Re: Exploring the software that flies SpaceX rockets and starships
#82Earlier 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…
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?
Edit: yes I know it’s more complicated than that!
Re: Exploring the software that flies SpaceX rockets and starships
#83Earlier quoted context omitted.
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
#84Earlier quoted context omitted.
Very likely: while(true) { ...[50hz tick tasks] if(tick%5==0) { ...[10hz tick tasks] } wait_for_next_tick(); tick++; }
Nope, more likely there are internal CPU timers which emits hardware interrupts on which the tasks are performed
You technically can have a dedicated timer interrupt for every task but there are usually alot more tasks than HW timers, so instead they use a dedicated HW timer for time-keeping and use that as reference for all other tasks.
Re: Exploring the software that flies SpaceX rockets and starships
#85Earlier 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
Re: Exploring the software that flies SpaceX rockets and starships
#86The 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…
Seems like a really clean and testable system, too. Can make a harness with a set of inputs, run the cycle and test outputs consistently. Performance is also easily checked, each cycle needs to run without 100ms for the 10hz systems, I guess, including garbage collection. Nice it see things kept this simple.
You could literally replay entire missions.
Re: Exploring the software that flies SpaceX rockets and starships
#87Earlier quoted context omitted.
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?
You can learn way too much about it and even operate (a simulation of) one here: http://www.ibiblio.org/apollo/
Re: Exploring the software that flies SpaceX rockets and starships
#88> This marks the beginning of a new era for SpaceX, one where it will aim to routinely fly astronauts to the ISS Does anyone have much insight into the longevity of the ISS from now? I can see it's approved for operation until 2024, so just 3 years, but could potentially continue to operate after that. If the ISS does get decommissioned, how many years does that process take, and once it's gone, what purpose does Cre…
Re: Exploring the software that flies SpaceX rockets and starships
#89Re: Exploring the software that flies SpaceX rockets and starships
#90Earlier quoted context omitted.
Do you have a link to bjarnes writeup? My ask Jeeves skills are failing me.
I don't think it was actually written by Bjarne, I think it was K. Carroll and others from Lockheed Martin, but I expect the document is this one: https://www.stroustrup.com/JSF-AV-rules.pdf which is linked from the Applications page of Bjarne's website.
https://stroustrup.com/autonomics09.pdf