diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-20 03:04:56 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-21 12:28:11 +0200 |
commit | 37b133e231e945c978dd66fd5daed0f12caa8073 (patch) | |
tree | 509733d5db7e58a04f7d1b24d34b60a84346e035 /src/modules/commander | |
parent | 8ae50a4ba524f840dc7d96b79c5dbad1b7be15f1 (diff) | |
download | px4-firmware-37b133e231e945c978dd66fd5daed0f12caa8073.tar.gz px4-firmware-37b133e231e945c978dd66fd5daed0f12caa8073.tar.bz2 px4-firmware-37b133e231e945c978dd66fd5daed0f12caa8073.zip |
Added home position switch on GPS position - gives a more reliable home position setup
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index ce6de88ef..7ac7aff0f 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1092,9 +1092,9 @@ int commander_thread_main(int argc, char *argv[]) && global_position.global_valid) { /* copy position data to uORB home message, store it locally as well */ - home.lat = global_position.lat; - home.lon = global_position.lon; - home.alt = global_position.alt; + home.lat = gps_position.lat / (double)1e7; + home.lon = gps_position.lon / (double)1e7; + home.alt = gps_position.alt; warnx("home: lat = %.7f, lon = %.7f, alt = %.4f ", home.lat, home.lon, (double)home.alt); mavlink_log_info(mavlink_fd, "[cmd] home: %.7f, %.7f, %.4f", home.lat, home.lon, (double)home.alt); |