[ gpsdrive ] Patches
Paul Martin
pm at debian.org
Thu Dec 18 05:56:41 AKST 2008
On Thu, Dec 18, 2008 at 01:25:04PM +0100, Guenther Meyer wrote:
> Am Donnerstag 18 Dezember 2008 schrieb Paul Martin:
> > The following fixes the code that's commented out that speaks the current
> > GPS reception status, turns the "satellite status" bar light green on a
> > DGPS fix and allows for more than 12 satellites to be in view (my Holux
> > M241 reports 13 when it has a DGPS fix). It also fixes the Mapnik
> > projection to match that which gpsdrive requests.
> >
> > There's also a fix for the flashing 2D/3D fix problem.
>
> thanks for the patch!
>
> but, it's a little bit difficult, because you are addressing various different
> topics in one patch, which is a little bit confusing.
The flashing 3D fix correction is:
--- gpsdrive-trunk/src/nmea_handler.c 2008-12-18 09:16:44.091684929 +0000
+++ gpsdrive-local/src/nmea_handler.c 2008-12-18 09:19:51.091635694 +0000
@@ -334,7 +334,7 @@
}
else
{
- current.gpsfix = 2;
+ if (current.gpsfix<2) current.gpsfix = 2;
haveposcount++;
if (haveposcount == 3)
{
@@ -657,7 +660,7 @@
}
else
{
- current.gpsfix = 2;
+ if (current.gpsfix<2) current.gpsfix = 2;
haveposcount++;
if (haveposcount == 3)
{
>
> mapnik projection:
> I guess, this won't fix anything to set another fixed projection again.
> this topic was discussed several times, and the best way to fix this, would be
> to reead the used projection from the database, so it will always fit, even
> if will be changed to something different there.
That's this one:
diff -ur gpsdrive-trunk/scripts/mapnik/osm-in.xml gpsdrive-local/scripts/mapnik/osm-in.xml
--- gpsdrive-trunk/scripts/mapnik/osm-in.xml 2008-12-18 09:49:06.019635700 +0000
+++ gpsdrive-local/scripts/mapnik/osm-in.xml 2008-12-18 09:50:03.491633841 +0000
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
-<Map bgcolor="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
+<Map bgcolor="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Style name="mapnik:selection">
<Rule>
<Filter>[mapnik:geometry] = 1</Filter>
This matches in the line in src/mapnik.cpp:
mapnik::projection Proj("+proj=merc +datum=WGS84");
//mapnik::projection Proj("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over");
> dgps:
> you introduced a new variable 'satfix' for that. would it be possible, to
> include this into 'gpsfix' with a value of 3 for dgps?
No, because gpsfix == 3 means a 3D fix. You can have a 3D fix without DGPS
and a 2D fix with DGPS. "satfix" was already a local variable storing that
value.
--
Paul Martin <pm at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.gpsdrivers.org/pipermail/gpsdrive/attachments/20081218/cb2f09cf/attachment.bin>
More information about the GPSdrive
mailing list