paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Getting the intruder angles from traffic_info


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Getting the intruder angles from traffic_info
Date: Sun, 29 Nov 2015 22:31:45 +0100

Ah, so I guess you were simulating two rotorcrafts, not fixedwings and not using the INTRUDER message to feed in information about "external intruders".

In any case, for rotorcrafts the course was set to heading but also wrongly converted...
https://github.com/paparazzi/paparazzi/pull/1449 should fix this.

On Sat, Nov 28, 2015 at 1:54 AM, ubuntunoob <address@hidden> wrote:
Not sure if the following files are sufficient. To get the intruder data
printing it took some effort and lots of help from Christophe:
- in nps_ivy_common.c on_ACINFO had to be added with the same format as in
fixedwing:

static void on_ACINFO(IvyClientPtr app __attribute__((unused)),
                        void *user_data __attribute__((unused)),
                        int argc __attribute__((unused)), char *argv[]){
        float c = RadOfDeg((atoi(argv[1]))/10.);
        float ux = (atoi(argv[2]))/100.;
        float uy = (atoi(argv[3]))/100.;
         float a = (atoi(argv[4]))/100.;
         float t = (atoi(argv[5]))/1000.;
        float s = (atoi(argv[6]))/100.;
        float cl = (atoi(argv[7]))/100.;
        uint8_t id = atoi(argv[8]);
        SetAcInfo(id,ux, uy, c, a, s, cl, t);
}
- traffic_info.h was modified to get the data in nps
- in my own module I tried to get it like this (and later a conversation to
degrees):

  int ac_id2 = 207;
  struct ac_info_ * intr = get_ac_info(ac_id2);
  struct ac_info_ intruder;
  intruder.course = intr->course;
  intruder.east = intr->east;
  intruder.north = intr->north;

The east and north are correct, but the course is showing strange things (in
my opinion). First, I thought it was unrelated to the heading of the drone,
because it should be the direction of the velocity vector. So I tried to
keep the heading angle constant to the north and let the drone move between
waypoints, but the course showed a same constant angle 35 degrees (shouldn't
this be approximately zero?). So I tried changing the heading to the
waypoint that it was heading to and it showed an inconsistent heading. Maybe
this is right in some way, but I need the angle of the velocity vector and
this is not helping me. Since I'm forcing my drone to change the heading
before it flies to a waypoint, is it possible to use the actual 'heading' of
the drone instead of the 'course'? Don't know where I can modify the source
of the messages... Here are the log files:

With heading changes
15_11_28__01_47_12.data
<http://lists.paparazziuav.org/file/n17598/15_11_28__01_47_12.data>
15_11_28__01_47_12.log
<http://lists.paparazziuav.org/file/n17598/15_11_28__01_47_12.log>

No heading change
15_11_28__01_55_10.data
<http://lists.paparazziuav.org/file/n17598/15_11_28__01_55_10.data>
15_11_28__01_55_10.log
<http://lists.paparazziuav.org/file/n17598/15_11_28__01_55_10.log>

THANK YOU for your time, every tip is appreciated!



--
View this message in context: http://lists.paparazziuav.org/Getting-the-intruder-angles-from-traffic-info-tp17591p17598.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
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]