diff --git a/buzz_scripts/include/act/naviguation.bzz b/buzz_scripts/include/act/naviguation.bzz index 4c60583..a01a302 100644 --- a/buzz_scripts/include/act/naviguation.bzz +++ b/buzz_scripts/include/act/naviguation.bzz @@ -7,10 +7,10 @@ GPSlimit_CEPSUM = {.1={.lat=45.510400, .lng=-73.610421}, .3={.lat=45.510355, .lng=-73.608404}, .4={.lat=45.509840, .lng=-73.610072}} -GPSlimit_PANGEAE = {.1={.lat=29.020871, .lng=-13.712477}, - .2={.lat=29.019850, .lng=-13.712378}, - .3={.lat=29.019875, .lng=-13.710096}, - .4={.lat=29.021245, .lng=-13.710184}} +GPSlimit_PANGEAE = {.1={.lat=29.067746, .lng=-13.663315}, + .2={.lat=29.068724, .lng=-13.662634}, + .3={.lat=29.068113, .lng=-13.661427}, + .4={.lat=29.067014, .lng=-13.661564}} # Core naviguation function to travel to a GPS target location. function goto_gps(transf) { diff --git a/buzz_scripts/include/act/neighborcomm.bzz b/buzz_scripts/include/act/neighborcomm.bzz index 13ca0d9..7e5089d 100644 --- a/buzz_scripts/include/act/neighborcomm.bzz +++ b/buzz_scripts/include/act/neighborcomm.bzz @@ -21,18 +21,18 @@ function rc_cmd_listen() { } else { if(flight.rc_cmd==21) { flight.rc_cmd=0 - #barrier_set(ROBOTS, "GOHOME", BVMSTATE, 21) - #barrier_ready(21) BVMSTATE = "STOP" neighbors.broadcast("cmd", 21) - } else if(flight.rc_cmd==20) { - flight.rc_cmd=0 - AUTO_LAUNCH_STATE = "IDLE" - barrier_set(ROBOTS, "GOHOME", BVMSTATE, 20) - barrier_ready(20) - neighbors.broadcast("cmd", 20) } else if(BVMSTATE!="BARRIERWAIT" and BVMSTATE!="LAUNCH") { - if (flight.rc_cmd==666){ + if(flight.rc_cmd==20) { + flight.rc_cmd=0 + destroyGraph() + check_rc_wp() + AUTO_LAUNCH_STATE = "IDLE" + barrier_set(ROBOTS, "GOHOME", BVMSTATE, 20) + barrier_ready(20) + neighbors.broadcast("cmd", 20) + } else if (flight.rc_cmd==666){ flight.rc_cmd=0 stattab_send() } else if (flight.rc_cmd==900){ @@ -90,15 +90,17 @@ function nei_cmd_listen() { reinit_time_sync() } } else { - if(value==20) { - AUTO_LAUNCH_STATE = "IDLE" - barrier_set(ROBOTS, "GOHOME", BVMSTATE, 20) - barrier_ready(20) - } else if(value==21 ) { + if(value==21 ) { BVMSTATE = "STOP" #neighbors.broadcast("cmd", 777) }else if(BVMSTATE!="BARRIERWAIT" and BVMSTATE!="LAUNCH") { - if(value==900){ # Shapes + if(value==20 and BVMSTATE!="GOHOME") { + AUTO_LAUNCH_STATE = "IDLE" + resetWP() + if(BVMSTATE!=AUTO_LAUNCH_STATE) + barrier_set(ROBOTS, "GOHOME", BVMSTATE, 20) + #barrier_ready(20) + } else if(value==900){ # Shapes barrier_set(ROBOTS, "TASK_ALLOCATE", BVMSTATE, 900) #barrier_ready(900) #neighbors.broadcast("cmd", 900) diff --git a/buzz_scripts/include/taskallocate/waypointlist.csv b/buzz_scripts/include/taskallocate/waypointlist.csv index 3d198b7..b84775a 100644 --- a/buzz_scripts/include/taskallocate/waypointlist.csv +++ b/buzz_scripts/include/taskallocate/waypointlist.csv @@ -1,10 +1,10 @@ -1,-13.710661,29.020850,10.0,1 -2,-13.711061,29.020946,10.0,0 -3,-13.711605,29.020421,10.0,1 -4,-13.711925,29.020003,10.0,0 -5,-13.712166,29.020435,10.0,1 -6,-13.710498,29.020341,10.0,0 -7,-13.711506,29.019919,10.0,0 -8,-13.712048,29.020385,10.0,0 -9,-13.711514,29.020261,10.0,1 -10,-13.711621,29.020725,10.0,1 \ No newline at end of file +1,-13.662583,29.068509,10.0,1 +2,-13.661774,29.067843,10.0,0 +3,-13.661838,29.067285,10.0,1 +4,-13.662144,29.067923,10.0,0 +5,-13.662476,29.067670,10.0,1 +6,-13.663044,29.067843,10.0,0 +7,-13.661642,29.068001,10.0,0 +8,-13.662831,29.067993,10.0,0 +9,-13.662009,29.067586,10.0,1 +10,-13.662690,29.068369,10.0,1 \ No newline at end of file diff --git a/buzz_scripts/include/utils/takeoff_heights.bzz b/buzz_scripts/include/utils/takeoff_heights.bzz index 03aaaa0..61a8acb 100644 --- a/buzz_scripts/include/utils/takeoff_heights.bzz +++ b/buzz_scripts/include/utils/takeoff_heights.bzz @@ -17,9 +17,9 @@ takeoff_heights ={ .21 = 3.0, .22 = 3.0, .23 = 0.0, - .24 = 38.0, - .25 = 34.0, - .26 = 25.0, - .27 = 42.0, - .28 = 29.0 + .24 = 24.0, + .25 = 18.0, + .26 = 10.0, + .27 = 28.0, + .28 = 14.0 } \ No newline at end of file