commit 4ac49b520c633fb1b24bb17119779db123e2b266 Author: Baruch Even <baru...@il.ibm.com> Date: Sun Oct 11 23:10:18 2009 +0200
Set NAV2 parameters to define the static threshold to reduce movement noise when the GPS is stationary. diff --git a/conf/example/frameworkd.conf b/conf/example/frameworkd.conf index 7013332..6949e16 100644 --- a/conf/example/frameworkd.conf +++ b/conf/example/frameworkd.conf @@ -85,6 +85,9 @@ device = GTA02Device channel = SerialChannel # For UDPChannel the path defines the port to listen to path = /dev/ttySAC1 +# Threshold of movement, this can reduce the noise when the GPS is stationary or moving slowly +# Value is in cm/s (centimeter per second) +static_theshold = 10 [ogpsd.factory] diff --git a/framework/subsystems/ogpsd/ubx.py b/framework/subsystems/ogpsd/ubx.py index 9379b1b..7c28fae 100644 --- a/framework/subsystems/ogpsd/ubx.py +++ b/framework/subsystems/ogpsd/ubx.py @@ -16,6 +16,7 @@ import struct import calendar import dbus import dbus.service +from framework.config import config import logging logger = logging.getLogger('ogpsd') @@ -278,6 +279,24 @@ class UBXDevice( GPSDevice ): #self.send("CFG-RXM", 2, {"gps_mode" : 2, "lp_mode" : 0}) # Enable use of SBAS (even in testmode) self.send("CFG-SBAS", 8, {"mode" : 1, "usage" : 7, "maxsbas" : 3, "scanmode" : 0}) + # Setup NAV2 parameters (all parameters other than StaticThres are the same as the default + self.send("CFG-NAV2", 40, {"DGPSTO": 60, + "FixMode": 2, + "FixedAltitude": 50000, + "MaxDR": 5, + "MaxSVs": 16, + "MinCN0After": 10, + "MinCN0Initial": 15, + "MinELE": 5, + "MinSVInitial": 3, + "MinSVs": 3, + "NAVOPT": 1, + "PACC": 100, + "PDOP": 250, + "Platform": 3, # Automotive = 3, pedestrian = 2, stationary = 1 + "StaticThres": config.getInt( "ogpsd", "static_threshold", 10), + "TACC": 300, + "TDOP": 250}) # Disable NMEA for current port self.ubx["CFG-PRT"] = {"In_proto_mask" : 1, "Out_proto_mask" : 1}
_______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland