C#, instead of Python or C++


Is there anything in the works for using C# instead of Python or C++ for coding applications for the autopilot?


In the Linux world I guess you could try to get mono running and communicate with APM via MAVLink on the internal serial connection/loopback. But what would really bring the best C# support would be a full Windows 10 IoT image Then you’d have all the other standard stuff as a bonus like PowerShell.

I suggested that a while ago but I guess it will fall near the bottom of the list as Linux is the only supported platform I’ve seen so far for the full “computer” APM_LINUX_HAL.


I’ve written Windows device drivers in the past so might have a go at that myself and share the work. If it was successful and a decent PowerShell library was added, in theory we could even make our own quick MAVLink scripts.

But nobody knows how it will run (realtime) yet so this could all just be a (very cool) proof of concept which doesn’t work in the real world. As Microsoft have a lot of experience with realtime and embedded/PoS/factory systems I really hope it not only works but exceeds expectations. We’ll see…

Maybe somebody else with more experience of mono/Linux could add something about accessing the Linux serial ports and perhaps if the .NET “native” (pre-compilation) has already been ported from Windows then you could code C# and run fast/native on the RasPi. Because what we also don’t know is how much an overhead the .NET runtime (mono the same) will be in a realtime environment. It could be that even on a Windows IoT image we need to pre-compile to native code or at least force a JIT compilation before takeoff.

This post suggests (in the second answer) that it is indeed possible with the MKBUNDLE tool.