paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Interest for a new survey pattern? (Zamboni-survey


From: Stephen Dwyer
Subject: Re: [Paparazzi-devel] Interest for a new survey pattern? (Zamboni-survey)
Date: Thu, 3 Jan 2013 14:15:51 -0700

Hello Jorn,

Recently I modified the poly_survey_adv routine to allow for a pattern similar to the zamboni pattern you describe (but not quite). It is really rough and kind of a hack at the moment, but I could clean it up quickly and submit a pull request if you (or anyone else) is interested. I haven't actually tested it in flight, only in simulation, and there are a couple bugs left, but it seemed to do about what I wanted. The commit is here.

My modification works so that you get shots on both the main segment of a poly survey as well as on the return trip. The adv poly survey already works similar to a zamboni in that is always turns the same direction, and increments along the polygon. The difference is it starts just on the edge of the polygon and sweeps all the way across instead of starting halfway through, and then covering the second half on return trips. In my modification, I keep the regular poly survey behaviour, but make sure the return leg is always at a distance such that the minimum turn radius is maintained, but also so that a return pass with fall between two main segments, doubling the sweep density (not accounted for in the sweep width). This means that you can define a nice big minimum radius to get a result very similar to the zamboni pattern, or you can still cover a very large search area without spending time traveling half the width of the survey zone on each pass. It still takes considerably more flight time than the regular polygon survey though.

Anyways, let me know if anyone is interested. I can try and screenshot a simulation if my description wasn't sufficient. Ideally I would take some time and try to get these various advanced nav routines into modules or something, but we will see if I have the time.

Thanks,
-Stephen Dwyer


On Thu, Jan 3, 2013 at 12:22 PM, Christophe De Wagter <address@hidden> wrote:
It is an LD error, meaning not a compile but a linking error. The linker (program that puts all separatly compiled functions together) complains it does not find 2 functions... In other words, you did not add your subsystems/navigation/zamboni_survey.c  to the list of files that need to be compiled in this case. In even other words it is not in the makefile. You can add it for instance in /conf/firmwares/subsystems/fixedwing/navigation_extra.makefile or make a new subsystem makefile for just your files. Or alternatively add a <makefile> section in your airframe file containing ap.srcs += subsystems/navigation/zamboni_survey.c

-Christophe 


On Thu, Jan 3, 2013 at 7:21 PM, Jorn Anke <address@hidden> wrote:
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

********************************

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]