External GPS antenna question
Rask Ingemann Lambertsen
ccc94453 at vip.cybercity.dk
Sun Jul 5 21:06:07 CEST 2009
On Sat, Jul 04, 2009 at 09:17:25PM +0400, Paul Fertser wrote:
> Sebastian Krzyszkowiak <seba.dos1 at gmail.com> writes:
> > On 7/4/09, Hammer Armin <ahammer at datazug.ch> wrote:
> >> With the internal gps antenna, the first fix last quite long -
> >> with the external - within 5min to 10min I get a fix.
> >
> > WTF? I'm getting fix easly with *internal* GPS antenna in 30 seconds -
> > 2 minutes...
>
> Because you already have almanac (and sometimes ephemeris) data.
Where would I have it from (that Hammer Armin doesn't)?
I ran the GPS-TTFF script below standing on my balcony. Times with * are
with the --coldstart option.
45* 38 57 48 48 44 44* 45* 52* 44*
And that's on Debian, which doesn't have the latest-and-greatest FSO
where saving and restoring almanac and ephemeris works. Back when I briefly
used OM 2008.8, I also got a fix in around 45 s. I tried with the Freerunner
lying in the window frame, and then it took 11 minutes to get a fix. My
Freerunner is revision A6 with date code 20080722.
#!/bin/sh
# GPS-TTFF - Find GPS time to first fix using all the important buzz-words
# such as D-bus, Gypsy, freedesktop.org and freesmartphone.org.
# Destinations and paths are listed in /etc/dbus-1/system.d/*.
# Interfaces are "documented" at <URL:http://docs.freesmartphone.org/>.
DBUSCALL_='dbus-send --print-reply=undocumented --system --type=method_call --dest='
if [ "--coldstart" = "$1" ]; then
rm -f /var/lib/freesmartphone/ogpsd.pickle
fi
# Crude way of stripping white-space from $() output.
GPSPOLICY=$(echo $(${DBUSCALL_}org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.GetResourcePolicy string:GPS))
${DBUSCALL_}org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy string:GPS string:enabled
START=$(date +%s)
# Where is the first return value from GetPosition documented?
while ${DBUSCALL_}org.freedesktop.Gypsy /org/freedesktop/Gypsy org.freedesktop.Gypsy.Position.GetPosition \
| head -n 1 | grep -q -v -F -e 'int32 15' -e 'int32 7'; do
sleep 1
done
FINISH=$(date +%s)
echo "Time to first fix: $((${FINISH} - ${START})) s"
${DBUSCALL_}org.freedesktop.Gypsy /org/freedesktop/Gypsy org.freedesktop.Gypsy.Position.GetPosition
${DBUSCALL_}org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy string:GPS string:${GPSPOLICY}
--
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year
More information about the community
mailing list