Hello, and a happy new year to all!
I decided to try once more to write a subroutine for this survey pattern, by using the "poly_survey_adv" routine as a template.
I do however get an error message which I can not get rid of, when compiling. Anyone who can see what I am doing wrong?
Cheers,
Jorn
The last past part of the messages from the compiler looks like this:
********************************
LD /home/jorn/paparazzi/var/YAPA_Chimu/sim/simsitl
/home/jorn/paparazzi/var/YAPA_Chimu/sim/subsystems/nav.o: In function `auto_nav':
/home/jorn/paparazzi/var/YAPA_Chimu/generated/flight_plan.h:170: undefined reference to `init_zamboni_survey'
/home/jorn/paparazzi/var/YAPA_Chimu/generated/flight_plan.h:174: undefined reference to `zamboni_survey'
collect2: ld returned 1 exit status
File "/home/jorn/paparazzi/var/YAPA_Chimu/sim/simsitl.ml", line 1, characters 0-1:
Error: Error while building custom runtime system
make[1]: *** [/home/jorn/paparazzi/var/YAPA_Chimu/sim/simsitl] Error 2
make[1]: Leaving directory `/home/jorn/paparazzi/sw/airborne'
make: *** [sim] Error 2
make: Leaving directory `/home/jorn/paparazzi'
DONE (exec make -C /home/jorn/paparazzi -f Makefile.ac AIRCRAFT=YAPA_Chimu sim 2>&1)********************************
From the airframe-file:
********************************
<header>
#include "subsystems/navigation/zamboni_survey.h"
#include "subsystems/datalink/datalink.h"
/*
#ifndef VARDECLARED
#define VARDECLARED
float varsweepsize=110;
#endif
*/
#ifdef DC_AUTOSHOOT_METER_GRID
#include "modules/digital_cam/dc.h"
//#define LINE_START_FUNCTION dc_autoshoot = DC_AUTOSHOOT_PERIODIC;
#define LINE_START_FUNCTION dc_Survey(dc_gps_dist);
#define LINE_STOP_FUNCTION dc_autoshoot = DC_AUTOSHOOT_STOP;
#endif
</header>...
<block name="ZamboniSurvey(75)" strip_button="Survey" strip_icon="survey.png">
<!-- <call fun="InitializeZamboniSurvey(WP_S1, NumOfCorners, SweepWidth, Orientation)"/>
init_zamboni_survey(uint8_t center_wp, uint8_t sweep_length, float angle, float sweep_width, int sweep_lines, float shot_dist, float min_rad, float altitude) -->
<call fun="init_zamboni_survey(WP_1, 200, 45, 50, 7, 40, 50, 120)"/>
<call fun="zamboni_survey()"/>
</block>********************************
And the zamboni_survey.h file:
********************************
#ifndef ZAMBONI_H
#define ZAMBONI_H
#include "std.h"
/**
typedef struct {float x; float y;} point2d;
typedef enum {ERR, ENTRY, SEG, TURN1, RET, TURN2} survey_stage;
**/
extern bool_t init_zamboni_survey(uint8_t center_wp, uint8_t sweep_length, float angle, float sweep_width, int sweep_lines, float shot_dist, float min_rad, float altitude);
extern bool_t zamboni_survey(void);
#endif********************************