Quantcast
Channel: ArduPilot Discourse - Latest topics
Viewing all articles
Browse latest Browse all 45858

A new approach to ArduPlane Mixer Scripting

$
0
0

@skyscraper wrote:

ArduPlane mixing leaves a lot to be desired. One major issue is the RC_Channel class, which is quite difficult to fathom. I hope to work on that at some stage, but first am looking at how to script a mixer. I have looked both at PX4 and at OpenTX mixers, but have decided on a more programming language approach.

The current syntax of the language is as shown in this glider mixer, which is designed for a glider that has a V-tail variable camber and crow flaps. The language is simple with a strong grammer and uses strong typing and type deduction.

https://github.com/kwikius/mixer_lang/blob/master/glider.mix

The implementation builds an expression tree and also does constant folding. Strong typing is good for speed, since errors are checked as the expression tree is built. Many complex constant expressions are evaluated into one constant value as the tree is built, so reducing the size of the tree. The memory used for symbol names is also recoverable once the tree is built. Since the expression is built close to startup only, this works out quite well.

Currently the system works only as a PC application with hardwired inputs and some command line diagnostic...

https://github.com/kwikius/mixer_lang

...but it is evolving slowly and I am looking to get some more exciting inputs soon.

Having recently discovered that the Taranis is simple to hook up as a PC joystick. For now I wrote a simple app to just display the Taranis stick inputs.

https://github.com/kwikius/Taranis_linux_joystick

The next task is to hook the mixer language up to the joystick to provide some runtime action of the inputs :).

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 45858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>