![]() |
[Announce] gpscon gps position cli shell console
1 Attachment(s)
Gpscon is a command line tool to acquire the gps position with the qtmobility/qtlocation api.
In addition it has the ability to write a log file and to save a gpx file. Code:
gpscon v0.0.11 by halftux gpscon without parameter gpscon will be in endless loop and print to stdout: Latitude; Longitude; Altitude The application exits with:x+[enter] t+[enter]: will mark a new track in the logfile. [--fout] will enhance the output with additional values: Direction; Ground Speed; Vertical Speed; Horizontal Acc;Vertical Acc [--sat] with this option also the satellite status will be requested and printed out "Using x of x satellites" [posm=string] this will select the positioning method. Default is all. string=all |AllPositioningMethods string=onlysat |SatellitePositioningMethods string=nonesat |NonSatellitePositioningMethods [interval=integer] This property holds the requested interval in milliseconds between each update. If the update interval is not set (or is set to 0) the source will provide updates as often as necessary. If the update interval is set, the source will provide updates at an interval as close to the requested interval as possible. If the requested interval is less than the minimumUpdateInterval(), the minimum interval is used instead. [runs=integer] sets the amount on how many (shown) requests are made before exit [dumps=integer] sets the amount on how many first requests get dumped [limit=integer] sets the limit of the needed horizontal/vertical accuracy value before print out. There will be only one print out and after this the app is closing [log=string] writing to a log file string=txt |write/append gpscon.log to user dir string=gpx |write/append gpscon.log to user dir after last run or exit, the log file will be converted and written to gpscon.gpx in user dir string=log2gpx |convert log to gpx and exit. [tout=integer] sets the timeout for aquire a gps position in seconds. [--del] If log file exists it will be removed [--date] adds date to output [--time] adds time to output [--newtrack] will mark in the log file a new track. When converting to gpx old log file data and new data will be visible as separate track. [--lknv] This should output the last known value once at first (debug). If runs=1 it will only print the last known value out and quit. [--script] Will deactivate the user input which causes trouble with cron or python scripts. This option is recommended when using gpscon with scripts. [--help] prints help Available for: Sailfish Harmattan Fremantle Attached is the old source code in alpha stage, I commented out not tested code. It works same like the version before, it has only more options. New source in fremantle extra-devel repo. For sailfish create makefile by add this argument to qmake Code:
qmake "CONFIG+=sailfish" |
Re: [Announce] gpscon gps position cli shell console
Thanks, seem to work well in SFOS.
Some changes were needed to get it to compile though; I had to add " QT += positioning location" to the project file and comment out "using namespace QtMobility;" in gpspos.h 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. |
Re: [Announce] gpscon gps position cli shell console
1 Attachment(s)
Quote:
Quote:
Have fun. |
Re: [Announce] gpscon gps position cli shell console
Version for fremantle is available now.
Added log file option. When option is set to txt it will create a log file in /$userdir/gpscon.log When the option is set gpx it will create a gpx file from the log file. Only values with an altitude gets saved in gpx. When you interrupt the application with control+c no gpx file will be created instead use x+enter You will find the sources in fremantle extra repo. |
Re: [Announce] gpscon gps position cli shell console
Quote:
|
Re: [Announce] gpscon gps position cli shell console
Quote:
|
Re: [Announce] gpscon gps position cli shell console
Quote:
The gpx file will only get created when the application will exit normally. The gpx file gets created from the log file. So when your N900 suddenly reboots you can start gpscon again with gpx option and run=1 and you will have all data in the gpx file. This will work until you delete the log file. |
Re: [Announce] gpscon gps position cli shell console
With the new version 0.0.7 you can convert a log file to a gpx as follow:
Code:
/opt/gpscon/bin/gpscon log=log2gpx Now you can also mark new tracks in the log file. If you have an old recorded track in the log file and you would like to record another into the log file, you could start as follow: Code:
/opt/gpscon/bin/gpscon log=gpx --newtrack |
Re: [Announce] gpscon gps position cli shell console
Hi Halftux,
good job this. One of those programs that has utility beyond use of the n900 as a primary phone and more as a pocket computer. Do you have a roadmap for future features, if any and however vague at the mo'? |
Re: [Announce] gpscon gps position cli shell console
Quote:
|
All times are GMT. The time now is 02:44. |
vBulletin® Version 3.8.8