

# Biospace.cfg
# 
# Mission to test McEwen gulper code, running back to ML
# 


#define YOYO_MIN_ALTITUDE 10
#define MISSION_YOYO_MIN_DEPTH 2
#define MISSION_YOYO_MAX_DEPTH 25
#define MISSION_YOYO_MAX_DEPTH_SHALLOW 20
#define MISSION_SPEED 1.5
#define MISSION_SPEED_SLOW 1.5


#should be 2 hour mission, set timer to 2+ hours
#set timeout in seconds
behavior missionTimer {
timeOut = 8000;
}

behavior depthEnvelope {
  minDepth = 0;
  maxDepth = 25;
  abortDepth = 35;
  abortAltitude = 2.5;
  abortLockoutDepth = 10.0;
}




behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 150;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Lap 1 leg to waypoint Biospace_6
#N36 50.24000 W121 53.5000
#leg distance 1200 meters
#water depth 73 meters
behavior waypoint_yoyo {
latitude     = 36.8373;
longitude     = -121.9047;
captureRadius = 10;
duration     = 1200;
speed        = MISSION_SPEED;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = MISSION_YOYO_MAX_DEPTH;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 150.0;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 150;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 45;
abortOnTimeout = True;
}



behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 150;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Lap 1 leg to waypoint Biospace_6
#N36 50.24000 W121 53.5000
#leg distance 1200 meters
#water depth 73 meters
behavior waypoint_yoyo {
latitude     = 36.8373;
longitude     = -121.9047;
captureRadius = 10;
duration     = 1200;
speed        = MISSION_SPEED;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = MISSION_YOYO_MAX_DEPTH;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 150.0;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 150;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 45;
abortOnTimeout = True;
}



behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 150;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Lap 1 leg to waypoint Biospace_6
#N36 50.24000 W121 53.5000
#leg distance 1200 meters
#water depth 73 meters
behavior waypoint_yoyo {
latitude     = 36.8373;
longitude     = -121.9047;
captureRadius = 10;
duration     = 1200;
speed        = MISSION_SPEED;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = MISSION_YOYO_MAX_DEPTH;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 150.0;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 150;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 45;
abortOnTimeout = True;
}



behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 150;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Lap 1 leg to waypoint Biospace_6
#N36 50.24000 W121 53.5000
#leg distance 1200 meters
#water depth 73 meters
behavior waypoint_yoyo {
latitude     = 36.8373;
longitude     = -121.9047;
captureRadius = 10;
duration     = 1200;
speed        = MISSION_SPEED;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = MISSION_YOYO_MAX_DEPTH;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}



behavior ArmTheGulper
{
    duration = 1;
    gulper0 = 1;
    gulper1 = 1;
    gulper2 = 1;
    gulper3 = 1;
    gulper4 = 1;
    gulper5 = 1;
    gulper6 = 1;
    gulper7 = 1;
    gulper8 = 1;
    gulper9 = 1;
}



# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 150.0;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 150;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 45;
abortOnTimeout = True;
}