[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-commit-watch
Subject:    [Gpsd-commit-watch] Project gpsd at BerliOS branch, master,
From:       gpsd-dev () lists ! berlios ! de (yazug at BerliOS)
Date:       2010-10-06 20:42:24
Message-ID: 20101006204225.14DD2480B4C () sheep ! berlios ! de
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Project gpsd at BerliOS".

The branch, master has been updated
       via  d99b5c7cd4ccfc4f427dd2093e3da10497c7f895 (commit)
      from  3f6f1c033a59cc2d05b353d8d70e0229a0f71892 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d99b5c7cd4ccfc4f427dd2093e3da10497c7f895
Author: Jon Schlueter <jon.schlueter@gmail.com>
Date:   Wed Oct 6 16:32:09 2010 -0400

    gpsutil.c: fill_dop bug if sats < 4
    
    bug present where it would try to invert matrix with out enough data...
    added guard to prevent trying to calculate dop's if we don't have 4 sats
    with current code.

diff --git a/gpsutils.c b/gpsutils.c
index 6b94de0..1bf200e 100644
--- a/gpsutils.c
+++ b/gpsutils.c
@@ -466,6 +466,8 @@ gps_mask_t fill_dop(const struct gps_data_t * gpsdata, struct dop_t * dop)
     double xdop, ydop, hdop, vdop, pdop, tdop, gdop;
     int i, j, k, n;
 
+    memset(satpos, 0, sizeof(satpos));
+
 #ifdef __UNUSED__
     gpsd_report(LOG_INF, "Satellite picture:\n");
     for (k = 0; k < MAXCHANNELS; k++) {
@@ -488,6 +490,16 @@ gps_mask_t fill_dop(const struct gps_data_t * gpsdata, struct dop_t * dop)
 	n++;
     }
 
+    /* If we don't have 4 satellites then we don't have enough information to calculate DOPS */
+    if (n < 4) {
+	gpsd_report(LOG_DATA + 2, "Not enough Satellites available %d < 4:\n",
+		    n);
+	return 0;		/* Is this correct return code here? or should it be ERROR_IS */
+    }
+
+    memset(prod, 0, sizeof(prod));
+    memset(inv, 0, sizeof(inv));
+
 #ifdef __UNUSED__
     gpsd_report(LOG_INF, "Line-of-sight matrix:\n");
     for (k = 0; k < n; k++) {

-----------------------------------------------------------------------

Summary of changes:
 gpsutils.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Project gpsd at BerliOS
_______________________________________________
Gpsd-commit-watch mailing list
Gpsd-commit-watch@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/gpsd-commit-watch
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic