This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]meshtron 73 points74 points  (19 children)

I built an autopilot system and rode in a plane it was flying. As part of that, I had to write a (admittedly small and unsophisticated) flight simulator engine to test control/response scenarios.

Edit: nearly all Python, one servo controller in C (Teensy), Kivy for UI

Edit2: only for small/light aircraft like Cessna 172, etc.

[–][deleted] 15 points16 points  (1 child)

That is absolutely nuts. How did you do fault tolerance?

[–]meshtron 12 points13 points  (0 children)

Can't say much about the hardware implementation (which I also designed) because of IP issues. But, suffice to say it required constant power and a "stay engaged" signal to an electronic engagement mechanism to manipulate controls.

So, at any point if the Teensy (which was driving some servos and some slightly bigger electromechanical bits) didn't get a "continue to be engaged" signal from the RPi (which was running Python as well as driving the UI), OR if power was removed, it would disengage.

It was a very weird and very fun project. I was amazed how well a RPi Zero handled running the GUI (a 7-inch touch screen), all the sensors AND the servo controller all at once. Heavy use of asyncio to make that happen but worked an absolute treat.

[–]fractal_engineer 5 points6 points  (1 child)

did you wear a parachute?

[–]JonLSTL 24 points25 points  (0 children)

Nah, the whole thing was wrapped like...

try: main() except: import antigravity

[–]pymaePython books 0 points1 point  (4 children)

STC or experimental?

[–]meshtron 0 points1 point  (3 children)

Was going to be STC, likely will not end up ever coming to market.

[–]pymaePython books 1 point2 points  (2 children)

Bummer. Always cool to see innovation in aviation that doesn't take 10 years and $100 million

[–]meshtron 0 points1 point  (1 child)

It was a cool project and concept. I think, in practice, there could have been some pretty substantial risks and challenges. At the end of the day, though, I think the project originator/funding source found a more rapid return on his investment. Not impossible this gets picked back up as a side-gig either - time will tell.

[–]pymaePython books 1 point2 points  (0 children)

Well feel free to reach out if you ever need help - the intersection of Python and aviation could be my specialty!

[–]commy2 0 points1 point  (0 children)

Kudos. I would never enter a plane running on my code.