aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-01-28 15:13:14 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-01-28 15:13:14 +0100
commit9c355d280eb379c72df636c1d47e5b14ae3e3e6e (patch)
treee224a00b8bd506e2a78cad6886262c9968cb9bc5 /src/examples
parentac77fe9c27d7253b01805ff94d3e0f8e21017709 (diff)
downloadpx4-firmware-9c355d280eb379c72df636c1d47e5b14ae3e3e6e.tar.gz
px4-firmware-9c355d280eb379c72df636c1d47e5b14ae3e3e6e.tar.bz2
px4-firmware-9c355d280eb379c72df636c1d47e5b14ae3e3e6e.zip
Merged beta into mavlink rework branch
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/fixedwing_control/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/examples/fixedwing_control/main.c b/src/examples/fixedwing_control/main.c
index b286e0007..067d77364 100644
--- a/src/examples/fixedwing_control/main.c
+++ b/src/examples/fixedwing_control/main.c
@@ -181,11 +181,7 @@ void control_heading(const struct vehicle_global_position_s *pos, const struct v
* Calculate heading error of current position to desired position
*/
- /*
- * PX4 uses 1e7 scaled integers to represent global coordinates for max resolution,
- * so they need to be scaled by 1e7 and converted to IEEE double precision floating point.
- */
- float bearing = get_bearing_to_next_waypoint(pos->lat/1e7d, pos->lon/1e7d, sp->lat/1e7d, sp->lon/1e7d);
+ float bearing = get_bearing_to_next_waypoint(pos->lat, pos->lon, sp->lat, sp->lon);
/* calculate heading error */
float yaw_err = att->yaw - bearing;