From 08cdc771ebcaa605130e783239e33d52765bf3dc Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Thu, 23 Aug 2012 11:29:50 +0200 Subject: [PATCH] [flight plan] update flight plans to use state interface --- conf/flight_plans/EMAV2008.xml | 10 +++--- conf/flight_plans/EMAV2009.xml | 2 +- conf/flight_plans/IS.xml | 14 ++++---- conf/flight_plans/basic.xml | 6 ++-- conf/flight_plans/ccc_gl.xml | 18 +++++------ conf/flight_plans/corsica.xml | 6 ++-- conf/flight_plans/creidlitz.xml | 6 ++-- conf/flight_plans/form_follow.xml | 4 +-- conf/flight_plans/form_leader.xml | 4 +-- conf/flight_plans/fp_tp_auto.xml | 14 ++++---- conf/flight_plans/generic.xml | 6 ++-- conf/flight_plans/grosslobke_demo.xml | 8 ++--- conf/flight_plans/grosslobke_kreise.xml | 2 +- conf/flight_plans/hsif.xml | 6 ++-- conf/flight_plans/huit.xml | 2 +- conf/flight_plans/ingolfsskali.xml | 8 ++--- conf/flight_plans/joystick.xml | 6 ++-- conf/flight_plans/kalscott.xml | 32 +++++++++---------- conf/flight_plans/kv_svalbard.xml | 6 ++-- conf/flight_plans/landing.xml | 4 +-- conf/flight_plans/mav06.xml | 8 ++--- conf/flight_plans/mav07.xml | 12 +++---- conf/flight_plans/mav08.xml | 6 ++-- conf/flight_plans/muret_for.xml | 2 +- conf/flight_plans/nordlys.xml | 10 +++--- conf/flight_plans/poles.xml | 6 ++-- conf/flight_plans/sinsat.xml | 2 +- conf/flight_plans/slayer_training.xml | 6 ++-- conf/flight_plans/snav.xml | 6 ++-- conf/flight_plans/tcas.xml | 6 ++-- conf/flight_plans/versatile.xml | 20 ++++++------ conf/flight_plans/versatile_airspeed.xml | 18 +++++------ .../versatile_carto_fixe_muret.xml | 6 ++-- conf/flight_plans/xsens_cachejunction.xml | 6 ++-- sw/airborne/subsystems/nav.h | 5 +++ 35 files changed, 144 insertions(+), 139 deletions(-) diff --git a/conf/flight_plans/EMAV2008.xml b/conf/flight_plans/EMAV2008.xml index 4e109393328..560eabb11de 100644 --- a/conf/flight_plans/EMAV2008.xml +++ b/conf/flight_plans/EMAV2008.xml @@ -48,7 +48,7 @@ - + @@ -84,14 +84,14 @@ - + - + - + @@ -114,7 +114,7 @@ - + diff --git a/conf/flight_plans/EMAV2009.xml b/conf/flight_plans/EMAV2009.xml index fbb603488bc..00960a73aae 100644 --- a/conf/flight_plans/EMAV2009.xml +++ b/conf/flight_plans/EMAV2009.xml @@ -26,7 +26,7 @@ - + diff --git a/conf/flight_plans/IS.xml b/conf/flight_plans/IS.xml index dddd2b9cb5f..c04ad1b09f0 100644 --- a/conf/flight_plans/IS.xml +++ b/conf/flight_plans/IS.xml @@ -79,8 +79,8 @@ - - + + @@ -107,15 +107,15 @@ - + - + - + @@ -148,12 +148,12 @@ - + diff --git a/conf/flight_plans/basic.xml b/conf/flight_plans/basic.xml index f1c0fb690e0..43850512472 100644 --- a/conf/flight_plans/basic.xml +++ b/conf/flight_plans/basic.xml @@ -36,7 +36,7 @@ - + @@ -78,10 +78,10 @@ - + - + diff --git a/conf/flight_plans/ccc_gl.xml b/conf/flight_plans/ccc_gl.xml index d913ac6c92e..ea161cde0ae 100644 --- a/conf/flight_plans/ccc_gl.xml +++ b/conf/flight_plans/ccc_gl.xml @@ -45,7 +45,7 @@ - + @@ -66,19 +66,19 @@ - + - + - + - + @@ -112,10 +112,10 @@ - + - + @@ -155,11 +155,11 @@ - + - + diff --git a/conf/flight_plans/corsica.xml b/conf/flight_plans/corsica.xml index b429892412f..36064950a26 100644 --- a/conf/flight_plans/corsica.xml +++ b/conf/flight_plans/corsica.xml @@ -33,7 +33,7 @@ - + @@ -63,10 +63,10 @@ - + - + diff --git a/conf/flight_plans/creidlitz.xml b/conf/flight_plans/creidlitz.xml index c53a001f24b..67f4f2487df 100644 --- a/conf/flight_plans/creidlitz.xml +++ b/conf/flight_plans/creidlitz.xml @@ -17,7 +17,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -46,7 +46,7 @@ - + diff --git a/conf/flight_plans/form_follow.xml b/conf/flight_plans/form_follow.xml index 010cbc178d3..41355289ce6 100644 --- a/conf/flight_plans/form_follow.xml +++ b/conf/flight_plans/form_follow.xml @@ -35,8 +35,8 @@ - - + + diff --git a/conf/flight_plans/form_leader.xml b/conf/flight_plans/form_leader.xml index c22cbf6813e..a98d81c56e9 100644 --- a/conf/flight_plans/form_leader.xml +++ b/conf/flight_plans/form_leader.xml @@ -45,8 +45,8 @@ - - + + diff --git a/conf/flight_plans/fp_tp_auto.xml b/conf/flight_plans/fp_tp_auto.xml index e676f007c65..c72620f3d98 100644 --- a/conf/flight_plans/fp_tp_auto.xml +++ b/conf/flight_plans/fp_tp_auto.xml @@ -44,7 +44,7 @@ - + @@ -65,19 +65,19 @@ - + - + - + - + @@ -111,10 +111,10 @@ - + - + diff --git a/conf/flight_plans/generic.xml b/conf/flight_plans/generic.xml index dafbcfced34..b1fc8ab8eac 100644 --- a/conf/flight_plans/generic.xml +++ b/conf/flight_plans/generic.xml @@ -24,13 +24,13 @@ - + - + - + diff --git a/conf/flight_plans/grosslobke_demo.xml b/conf/flight_plans/grosslobke_demo.xml index 31be09e05c2..6961d146faa 100644 --- a/conf/flight_plans/grosslobke_demo.xml +++ b/conf/flight_plans/grosslobke_demo.xml @@ -55,7 +55,7 @@ - + @@ -77,10 +77,10 @@ - + - + @@ -114,7 +114,7 @@ diff --git a/conf/flight_plans/grosslobke_kreise.xml b/conf/flight_plans/grosslobke_kreise.xml index 8a6d83dfb1b..170f85b5240 100644 --- a/conf/flight_plans/grosslobke_kreise.xml +++ b/conf/flight_plans/grosslobke_kreise.xml @@ -43,7 +43,7 @@ - + diff --git a/conf/flight_plans/hsif.xml b/conf/flight_plans/hsif.xml index 26825eb6e77..71ba46343a5 100644 --- a/conf/flight_plans/hsif.xml +++ b/conf/flight_plans/hsif.xml @@ -19,15 +19,15 @@ - + - + - + diff --git a/conf/flight_plans/huit.xml b/conf/flight_plans/huit.xml index 520e714a924..623c0b0af99 100644 --- a/conf/flight_plans/huit.xml +++ b/conf/flight_plans/huit.xml @@ -14,7 +14,7 @@ - + diff --git a/conf/flight_plans/ingolfsskali.xml b/conf/flight_plans/ingolfsskali.xml index 2666e2b3073..bbc10eb850f 100644 --- a/conf/flight_plans/ingolfsskali.xml +++ b/conf/flight_plans/ingolfsskali.xml @@ -15,7 +15,7 @@ - + @@ -66,11 +66,11 @@ - + - + @@ -79,7 +79,7 @@ - + diff --git a/conf/flight_plans/joystick.xml b/conf/flight_plans/joystick.xml index c1efecaf3fa..971f2dd5442 100644 --- a/conf/flight_plans/joystick.xml +++ b/conf/flight_plans/joystick.xml @@ -34,7 +34,7 @@ - + @@ -80,10 +80,10 @@ - + - + diff --git a/conf/flight_plans/kalscott.xml b/conf/flight_plans/kalscott.xml index b7401c953af..4fce807cded 100644 --- a/conf/flight_plans/kalscott.xml +++ b/conf/flight_plans/kalscott.xml @@ -26,47 +26,47 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/conf/flight_plans/kv_svalbard.xml b/conf/flight_plans/kv_svalbard.xml index 153104cc99e..e8b7ca83252 100644 --- a/conf/flight_plans/kv_svalbard.xml +++ b/conf/flight_plans/kv_svalbard.xml @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -48,7 +48,7 @@ - + diff --git a/conf/flight_plans/landing.xml b/conf/flight_plans/landing.xml index 953b26464b0..f1f2aed593e 100644 --- a/conf/flight_plans/landing.xml +++ b/conf/flight_plans/landing.xml @@ -18,10 +18,10 @@ - + - + diff --git a/conf/flight_plans/mav06.xml b/conf/flight_plans/mav06.xml index 864c6ccd0ec..464950ca4eb 100644 --- a/conf/flight_plans/mav06.xml +++ b/conf/flight_plans/mav06.xml @@ -30,11 +30,11 @@ - + - + @@ -50,7 +50,7 @@ - + --> @@ -89,7 +89,7 @@ - + --> diff --git a/conf/flight_plans/mav07.xml b/conf/flight_plans/mav07.xml index d4e3429ae04..176f4e2bb9d 100644 --- a/conf/flight_plans/mav07.xml +++ b/conf/flight_plans/mav07.xml @@ -57,7 +57,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -130,10 +130,10 @@ - + - + @@ -144,11 +144,11 @@ - + - + diff --git a/conf/flight_plans/mav08.xml b/conf/flight_plans/mav08.xml index 084723612ce..35b5c415e14 100644 --- a/conf/flight_plans/mav08.xml +++ b/conf/flight_plans/mav08.xml @@ -42,7 +42,7 @@ - + @@ -98,10 +98,10 @@ - + - + diff --git a/conf/flight_plans/muret_for.xml b/conf/flight_plans/muret_for.xml index 233cf0308a5..af469421792 100644 --- a/conf/flight_plans/muret_for.xml +++ b/conf/flight_plans/muret_for.xml @@ -10,7 +10,7 @@ - + diff --git a/conf/flight_plans/nordlys.xml b/conf/flight_plans/nordlys.xml index ae8584808c6..d82892b5f7d 100644 --- a/conf/flight_plans/nordlys.xml +++ b/conf/flight_plans/nordlys.xml @@ -20,7 +20,7 @@ - + @@ -38,7 +38,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -85,10 +85,10 @@ - + - + diff --git a/conf/flight_plans/poles.xml b/conf/flight_plans/poles.xml index 539367ea892..480a51b46eb 100644 --- a/conf/flight_plans/poles.xml +++ b/conf/flight_plans/poles.xml @@ -32,7 +32,7 @@ - + @@ -70,10 +70,10 @@ - + - + diff --git a/conf/flight_plans/sinsat.xml b/conf/flight_plans/sinsat.xml index beb5132f5ab..8186ca27e64 100644 --- a/conf/flight_plans/sinsat.xml +++ b/conf/flight_plans/sinsat.xml @@ -7,7 +7,7 @@ - + diff --git a/conf/flight_plans/slayer_training.xml b/conf/flight_plans/slayer_training.xml index 92d84fe58c5..86a3f046e77 100644 --- a/conf/flight_plans/slayer_training.xml +++ b/conf/flight_plans/slayer_training.xml @@ -36,7 +36,7 @@ - + @@ -75,10 +75,10 @@ - + - + diff --git a/conf/flight_plans/snav.xml b/conf/flight_plans/snav.xml index 0dd2e92c734..71c3faa9478 100644 --- a/conf/flight_plans/snav.xml +++ b/conf/flight_plans/snav.xml @@ -34,7 +34,7 @@ - + @@ -55,10 +55,10 @@ - + - + diff --git a/conf/flight_plans/tcas.xml b/conf/flight_plans/tcas.xml index e2b3045e20b..c30f6295f78 100644 --- a/conf/flight_plans/tcas.xml +++ b/conf/flight_plans/tcas.xml @@ -34,7 +34,7 @@ - + @@ -72,10 +72,10 @@ - + - + diff --git a/conf/flight_plans/versatile.xml b/conf/flight_plans/versatile.xml index 571ab05e04e..9767e9cfded 100644 --- a/conf/flight_plans/versatile.xml +++ b/conf/flight_plans/versatile.xml @@ -44,7 +44,7 @@ - + @@ -65,25 +65,25 @@ - + - + - + - + - + @@ -119,10 +119,10 @@ - + - + @@ -162,11 +162,11 @@ - + - + diff --git a/conf/flight_plans/versatile_airspeed.xml b/conf/flight_plans/versatile_airspeed.xml index 1a0aeafbc51..1427adf72c2 100644 --- a/conf/flight_plans/versatile_airspeed.xml +++ b/conf/flight_plans/versatile_airspeed.xml @@ -45,7 +45,7 @@ - + @@ -69,25 +69,25 @@ - + - + - + - + - + @@ -134,7 +134,7 @@ - + @@ -177,11 +177,11 @@ - + - + diff --git a/conf/flight_plans/versatile_carto_fixe_muret.xml b/conf/flight_plans/versatile_carto_fixe_muret.xml index 0c52f2d5267..d89466c3681 100644 --- a/conf/flight_plans/versatile_carto_fixe_muret.xml +++ b/conf/flight_plans/versatile_carto_fixe_muret.xml @@ -61,7 +61,7 @@ float varsweepsize=110; - + @@ -112,7 +112,7 @@ float varsweepsize=110; - + @@ -140,7 +140,7 @@ float varsweepsize=110; - + diff --git a/conf/flight_plans/xsens_cachejunction.xml b/conf/flight_plans/xsens_cachejunction.xml index 2179cf40940..4a1859f9d19 100644 --- a/conf/flight_plans/xsens_cachejunction.xml +++ b/conf/flight_plans/xsens_cachejunction.xml @@ -24,7 +24,7 @@ - + @@ -89,10 +89,10 @@ - + - + diff --git a/sw/airborne/subsystems/nav.h b/sw/airborne/subsystems/nav.h index 31ea51d0637..e719594fa75 100644 --- a/sw/airborne/subsystems/nav.h +++ b/sw/airborne/subsystems/nav.h @@ -194,4 +194,9 @@ bool_t nav_approaching_xy(float x, float y, float from_x, float from_y, float ap #define nav_SetNavRadius(x) { if (x==1) nav_radius = DEFAULT_CIRCLE_RADIUS; else if (x==-1) nav_radius = -DEFAULT_CIRCLE_RADIUS; else nav_radius = x; } #define NavKillThrottle() { kill_throttle = 1; } + +#define GetPosX() (stateGetPositionUtm_f()->north) +#define GetPosY() (stateGetPositionUtm_f()->east) +#define GetPosAlt() (stateGetPositionUtm_f()->alt) + #endif /* NAV_H */