From the minimal descriptions I've seen so far, it seems like they were using producer/consumer work queues for the image processing without further synchronization.
From the minimal descriptions I've seen so far, it seems like they were using producer/consumer work queues for the image processing without further synchronization.
Now, I get that this is probably not a real-time system.
I believe the CPU is the same that has been used in a few smartphones.
So it’s not a real-time system.
https://9to5google.com/2021/04/19/nasa-ingenuity-qualcomm-sn...
ref. https://news.ycombinator.com/item?id=26907669 for more details for example.
A RTOS is typically a much slower and much smaller OS. FreeRTOS e.g consists of 3 small source files, and the control loop might be from 1KHz to 10KHz (for extremely high-dynamic systems). Compare that to the snapdragon loop of 2GHz. Factor 1e6.
https in real-time is obviously a joke. There exist proper networking protocols for hard realtime, not randomized and spiky Ethernet based protocols. Telcos use such proper realtime, slicing protocols.
A real-time system can still have inputs that can not be guaranteed, and internal processes can have an upper and lower bound for their execution time. So a result would be late if either:
1) $T_{input} + t_{process_min} > T_{deadline}$
2) $T_{input} + t_{process_actual} > T_{deadline}$
(where $T$ is a timestamp given by some time source and $t$ is process duration). Condition 1 can be determined on arrival of the data, and the input can be discarded immediately. Condition 2 cannot be determined beforehand, but if the processing isn't finished at $T_{deadline}$, the process/thread could be killed without waiting for it to complete.Of course, this requires that an accurate deadline can be determined for each input packet. The textbook use case is for rendering live video streams, where stream latency is more important than rendering each frame accurately. This flight control system is a similar use case, since the utility of the camera feed for determining location or drift rapidly declines as the picture ages.
But if the timestamp-keeping isn't accurate as it seems in this case, it really doesn't matter if the system was real-time or not.
If it really were just producer/consumer workflows one frame would have been lost, the program would be comparing images two frames apart and seen it moving twice as fast as it was supposed to, this would have caused a minor excursion but then the next frame would be right and it would very quickly have settled back down to proper flight.
The problem is that it wasn't simply comparing frames, but it had an internal clock the frames were being compared against.
Drive by question: do you have recommendations on good literature for real time systems?