Did you ever think of your UAV as an entity?
Now, you probably will think we have gone crazy, but think it trough! You put it on the floor and let it go. And after it's flying you hope it will do what you tell it to do. You tell it to turn right and it turns right. You tell it to raise and it raises. You told it to warn you when the battery reaches less that 10V and it warns you, when it's battery reaches 10V.
In essence every UAV has a known set of behaviors and you expect it to behave according to these!
Now imagine that these behaviors are not a fix set of rules, but imagine you could customize these behaviors according to your needs. Let's say a behavior rule consists of a behavior condition, which when it evaluated as true makes sure that an associated behavior action gets executed. If you think it trough you will see that every and all of the current UAV features can be mapped to behaviors! You need calibration on channel 5? You want your cam to make a photo when channel 8 goes to 100%? You would like to turn on the lights, when you have reached 10m or more... and... and... and...
I think you got my point...
... we can model every and all UAV features to one or more behavior rules.
We implemented the concept on the NG. You can define arbitrary behavior rules. Each behavior rule consist of a behavior condition, which when it evaluates to true will trigger an associated behavior action.
Conditions and actions are arbitrary functions implemented seperate in the NG framework. The implemented console commands show behaviors, show conditions and show actions are used to inspect the currently defined behaviors as well as the predefined conditions and actions. Users are able to define custom new behaviors using the predefined conditions and actions with the command add behavior .... Each condition and action can receive user chosen parameters. These allow further customization.
In the newest NG firmware 12 predefined standard behaviors implement the normal behaviors you are used from your UAVs. This includes sensor calibration, config- and controller-switching when not flying as well as motors on and off stick positions. Furthermore the in-flight actions like rc calibration, hover calibration, emergency landing and more are defined using behaviors. Further empty behavior rule slots allow users to add their own behavior rules.
In the future we will implement even more complex conditions and actions. We already introduced behavior variables and test conditions for them which will allow more complex behavior definitions. We will also implement more complex actions like a gps.come.home(), ctrl.do.hover(), comm.uav.near() or ctrl.do.emergency.landing().
We expect to leverage the concept even further so that we will be able to implement complex inter-UAV behaviors using them. Eventually we will even move up to a byte code compiler and interpreter. This will allow very complex new behavior programms moving the whole concept to a fully new level.
The current NG implementation allows all standard UAV behaviors you are used from normal UAVs like the MK or the UAVP. More complex behaviors will follow.