Mercurial > lbo > hg > geohub
changeset 134:c7721d279d56
gpsd: convert epx/epy to numbes
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Thu, 06 May 2021 12:17:17 +0200 |
parents | f1bfff22e35c |
children | b740e572937a |
files | examples/gpsd/gpsd.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/gpsd/gpsd.py Thu May 06 12:12:48 2021 +0200 +++ b/examples/gpsd/gpsd.py Thu May 06 12:17:17 2021 +0200 @@ -20,7 +20,7 @@ geohub_url = geohub_templ.format(HOST=args.geohub_host, CLIENT=args.client, SECRET=args.secret, PROTOCOL=args.geohub_scheme) additional = '&lat={lat}&longitude={long}&s={spd}&time={ts}&unit=ms&accuracy={acc}&ele={ele}'.format( lat=info['lat'], long=info['lon'], spd=info['speed'], ts=info['time'], - acc=math.sqrt(info['epx']**2+info['epy']**2), ele=info['alt']) + acc=math.sqrt(float(info['epx'])**2+float(info['epy'])**2), ele=info['alt']) # Delete unnecessary data. url = geohub_url + additional return sess.post(url, data="")