summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.c4
-rw-r--r--zodiac.c9
2 files changed, 4 insertions, 9 deletions
diff --git a/gpsd.c b/gpsd.c
index 857c20d5..0aef8d13 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1,4 +1,3 @@
-#include "config.h"
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
@@ -14,6 +13,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
+#include "config.h"
#if defined (HAVE_PATH_H)
#include <paths.h>
#else
@@ -21,7 +21,6 @@
#define _PATH_DEVNULL "/dev/null"
#endif
#endif
-
#if defined (HAVE_SYS_SELECT_H)
#include <sys/select.h>
#endif
@@ -475,7 +474,6 @@ int main(int argc, char *argv[])
if (!service)
service = getservbyname("gpsd", "tcp") ? "gpsd" : DEFAULT_GPSD_PORT;
-
if (debuglevel < 2)
daemonize();
diff --git a/zodiac.c b/zodiac.c
index d8712d09..d4bc2bc6 100644
--- a/zodiac.c
+++ b/zodiac.c
@@ -192,11 +192,6 @@ static void handle1000(struct gps_session_t *session, unsigned short *p)
gpsd_report(1, "Separation: %f\n", (p[O(33)] / 100));
#endif
- session->mag_var = p[O(37)] * 180 / (PI * 10000); /* degrees */
- session->gNMEAdata.track = p[O(36)] * 180 / (PI * 1000); /* degrees */
-
- session->gNMEAdata.satellites_used = p[O(12)];
-
session->hours = p[O(22)];
session->minutes = p[O(23)];
session->seconds = p[O(24)];
@@ -208,8 +203,10 @@ static void handle1000(struct gps_session_t *session, unsigned short *p)
session->gNMEAdata.longitude = 180.0 / (PI / ((double) getlong(p + O(29)) / 100000000));
session->gNMEAdata.speed = ((double) getulong(p + O(34)) / 100.0) * 1.94387;
session->gNMEAdata.altitude = (double) getlong(p + O(31)) / 100.0;
-
session->gNMEAdata.status = (p[O(10)] & 0x1c) ? 0 : 1;
+ session->mag_var = p[O(37)] * 180 / (PI * 10000); /* degrees */
+ session->gNMEAdata.track = p[O(36)] * 180 / (PI * 1000); /* degrees */
+ session->gNMEAdata.satellites_used = p[O(12)];
if (session->gNMEAdata.status)
session->gNMEAdata.mode = (p[O(10)] & 1) ? 2 : 3;