Notices


Reply
Thread Tools
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#31
Originally Posted by pichlo View Post
The curious bit is that it runs normally with runs=1, only gives incorrect results.
Does runs=1 posm=onlysat gives a result or does it hang? Try outside at least for 5min.

Originally Posted by pichlo View Post
What is the difference between runs=1 and runs=3 that may cause the hang?
The difference not happening in my code it is the location api.
I starting source->startupdates() and when it is set to positioning method all, the first value will be taken not from the gps.

But now comes something which I do not understand there will be no further emited signal which calling the output slot. This happens for example when no new update could be aquired. Result is the application hangs and will never call quit. However when not set posm=onlysat it should fall back to a different position method but there comes no signal to call my slot.
I would like to try source->requestupdate(timeout) to get at least a timeout.

So I could reproduce your problem and could get rid of it by calling the script with sh. But the N900 uses ash instead of sh which could produce the problem. I think on sailfish it is sh already.

So over all I don't know what is happening. Problem could be:
- qt version behave different 2 instance maybe 2 event loops which can't catch all events from signal
- cron problem (btw which user/rights runs cron task?), shell problem
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#32
Originally Posted by Halftux View Post
Does runs=1 posm=onlysat gives a result or does it hang? Try outside at least for 5min.
This is weird.
runs=1 posm=onlysat from the command line returns immediately, with the last (incorrect) result.
runs=10 posm=onlysat just hangs. Definitely for more than 20 minutes anyway. Admittedly I only tried indoors, with the phone in the window. Too cold outside to stand there with a phone in an outstretched hand for 5 minutes It is also rather cloudy, so the GPS signal may not be that brilliant. The best I got with --fout --sat was 0 out of 3 satellites. The last time I tried it at home (the same way, phone in the window) I got a fix in just a few minutes.

That runs=1 posm=onlysat returning immediately tells me that you are probably right about the API differences. I think the time has cometh for me to dig up the sources, build it myself and start debugging
__________________
Русский военный корабль, иди нахуй!
 

The Following User Says Thank You to pichlo For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#33
After my first try with Sailfish and vixie-cron it looks like that the api is not talking to the gps.
So I can get the value from run number one which is definitely some last known value. There will be no further runs because the update signal from the api will not be send because the gps is not active.
You can see it because there is no icon blinking in sfos for active gps.
So far I have no clue to fix or to debug this problem. For sure it is not my app it is maybe the console environment, cron or the api.
 

The Following User Says Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#34
So here the environment from cron shell. Definitely different.

SHELL=/bin/sh
PATH=/usr/bin:/bin
_=/usr/bin/env
PWD=/home/nemo
SHLVL=2
LOGNAME=nemo
So how to get the environment profil get to run in the cron shell?
 

The Following User Says Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#35
ok fixed it with by adding to the script:

Code:
source /home/nemo/.bash_profile
Now it should run in cron. So it was all about the environment.
 

The Following User Says Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#36
New version 0.0.9 will be out soon.

There you have a new option [tout=integer] for setting a timeout to aquire a gps position when you are in "onlysat" mode. When not setting a timeout the application could wait forever to get enough satellites.
The timeout is in seconds, when this time is reached the application exits.

For sailfish the onlysat mode will now dismiss the first value which was known to be a last known satellite value. So this example command should give you now the current position, if enough satellites are visible. (could be same for harmattan I need to check)

Code:
gpscon runs=1 posm=onlysat
SFOS out now others will follow next days.
 

The Following 6 Users Say Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#37
New version 0.0.10 will be out soon.

Added track segment and track name to gpx export.
With s+[enter] you can mark the end of a segment in the log file.

Some gpx viewer and editors need a starting and ending segment to properly open the gpx file. So now when a new track starts or ends a segment will be automatically opened and closed.

Last edited by Halftux; 2016-12-01 at 10:40.
 

The Following 5 Users Say Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#38
Found some link about gpstracker with gpscon, this example is for sailfish.

Online JGPSTracker
systemctl

Maybe this could be interesting for somebody.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
epninety's Avatar
Posts: 269 | Thanked: 1,096 times | Joined on Sep 2009 @ Hampshire, UK
#39
Originally Posted by Halftux View Post
For sailfish the onlysat mode will now dismiss the first value which was known to be a last known satellite value. So this example command should give you now the current position, if enough satellites are visible. (could be same for harmattan I need to check)

Code:
gpscon runs=1 posm=onlysat
Just revisiting my scripts that use gpscon when moving them over to the X. I noticed that if I enter...

Code:
/usr/bin/gpscon tout=60 runs=1 posm=onlysat
It does NOT seem to dump the first useless position fix. Went back to my JollaC and I get the same behaviour there, In each case it returns a stale fix. (Using V0.0.10)

The C returns in about 15 seconds, the X returns almost straight away. Both return a stale fix which is never updated using this command form. (If I use runs=2 I get updated fix on the second pass)

Even with this issue, many thanks for a great tool!

Last edited by epninety; 2017-10-12 at 23:53. Reason: removed dumb statement (RTFM)
 

The Following 3 Users Say Thank You to epninety For This Useful Post:
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#40
Originally Posted by epninety View Post

It does NOT seem to dump the first useless position fix. Went back to my JollaC and I get the same behaviour there, In each case it returns a stale fix. (Using V0.0.10)

The C returns in about 15 seconds, the X returns almost straight away. Both return a stale fix which is never updated using this command form. (If I use runs=2 I get updated fix on the second pass)
I don't know what is going on with sailfish positioning method.
For sure it behave different. It depends maybe also on the settings, or if you have a sim card or not, more last know values (from different methods), maybe different sailfish versions, wifi hmm what ever.
Soon I will release a version where you can define how many positioning events you want to dump.

But I will also suggest you to try out the limit option.
This option specifies an accuracy threshold. It will have the first output with a better accuracy than the limit.
With the right tuned limit you could be sure to get a satellite position.

To determine a good limit I recommend to make some experience with --fout and maybe also with --sat. There you could see the accuracy and the correlation with satellites.

With 6 satellites out of 25 I had an accuracy of 3 with the jolla c.


Originally Posted by epninety View Post
Even with this issue, many thanks for a great tool!
Nice that you like it and thx for the feedback. I am glad that it is for some more people useful.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Reply

Tags
console, location, position, shell

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:33.