From 6ddbe91f42cf3b4d90bae2273cf112c7e255ac57 Mon Sep 17 00:00:00 2001 From: makekam <1256400447@qq.com> Date: Sat, 18 Nov 2017 14:06:13 +0800 Subject: [PATCH] Change the name of sdlog file in case of differential gps The fix_type variable in ubx.cpp may be assigned to 4(DGPS) or 5(Float RTK) or 6(Fixed RTK). So if we use differential gps, the value of the fix_type variable may not be 3. But gps still has 3d data and gps time. So The name of the file should named with gps time.My ublox differential gps fix_type is 5 (Float RTK). --- src/modules/sdlog2/sdlog2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index ff69dc3df7..681f2a64ea 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -1442,7 +1442,7 @@ int sdlog2_thread_main(int argc, char *argv[]) if (gps_pos_updated && log_name_timestamp) { gps_time_sec = buf_gps_pos.time_utc_usec / 1e6; - has_gps_3d_fix = buf_gps_pos.fix_type == 3; + has_gps_3d_fix = buf_gps_pos.fix_type >= 3; } if (!logging_enabled) {