Browse Source

Merge branch 'test_bottle_drop_paul' into bottle_drop_friday

sbg
Lorenz Meier 11 years ago
parent
commit
8e9eddcc74
  1. 2
      NuttX
  2. 2
      nuttx-configs/aerocore/nsh/defconfig
  3. 2
      nuttx-configs/px4fmu-v1/nsh/defconfig
  4. 2
      nuttx-configs/px4fmu-v2/nsh/defconfig
  5. 1
      nuttx-configs/px4io-v1/nsh/defconfig
  6. 1
      nuttx-configs/px4io-v2/nsh/defconfig
  7. 10
      src/modules/bottle_drop/bottle_drop.cpp

2
NuttX

@ -1 +1 @@
Subproject commit 088146b90eee5b614ea6386a64dae343a49a5172 Subproject commit 41fffa0df192e4a26d2325c7ac5d9b5d7ba0211c

2
nuttx-configs/aerocore/nsh/defconfig

@ -314,7 +314,7 @@ CONFIG_STM32_I2CTIMEOTICKS=500
# CONFIG_ARCH_NOINTC is not set # CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_VECNOTIRQ is not set
CONFIG_ARCH_DMA=y CONFIG_ARCH_DMA=y
CONFIG_ARCH_IRQPRIO=y # CONFIG_ARCH_IRQPRIO is not set
# CONFIG_CUSTOM_STACK is not set # CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set # CONFIG_ADDRENV is not set
CONFIG_ARCH_HAVE_VFORK=y CONFIG_ARCH_HAVE_VFORK=y

2
nuttx-configs/px4fmu-v1/nsh/defconfig

@ -309,7 +309,7 @@ CONFIG_STM32_I2CTIMEOTICKS=500
# CONFIG_ARCH_NOINTC is not set # CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_VECNOTIRQ is not set
CONFIG_ARCH_DMA=y CONFIG_ARCH_DMA=y
CONFIG_ARCH_IRQPRIO=y # CONFIG_ARCH_IRQPRIO is not set
# CONFIG_CUSTOM_STACK is not set # CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set # CONFIG_ADDRENV is not set
CONFIG_ARCH_HAVE_VFORK=y CONFIG_ARCH_HAVE_VFORK=y

2
nuttx-configs/px4fmu-v2/nsh/defconfig

@ -350,7 +350,7 @@ CONFIG_SDIO_PRI=128
# CONFIG_ARCH_NOINTC is not set # CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set # CONFIG_ARCH_VECNOTIRQ is not set
CONFIG_ARCH_DMA=y CONFIG_ARCH_DMA=y
CONFIG_ARCH_IRQPRIO=y # CONFIG_ARCH_IRQPRIO is not set
# CONFIG_CUSTOM_STACK is not set # CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set # CONFIG_ADDRENV is not set
CONFIG_ARCH_HAVE_VFORK=y CONFIG_ARCH_HAVE_VFORK=y

1
nuttx-configs/px4io-v1/nsh/defconfig

@ -83,7 +83,6 @@ CONFIG_ARCH_BOARD="px4io-v1"
CONFIG_BOARD_LOOPSPERMSEC=2000 CONFIG_BOARD_LOOPSPERMSEC=2000
CONFIG_DRAM_SIZE=0x00002000 CONFIG_DRAM_SIZE=0x00002000
CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_BOOTLOADER=n

1
nuttx-configs/px4io-v2/nsh/defconfig

@ -79,7 +79,6 @@ CONFIG_ARCH_BOARD_PX4IO_V2=y
CONFIG_BOARD_LOOPSPERMSEC=2000 CONFIG_BOARD_LOOPSPERMSEC=2000
CONFIG_DRAM_SIZE=0x00002000 CONFIG_DRAM_SIZE=0x00002000
CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_START=0x20000000
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_BOOTLOADER=n

10
src/modules/bottle_drop/bottle_drop.cpp

@ -404,16 +404,18 @@ BottleDrop::task_main()
memset(&update, 0, sizeof(update)); memset(&update, 0, sizeof(update));
int parameter_update_sub = orb_subscribe(ORB_ID(parameter_update)); int parameter_update_sub = orb_subscribe(ORB_ID(parameter_update));
struct mission_item_s flight_vector_s; struct mission_item_s flight_vector_s {};
struct mission_item_s flight_vector_e; struct mission_item_s flight_vector_e {};
flight_vector_s.nav_cmd = NAV_CMD_WAYPOINT; flight_vector_s.nav_cmd = NAV_CMD_WAYPOINT;
flight_vector_s.acceptance_radius = 50; // TODO: make parameter flight_vector_s.acceptance_radius = 50; // TODO: make parameter
flight_vector_s.autocontinue = true; flight_vector_s.autocontinue = true;
flight_vector_s.altitude_is_relative = false;
flight_vector_e.nav_cmd = NAV_CMD_WAYPOINT; flight_vector_e.nav_cmd = NAV_CMD_WAYPOINT;
flight_vector_e.acceptance_radius = 50; // TODO: make parameter flight_vector_e.acceptance_radius = 50; // TODO: make parameter
flight_vector_e.autocontinue = true; flight_vector_e.autocontinue = true;
flight_vector_s.altitude_is_relative = false;
struct wind_estimate_s wind; struct wind_estimate_s wind;
@ -583,10 +585,10 @@ BottleDrop::task_main()
// Compute flight vector // Compute flight vector
map_projection_reproject(&ref, x_drop + 2 * turn_radius * wind_direction_n, y_drop + 2 * turn_radius * wind_direction_n, map_projection_reproject(&ref, x_drop + 2 * turn_radius * wind_direction_n, y_drop + 2 * turn_radius * wind_direction_e,
&(flight_vector_s.lat), &(flight_vector_s.lon)); &(flight_vector_s.lat), &(flight_vector_s.lon));
flight_vector_s.altitude = _drop_position.alt; flight_vector_s.altitude = _drop_position.alt;
map_projection_reproject(&ref, x_drop - turn_radius * wind_direction_e, y_drop - turn_radius * wind_direction_e, map_projection_reproject(&ref, x_drop - turn_radius * wind_direction_n, y_drop - turn_radius * wind_direction_e,
&flight_vector_e.lat, &flight_vector_e.lon); &flight_vector_e.lat, &flight_vector_e.lon);
flight_vector_e.altitude = _drop_position.alt; flight_vector_e.altitude = _drop_position.alt;
//warnx("Flight vector: starting point = %.7f %.7f , end point = %.7f %.7f", flight_vector_s.lat,flight_vector_s.lon,flight_vector_e.lat,flight_vector_e.lon); //////////////////////////////////////////////////////////////////// DEBUGGING //warnx("Flight vector: starting point = %.7f %.7f , end point = %.7f %.7f", flight_vector_s.lat,flight_vector_s.lon,flight_vector_e.lat,flight_vector_e.lon); //////////////////////////////////////////////////////////////////// DEBUGGING

Loading…
Cancel
Save