GPS rework: Please test and report on software fix prior to attempting any hardware fix
-stacy
slm3095om at Millions.Ca
Wed Aug 6 01:10:02 CEST 2008
Al Johnson wrote:
>
> For a bit more consistency of timing, less manual intervention, and enough
> readings to get an idea of the run to run variation in that location, can I
> suggest a script? It could do with a timeout when waiting for a fix since
> with deivestrength 3 and idleclk 1 this can take a _very_ long time, possibly
> forever in some locations!
I was just about to write a similar script when I saw yours hit my
inbox... other than a couple of assumptions, I like yours better than
what I had in mind
> #!/bin/sh
> PASSES=10
> TTFF=""
>
> get_ttf() {
> echo "1" > /sys/bus/platform/devices/neo1973-pm-gps.0/pwron
> TTFF=`(time grep "GPRMC,[0-9\.]*,A," -m 1 /dev/ttySAC1) 2>&1 |grep real`
> echo "0" > /sys/bus/platform/devices/neo1973-pm-gps.0/pwron
> echo $DRIVESTRENGTH $IDLECLK $TTFF
> sleep 20
> }
You assume that the gps is already off, you should either check that the
gps is off or just turn it off
> echo d i time
> until [ $PASSES -eq 0 ]
> do
> for DRIVESTRENGTH in 0 1 2 3
> do
> for IDLECLK in 0 1
> do
> #echo testing drive strength $DRIVESTRENGTH and clock idle $IDLECLK
> echo $DRIVESTRENGTH > /sys/module/glamo_mci/parameters/sd_drive
> echo $IDLECLK > /sys/module/glamo_mci/parameters/sd_idleclk
You assume the mount point of the SDCard. Probably a reasonable
assumption, but I mount mine as /home
> touch /media/card/gpstest
> sync
> get_ttf
> done
> done
> PASSES=$(($PASSES-1))
> done
>
should likely set drivestrength and idleclk back to default values.
And the results:
d i min / avg / max
0 0 35.20/ 55.33/144.30
0 1 37.39/ 77.76/315.76
1 0 33.92/ 38.90/ 41.78
1 1 38.70/ 84.46/151.32
2 0 37.66/ 47.78/108.26
2 1 45.10/120.80/207.08
3 0 36.07/ 42.07/ 47.82
3 1 97.46/173.09/359.69
-stacy
More information about the community
mailing list