diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-01-24 00:06:10 +0100 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-01-24 00:06:10 +0100 |
commit | 58792c5ca6e42bc251dd3c92b0e79217ff5d5403 (patch) | |
tree | ea46289f1159857c26ea40f71674a3bbb06cec8e /src/modules/fixedwing_pos_control | |
parent | b3d98e4a19662af44432a0436a1b5de7fb9649c9 (diff) | |
download | px4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.tar.gz px4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.tar.bz2 px4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.zip |
Use double for lat/lon in vehicle_global_position topic, use filed names lat, lon, alt, vel_n, vel_e, vel_d for global positions
Diffstat (limited to 'src/modules/fixedwing_pos_control')
-rw-r--r-- | src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c b/src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c index 73df3fb9e..888dd0942 100644 --- a/src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c +++ b/src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c @@ -299,7 +299,7 @@ int fixedwing_pos_control_thread_main(int argc, char *argv[]) orb_copy(ORB_ID(vehicle_global_position_setpoint), global_setpoint_sub, &global_setpoint); start_pos = global_pos; //for now using the current position as the startpoint (= approx. last waypoint because the setpoint switch occurs at the waypoint) global_sp_updated_set_once = true; - psi_track = get_bearing_to_next_waypoint((double)global_pos.lat / (double)1e7d, (double)global_pos.lon / (double)1e7d, + psi_track = get_bearing_to_next_waypoint(global_pos.lat, global_pos.lon, (double)global_setpoint.lat / (double)1e7d, (double)global_setpoint.lon / (double)1e7d); printf("next wp direction: %0.4f\n", (double)psi_track); |