Fw nav extras

This was for the polygonsurvey which needs an angle from 0 to 180, not 360.
Maybe move it there as indeed normal nav should be atan2
On Sep 29, 2014 6:52 PM, "Gautier Hattenberger" <notifications@github.com>
wrote:

> In sw/airborne/firmwares/fixedwing/nav.h:
>
> > @@ -124,6 +124,16 @@ extern void nav_circle_XY(float x, float y, float radius);
> >    while (x >= 360 && ++dont_loop_forever) x -= 360; \
> >  }
> >
> > +inline float CourseFromToEnuDeg(int wp_x, int wp_y);
> > +inline float CourseFromToEnuDeg(int wp_x, int wp_y)
> > +{
> > +  float dx = waypoints[wp_y].x - waypoints[wp_x].x;
> > +  float dy = waypoints[wp_y].y - waypoints[wp_x].y;
> > +  if (dx == 0.0f) dx = 0.000000001;
> > +  float ang = atan(dy/dx);
>
> why not using atan2f here ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/paparazzi/paparazzi/pull/846/files#r18144208>.
>