34 lines
657 B
Plaintext
34 lines
657 B
Plaintext
include "vec2.bzz"
|
|
include "update.bzz"
|
|
include "barrier.bzz" # don't use a stigmergy id=80 (auto-increment up) with this header.
|
|
include "uavstates.bzz" # require an 'action' function to be defined here.
|
|
|
|
function action() {
|
|
uav_storegoal(-1.0,-1.0,-1.0)
|
|
set_goto(picture)
|
|
}
|
|
|
|
# Executed once at init time.
|
|
function init() {
|
|
statef=turnedoff
|
|
UAVSTATE = "TURNEDOFF"
|
|
TARGET_ALTITUDE = 15.0
|
|
}
|
|
|
|
# Executed at each time step.
|
|
function step() {
|
|
uav_rccmd()
|
|
|
|
statef()
|
|
|
|
log("Current state: ", UAVSTATE)
|
|
}
|
|
|
|
# Executed once when the robot (or the simulator) is reset.
|
|
function reset() {
|
|
}
|
|
|
|
# Executed once at the end of experiment.
|
|
function destroy() {
|
|
}
|