diff -Naur gpsd-3.16/gpsd.c gpsd-3.16-patched/gpsd.c --- gpsd-3.16/gpsd.c 2016-01-04 15:22:45.000000000 -0500 +++ gpsd-3.16-patched/gpsd.c 2017-06-30 09:03:19.481215064 -0400 @@ -140,6 +140,7 @@ #ifndef FORCE_NOWAIT #define NOWAIT nowait static bool nowait = false; +static bool batteryRTC = false; #else /* FORCE_NOWAIT */ #define NOWAIT true #endif /* FORCE_NOWAIT */ @@ -1513,7 +1514,7 @@ */ if ((changed & TIME_SET) == 0) { //gpsd_log(&context.errout, LOG_PROG, "NTP: No time this packet\n"); - } else if ( 0 >= device->fixcnt ) { + } else if ( 0 >= device->fixcnt && !batteryRTC ) { /* many GPS spew random times until a valid GPS fix */ //gpsd_log(&context.errout, LOG_PROG, "NTP: no fix\n"); } else if (isnan(device->newdata.time)) { @@ -1836,7 +1837,7 @@ #endif /* PPS_ENABLE && SOCKET_EXPORT_ENABLE */ #endif /* CONTROL_SOCKET_ENABLE */ - while ((option = getopt(argc, argv, "F:D:S:bGhlNnP:V")) != -1) { + while ((option = getopt(argc, argv, "F:D:S:bGhlNnrP:V")) != -1) { switch (option) { case 'D': context.errout.debug = (int)strtol(optarg, 0, 0); @@ -1873,6 +1874,9 @@ nowait = true; #endif /* FORCE_NOWAIT */ break; + case 'r': + batteryRTC = true; + break; case 'P': pid_file = optarg; break;