mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 05:42:49 +08:00
[modules] nav_survey_poly_osam: protect dc stuff
This commit is contained in:
@@ -31,6 +31,10 @@
|
|||||||
#include "autopilot.h"
|
#include "autopilot.h"
|
||||||
#include "generated/flight_plan.h"
|
#include "generated/flight_plan.h"
|
||||||
|
|
||||||
|
#ifdef DIGITAL_CAM
|
||||||
|
#include "modules/digital_cam/dc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef POLY_OSAM_DEFAULT_SIZE
|
#ifndef POLY_OSAM_DEFAULT_SIZE
|
||||||
#define POLY_OSAM_DEFAULT_SIZE 5
|
#define POLY_OSAM_DEFAULT_SIZE 5
|
||||||
#endif
|
#endif
|
||||||
@@ -392,6 +396,7 @@ bool_t nav_survey_poly_osam_run(void)
|
|||||||
TranslateAndRotateFromWorld(&C, SurveyTheta, 0, 0);
|
TranslateAndRotateFromWorld(&C, SurveyTheta, 0, 0);
|
||||||
TranslateAndRotateFromWorld(&C, 0, SmallestCorner.x, SmallestCorner.y);
|
TranslateAndRotateFromWorld(&C, 0, SmallestCorner.x, SmallestCorner.y);
|
||||||
|
|
||||||
|
#ifdef DIGITAL_CAM
|
||||||
{
|
{
|
||||||
//calc distance from line start and plane position (use only X position because y can be far due to wind or other factor)
|
//calc distance from line start and plane position (use only X position because y can be far due to wind or other factor)
|
||||||
float dist = FromP.x - C.x;
|
float dist = FromP.x - C.x;
|
||||||
@@ -402,6 +407,8 @@ bool_t nav_survey_poly_osam_run(void)
|
|||||||
LINE_START_FUNCTION;
|
LINE_START_FUNCTION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//Rotate and Translate Line points into real world
|
//Rotate and Translate Line points into real world
|
||||||
RotateAndTranslateToWorld(&ToP, 0, SmallestCorner.x, SmallestCorner.y);
|
RotateAndTranslateToWorld(&ToP, 0, SmallestCorner.x, SmallestCorner.y);
|
||||||
RotateAndTranslateToWorld(&ToP, SurveyTheta, 0, 0);
|
RotateAndTranslateToWorld(&ToP, SurveyTheta, 0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user