[stereocam] further header fixes

This commit is contained in:
Christophe De Wagter
2015-11-21 15:59:07 +01:00
parent d6223ec0cd
commit 9b58be73cd
4 changed files with 28 additions and 5 deletions
@@ -19,6 +19,12 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file modules/stereocam/nav_line_avoid/avoid_navigation.c
*
*/
// Own Header
#include "avoid_navigation.h"
@@ -42,6 +48,8 @@
struct AvoidNavigationStruct avoid_navigation_data;
bool_t obstacle_detected = FALSE;
int32_t counter = 0;
@@ -85,8 +93,8 @@ void run_avoid_navigation_onvision(void)
struct EnuCoor_i *pos = stateGetPositionEnu_i();
float sin_heading = sinf(ANGLE_FLOAT_OF_BFP(nav_heading));
float cos_heading = cosf(ANGLE_FLOAT_OF_BFP(nav_heading));
new_coor.x = pos->x + POS_BFP_OF_REAL(sin_heading * 3.5);
new_coor.y = pos->y + POS_BFP_OF_REAL(cos_heading * 3.5);
new_coor.x = pos->x + POS_BFP_OF_REAL(sin_heading * (NAV_LINE_AVOID_SEGMENT_LENGTH));
new_coor.y = pos->y + POS_BFP_OF_REAL(cos_heading * (NAV_LINE_AVOID_SEGMENT_LENGTH));
new_coor.z = pos->z;
waypoint_set_xy_i(WP_W1, new_coor.x, new_coor.y);
obstacle_detected = FALSE;
@@ -19,12 +19,27 @@
* Boston, MA 02111-1307, USA.
*/
/**
* @file modules/stereocam/nav_line_avoid/avoid_navigation.h
*
* - while flying a route from A -> B
* - when
*/
#ifndef AVOID_NAVIGATION_H_
#define AVOID_NAVIGATION_H_
#define AVOID_NAVIGATION_H
#include <std.h>
#ifndef NAV_LINE_AVOID_SEGMENT_LENGTH
#define NAV_LINE_AVOID_SEGMENT_LENGTH 3.5
#endif
struct AvoidNavigationStruct {
uint8_t mode; ///< 0 = nothing, 1 = climb, 2 = sideways, ...
uint8_t stereo_bin[8];
@@ -20,7 +20,7 @@
*/
/**
* @file modules/stereoavoid/stereoavoid.c
* @file modules/stereocam/nav_line_avoid/stereoavoid.c
*
* Parse avoidance messages from stereocamera to use obstacle results in navigation
*/
@@ -20,7 +20,7 @@
*/
/**
* @file modules/stereoavoid/stereoavoid.h
* @file modules/stereocam/nav_line_avoid/stereoavoid.h
*
*/