![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
You can cut that further by knowing the region of interest in the data so that the binary search starts inside the absolute boundaries of the list.
For the sake of argument, take the position of the first point found (search the whole database) & then use that index +&-10% of the size of the database as the limits for the next search. Remember, with GPS data at 1 second intervals there are going to be no nasty surprises jumping from one end of the database to the other. Fewer data points to search == quicker. |
|
|||
|
hi agraham, LineCutter,
@ agraham, did the binair search, and it was a big improvement, only 200 mSec maximum in 11 jumps, In place of 13 Seconds. Now I go try Your code, like you say, it seams that I lost much time going trough approch distance calculations every comparasion. Thanks very much... Tested your code, great improvement, for 1500 point it speedup from 31 msec to 15 mSec... @ LineCutter, After code improvement, I see that your suggestion simply is a must, without going that way it is not possible to get result, so making regions at start with less waypoints to check, I understand, I will be busy for a while now.... Seams you are well now with the problem... and thank you also for pulling me in the right direction.. After reading carfully, I see I misunderstud : I understand now, I have to change the startpoint to search from in the waypointlist from 8 to 10 % around the actual position point every fetch of the new position... so I must only compare a few points in the enviremont. Put claude Belgium Last edited by Put Claude : 10-10-2007 at 12:08 PM. Reason: forgot something |
|
||||
|
Quote:
That way you won't miss nearby waypoints in a small database. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Forum search | token | Forum Discussion | 0 | 07-16-2008 08:33 PM |
| Copy Record from one database to another database. | mozaharul | Questions & Help Needed | 0 | 07-15-2008 05:47 AM |
| FASTEST way to make a RND number list, no doubles | Stellaferox | Questions & Help Needed | 8 | 02-06-2008 01:16 PM |
| Fastest way to get pixel colour value? | DavidN | Questions & Help Needed | 6 | 09-02-2007 07:40 AM |
| How to convert an Access database to a sqlite database | Peter | Code Samples & Tips | 5 | 07-24-2007 04:20 PM |