# Overview

In this folder you will find the specifications for the missions shown in http://mtsa.dc.uba.ar/uav/uav-morph.html.
For each mission we have a pair of MTSA ".lts" files: one for the original mission specification (labelled as "--original") and one for the update control problem with the new mission specification (labelled as "--update").
These ".lts" files can be used together with the MTSA tool in http://mtsa.dc.uba.ar/uav/uav-morph.html to synthesise the discrete event controllers that were run as the original and updated mission. The updated mission controller includes the transition from the old to the new controller with the transition actions: reconfigure, startNewSpec, stopOldSpec and beginUpdate.


# Controller Synthesis

To correctly synthesise controllers from the .lts file specifications, the Java Virtual Machine must be started. In linux you can use the following command:

```
java -jar update-liveness.jar
```
For synthesising the controller click on the Compile button after opening the file and selecting from the dropdown menu "TestController" for the original specifications and "UpdCont" for update controllers.


# Notes

* "beginUpdate" is an alternative label we used to refer to the "hotSwap" action referred to in the paper.
* Similarly, "arrived" is used instead of "at"
* The "initial_config" action is an uncontrollable action that represents that the pre-flight preparations finished.
* In the case of the "Unexpected Battery Consumption Rate" scenario we computed the original mission controller directly from the update control problem specifications, since it includes the original mission specification as well. To synthesise the original mission controller one must select "OldControllerSafeLive" from the dropdown menu in MTSA.


# Code samples

In this folder you will also find two exact modules as they were uploaded onto a running UAV system to later reconfigure its capabilities.

* "planner_ASensor.py": This module is the type that are used for iterator-based planning in mission scenarios such as "Unexpected Battery Consumption Rate"
* "planner_PersonSensor.py": This was the exact image capture and processing module that was uploaded onto the UAV in the "Unexpected Search & Rescue" real flight with the Parrot Ar.Drone 2.0