//-------- FILE: alpha.bhv ------------- initialize DEPLOY = false initialize RETURN = false initialize STATION_KEEP = false initialize LOITER = true initialize AVOID = true set MODE = ACTIVE { DEPLOY = true } INACTIVE set MODE = STATION-KEEPING { MODE = ACTIVE STATION_KEEP = true } set MODE = RETURNING { MODE = ACTIVE RETURN = true } set MODE = LOITERING { MODE = ACTIVE LOITER = true } //---------------------------------------------- Behavior = BHV_Loiter { name = loiter pwt = 100 condition = MODE==LOITERING updates = UP_LOITER runflag = VEHICLE_UNDERWAY = TRUE endflag = VEHICLE_UNDERWAY = FALSE post_suffix = A speed = 1.3 clockwise = best radius = 8.0 nm_radius = 12.0 polygon = radial:: $(LOITER_POS), radius=12, pts=8, snap=1, label=$(VNAME)_LOITER visual_hints = nextpt_color=white, nextpt_lcolor=khaki visual_hints = edge_color=orange, vertex_color=white visual_hints = edge_size=1, vertex_size=2 } //--------------------------------------------- Behavior = BHV_StationKeep { name = station-keep pwt = 100 condition = MODE==STATION-KEEPING center_activate = true inner_radius = 5 outer_radius = 10 outer_speed = 1.0 transit_speed = 1.3 swing_time = 7 hibernation_radius = 15 visual_hints = vertex_size=0, edge_color=dodger_blue } //---------------------------------------------- Behavior = BHV_Waypoint { name = waypt_return pwt = 100 updates = RETURN_UPDATES condition = MODE==RETURNING perpetual = true endflag = RETURN = false endflag = STATION_KEEP = true endflag = AVOID = false endflag = MISSION = complete speed = 2.0 capture_radius = 2.0 slip_radius = 8.0 points = 0,0 } //---------------------------------------------- Behavior = BHV_AvoidCollision { name = avdc_ pwt = 300 condition = MODE==ACTIVE condition = AVOID=true updates = CONTACT_INFO endflag = CONTACT_RESOLVED = $[CONTACT] templating = spawn activeflag = AVOIDING=true inactiveflag = AVOIDING=false contact = to-be-set on_no_contact_ok = true extrapolate = true decay = 30,60 pwt_outer_dist = 30 pwt_inner_dist = 8 completed_dist = 50 min_util_cpa_dist = 5 max_util_cpa_dist = 15 pwt_grade = linear bearing_line_config = white:0, green:0.65, yellow:0.8, red:1.0 } //----------------------------------------------- Behavior = BHV_OpRegion { name = opregion pwt = 100 condition = MODE==ACTIVE polygon = pts={-138,-59:-97,-162:90,-90:47,14} trigger_entry_time = 1 trigger_exit_time = 1 visual_hints = edge_size=1 }