Forum: General Topics
Forums / General Topics / select if nearer
Subject: | select if nearer | |
shchenka 18:32 | Hi, I've only checked the 0.6.3 today for the firs time. It seems packed with features and improvements and it will take some time until I llearn to take advantage of them. So far, it seems that "select if nearer" in the proximity alerts in 0.6.3 does not work as is should, that is, unlike in the previous version, it seems to do exactly the same as the "select wpt" option. Or maybe I missed something. Cheers, --sh | |
Stephen 21:17 Location: Phone Model: | Hi Shchenka, I have changed a fair bit of the proximity alert code in the new version, but the Select If Nearer should still work slightly differently to the default Select Wpt option (though they might often seem quite similar depending on the circumstances). I tried it on a train yesterday, with waypoints marked for each station along the line and it seemed to work as expected. If an existing waypoint is not currently selected then both options will initially work the same - ie, a new waypoint will be selected if it comes closer than the proximity threshold. Any other waypoint will then only be automatically selected if it becomes closer than both the proximity threshold AND the existing selected waypoint. The train might have been an easy test, since the stations are generally a couple of miles apart but I had the proximity distance set to 300m, so each station would get selected just as the train was arriving at it. What kind of scenario were you testing it under - were the waypoints a lot closer together than my railway test? Cheers, Stephen | |
shchenka 7:28 | Mostly driving. I'll experiment more with the "sel if nearer" option and will get back. | |
shchenka 17:18 | Hi Stephen, I tested it a bit more today (walking) and frankly I couldn't figure out when it does switch to the nearer waypoint. Sometimes it did, other times it did not. I think I simply do not have the intuition of how the selection algorithm works. I would expect it simply selects the nearest waypoint (when in range) to my current locations. But it seems to be doing something else ... ? BTW: I've noticed that switching from the plan view to the waypoint lists screen works now much faster, it seems to be doing much of the sorting in the background now ? Anyway, it's great, as the pause when you had more than a thousand of active waypoints was quite annoying :) Thanks, --sh | |
Stephen 20:22 Location: Phone Model: | Glad to hear the waypoints page is more responsive - yes, I moved the code into a background thread so that it doesn't pause when switching to page [2]. Does mean that the waypoints can jump around a bit a couple of seconds after switching to the page, but once they are roughly in the right order its not so bad. Regarding the selection algorithm, there are a couple of potential issues that I suspect might be causing the strange behaviour that you're seeing:- 1. If you're moving down a path roughly equidistant between two waypoints its likely that the 'nearest waypoint' will alternate a number of times between the two of them. With no other checks, this would cause TMJ to annoyingly keep showing alerts as each waypoint becomes the nearest one. To prevent this TMJ will only show the alert once for each waypoint, until it moves 'out of range' (currently defined as the Proximity Distance +15%) 2. TMJ performs the Proximity Calculations every time it receives a new location update from the GPS device (which can be 5x a second with some of the latest GPS units). With a lot of waypoints this can result in LOTS of calculations, so it examines the waypoints in batches, only looking at 1/10th of them at a time. This can then mean that if the few nearest waypoints are in different batches they might each get selected in quick succession, and then due to (1) they won't get selected again for a while... .... brain ticking .... Mmmm, its funny, now that I've had to properly think about this in writing it down, I'm coming to the conclusion that the algorithm is indeed rather unreliable!! In my own testing (generally replaying old tracks in the simulator, or testing on the train, where its safe to look at the phone!) it does work okay, probably since my waypoints are generally quite far apart, and the track is fairly smooth, but I can definitely see situations where it wouldn't cope so well, particularly if the waypoints are close together (compared to the proximity distance). I definitely need to look into it further. Might take a break now though, its been a long week!! Cheers, Stephen | |
shchenka 20:37 | A break is always a good idea :) For the record: indeed I've had the proximity threshold set to 3000 meters today (not that it made very much sense in this case I've just forgotten to reset it), while the waypoints were only several hundred meters away. And I certainly did not walk in a straight line, on the contrary, made circles etc. Have a great weekend, --sh | |
(You must be logged in to post a reply to this thread)