What concerns me about the algorithm you've described is that it is 'greedy' and could choose the 'wrong' track segment (or, at least, a track segment that is not the closest to the point) Time to push ASCII art to the limits. Consider the following path (numbers represent the sequence in the list of track points), and the coordinate X (and, later, Y) 1-------------2 | | Y X | 5-----+-----6 | | | | 4-----3 How are we supposed to interpret your description? Calculate the distance from the first track point to the new coordinates and the distance for the interval for the first two track points.
If the distance to the measured coordinates is shorter than the distance from the first to the second track point, assume that this point lies in between this interval; ... if it's bigger, ... check with the next interval I think the first sentence means: Calculate the distance from TP1 (track point 1) to TP2 - call it D12 Calculate the distance from TP1 to X (call it D1X) and from TP2 to X (call it D2X) The tricky part is the interpretation of the conditional sentence My impression is that if either D1X or D2X is less than D12, then X will be assumed to be on (or closest too) the track segment TP1 to TP2 (call it segment S12) Looking at the position of X in the diagram, it is moderately clear that both D1X and D2X are smaller than D12, so my interpretation of your algorithm would interpret X as being associated with S12, yet X is clearly closer to S23 or S56 than it is to S12 (but those are discarded without even being considered) Have I misunderstood something about your algorithm? Thinking about it a bit: what I've interpreted your algorithm to mean is that if the point X lies within either the circle of radius D12 centred at TP1 or the circle of radius D12 centred at TP2, then you associate X with S12. However, if we also consider point Y, the algorithm I suggest you are using would also associate it with S12 If the algorithm is refined to say MAX(D1Y, D2Y) However, X is probably still considered to be related to S12 rather than S23 or S56.
What concerns me about the algorithm you've described is that it is 'greedy' and could choose the 'wrong' track segment (or, at least, a track segment that is not the closest to the point). Time to push ASCII art to the limits. Consider the following path (numbers represent the sequence in the list of track points), and the coordinate X (and, later, Y).1-------------2 | | Y X | 5-----+-----6 | | | | 4-----3 How are we supposed to interpret your description?
Calculate the distance from the first track point to the new coordinates and the distance for the interval for the first two track points. If the distance to the measured coordinates is shorter than the distance from the first to the second track point, assume that this point lies in between this interval; ... if it's bigger, ... check with the next interval. I think the first sentence means: Calculate the distance from TP1 (track point 1) to TP2 - call it D12.
Calculate the distance from TP1 to X (call it D1X) and from TP2 to X (call it D2X). The tricky part is the interpretation of the conditional sentence. My impression is that if either D1X or D2X is less than D12, then X will be assumed to be on (or closest too) the track segment TP1 to TP2 (call it segment S12).
Looking at the position of X in the diagram, it is moderately clear that both D1X and D2X are smaller than D12, so my interpretation of your algorithm would interpret X as being associated with S12, yet X is clearly closer to S23 or S56 than it is to S12 (but those are discarded without even being considered). Have I misunderstood something about your algorithm? Thinking about it a bit: what I've interpreted your algorithm to mean is that if the point X lies within either the circle of radius D12 centred at TP1 or the circle of radius D12 centred at TP2, then you associate X with S12.
However, if we also consider point Y, the algorithm I suggest you are using would also associate it with S12. If the algorithm is refined to say MAX(D1Y, D2Y).
Jonathan pointed out what the algorithm is going to have trouble with. Read my edit for further suggestions from my side. If anyone can come up with a improved version or another approach, you're welcome to post it.
Thank you so far! – rdoubleui Aug 24 '09 at 13:04.
The first part of this algorithm reminds me of moving through a discretised space. An example of representing such a space is the Z-order space-filling curve. I've used this technique to represent a quadtree, the data structure for an adaptive mesh refinement code I once worked on, and used an algorithm very like the one you describe to traverse the grid and determine distances between particles.
The similarity may not be immediately obvious. Since you are only concerned about interval locations, you are effectively treating all points on the interval as equivalent in this step. This is the same as choosing a space which only has discretised points - you're effectively 'snapping' your points to a grid.
Just to clarify: The algorith doesn't snap them to the points. The track points know their absolute distance from the start. It uses the distances to interpolate the distance at the measured point and puts it away in a other data structure (time based).
The time base of a second allows easier interpolation (linear again) for possible left out measurements (as it polls a tracking device). – rdoubleui Aug 23 '09 at 11:26 @rdoubleui: Yes, you're right. My comments only apply to the first part of your algorithm (interval matching) before the interpolation step.
– ire_and_curses Aug 23 '09 at 12:33.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.