View Single Post
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#80
Originally Posted by Leachim View Post
@hcm: The exact error message is "Station not found!", i cant reproduce it after a GPS fix. becouse it find everytime a station via GPS search. So probably the implementation of an working GPS search will fix this too.
ok, I also get this error just after restarting the device without using the GPS first. But I still can't reproduce the "wrong result list" error you described in your previous post. Does this error happen for any combination of search terms?

So about the "first GPS fix" issue: apparently, the "status" variable of the GPS receiver doesn't work as expected, status ==LOCATION_GPS_DEVICE_STATUS_FIX can't be used to tell if its a real fix…
So the workaround would be to check the horizontal accuracy to be less than a certain number. So what should that number be?

I would prefer to use just cell based positioning because its much faster and doesn't drain the battery (and you need a network connection anyway to use fahrplan).
An accuracy of 5km is usually available in a relatively short time. In my experience, the position is still much better than 5 km, when I checked it, it was usually a few hundred meters up to about 1 km… In urban neighborhoods, this could of course find way too many stations…

Better positioning can be achieved by using "real" GPS, but it will take longer to get a (better) fix and drains the battery (not much of course, since we only need one fix).

I would rather NOT switch the GPS receiver on when starting the application, since it is not always needed and it would drain the battery if you leave the application open to have a look at it from time to time…

So in the attachment there is a version which uses cell based positioning and checks for an accuracy better than 5km. Please check if is fast enough and finds your station in your neighborhood… there is no need to replace the existing fahrplan app, just gunzip it somewhere and run it from console… It will crash if you try to switch to the departure window, since this is not implemented, yet
Attached Files
File Type: gz fahrplan.gz (54.6 KB, 79 views)