If you are not familiar with the ardupilot code base, I recommend you to work on lua scripting.
I don’t know whether this is suitable or not for your case since I don’t know what your are trying to do but I just wanted to share this feature =)
1 Like