Skip to content

Commit

Permalink
[gps] for now, compute utm without nav_utm_zone0
Browse files Browse the repository at this point in the history
This variable is only available on fixedwing. It is not really nice to
report GPS pos without using the ref zone, but the possible error is
only on display and logged values, internaly it is correct if relevant.
  • Loading branch information
gautierhattenberger committed Dec 28, 2015
1 parent e92f852 commit dd24916
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sw/airborne/subsystems/gps.c
Expand Up @@ -25,7 +25,6 @@
*/

#include "subsystems/gps.h"
#include "subsystems/navigation/common_nav.h"
#include "led.h"

#ifdef GPS_POWER_GPIO
Expand Down Expand Up @@ -90,7 +89,7 @@ static void send_gps(struct transport_tx *trans, struct link_device *dev)
uint8_t zero = 0;
int16_t climb = -gps.ned_vel.z;
int16_t course = (DegOfRad(gps.course) / ((int32_t)1e6));
struct UtmCoor_i utm = utm_int_from_gps(&gps, nav_utm_zone0);
struct UtmCoor_i utm = utm_int_from_gps(&gps, 0);
pprz_msg_send_GPS(trans, dev, AC_ID, &gps.fix,
&utm.east, &utm.north,
&course, &gps.hmsl, &gps.gspeed, &climb,
Expand Down

6 comments on commit dd24916

@kirkscheper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gautierhattenberger Why is this only available for fixed wing? It seems to me that this is generated from the flight plan and is independent of firmware used.

@gautierhattenberger
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAV_UTM_ZONE0 macro is generated in flight plan header but the variable nav_utm_zone0 is only compiled with fixed-wing firmware

@flixr
Copy link
Member

@flixr flixr commented on dd24916 Jan 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably makes more sense to really recalc the utm zone anyway...

@kirkscheper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, ok.

another question then... why isn't subsystems/navigation/common_nav.c explicitly included in the fixed wing navigation firmware makefile but in the nav.c.

Also why isn't it used in rotorcraft, I assumed from its name that the intention was to be common to all firmware (but I guess I am greatly mistaken, haha).

I guess variable definitions are included but functions are not generated...

and why did you start the commit with "for now", are you planning to change or update this?

@gautierhattenberger
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's say that navigation API cleaning and FW/rotorcraft integration are in (very slow) progress ...

@kirkscheper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, learning new things about paparazzi everyday. I am getting into this stuff more and more now so let me know if there is anything I can do to help this along.

Please sign in to comment.