The Following User Says Thank You to handaxe For This Useful Post: | ||
|
2016-01-05
, 12:09
|
|
Posts: 868 |
Thanked: 2,516 times |
Joined on Feb 2012
@ Germany
|
#12
|
Ok, this likely is out of scale BUT, the n900 is a great GPS device but it lacks an implementation of GPSd, or a nmea (some such) output daemon.
|
2016-02-26
, 15:35
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#13
|
This is pretty neat as now I can run it from cron every half an hour or so and push the position to my server. Just perfect in case I lose my device or it gets stolen.
#!/bin/sh STR=`gpscon runs=1` LAT=`echo $STR | cut -d " " -f 2 | cut -d ";" -f 1` LON=`echo $STR | cut -d " " -f 4 | cut -d ";" -f 1` ALT=`echo $STR | cut -d " " -f 6` STR={\"name\":\"`hostname`\",\"time\":`date +%s`,\"lon\":$LON,\"lat\":$LAT if [ $ALT != "nan" ]; then STR=$STR,\"alt\":$ALT fi STR=$STR} curl -H "Content-Type: application/json" -X POST -d $STR \ http://<myserver>/gpscon/json.php -k
gpscon runs=x
|
2016-02-26
, 18:25
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#14
|
[nemo@Dinghy ~]$ gpscon Latitude: 51.6126; Longitude: -0.730567; Altitude: nan Latitude: 51.6126; Longitude: -0.730567; Altitude: nan Latitude: 51.6126; Longitude: -0.730567; Altitude: nan Latitude: 51.6126; Longitude: -0.730564; Altitude: nan ^C [nemo@Dinghy ~]$ gpscon runs=1 Latitude: 51.6126; Longitude: -0.730567; Altitude: nan [nemo@Dinghy ~]$
|
2016-02-26
, 19:46
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#15
|
[nemo@Dinghy ~]$ gpscon Latitude: 51.6126; Longitude: -0.730567; Altitude: nan Latitude: 51.6844; Longitude: -1.26139; Altitude: nan Latitude: 51.6844; Longitude: -1.26139; Altitude: nan Latitude: 51.6844; Longitude: -1.26139; Altitude: nan ^C [nemo@Dinghy ~]$ gpscon runs=1 Latitude: 51.6126; Longitude: -0.730567; Altitude: nan [nemo@Dinghy ~]$
[nemo@Dinghy ~]$ gpscon runs=3 Latitude: 51.6126; Longitude: -0.730567; Altitude: nan Latitude: 51.6844; Longitude: -1.26139; Altitude: nan Latitude: 51.6844; Longitude: -1.26139; Altitude: nan [nemo@Dinghy ~]$ gpscon runs=1 Latitude: 51.6844; Longitude: -1.26139; Altitude: nan [nemo@Dinghy ~]$
|
2016-02-26
, 20:14
|
|
Posts: 868 |
Thanked: 2,516 times |
Joined on Feb 2012
@ Germany
|
#16
|
Satellite-based positioning methods such as GPS.
The Following User Says Thank You to Halftux For This Useful Post: | ||
|
2016-02-26
, 20:48
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#17
|
|
2016-02-26
, 20:53
|
|
Posts: 868 |
Thanked: 2,516 times |
Joined on Feb 2012
@ Germany
|
#18
|
Hmm. Something is fishy here. I tried gpscon limit=80 and it never terminated (not in 5 minutes anyway). Neither did limit=10.
|
2016-02-26
, 21:25
|
|
Posts: 868 |
Thanked: 2,516 times |
Joined on Feb 2012
@ Germany
|
#19
|
1. That means that after 30 minutes I have 10 instances of gpscon running and no data uploaded because my script never passed that line. If I use x=1, the script runs normally but the value is never updated.
kill -SIGTERM $(pidof gpscon)
The Following 2 Users Say Thank You to Halftux For This Useful Post: | ||
|
2016-02-26
, 22:45
|
|
Posts: 6,447 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#20
|
Let it run and see how the values are changing. What is the minimum value for your accuarcy?
@pichlo By the way the altitude is nan this means the position doesn't come from the gps.
The Following User Says Thank You to pichlo For This Useful Post: | ||
CNT (Columbus Navigation Toolkit) provides such but 1) it has a GUI and does a whole lot more (resource hungry but very stylish) and 2) is unstable.
I submit that the above is broadly consistent with gpscon current mission. Easy to write huh, as a non-coding, ageing smart-***, I know :-)