| 1 |
<para>The bend filter modifies each route replacing each point inside a |
| 2 |
curve with two points: one at a given distance in the direction of the |
| 3 |
previous point, and another at the same distance in the direction of |
| 4 |
the next point in the route. It only replaces points where there is a |
| 5 |
change in heading big enough.</para> |
| 6 |
|
| 7 |
<para>When creating a route, points are usually created inside curves or |
| 8 |
intersections. That means that, while navigating that route using a |
| 9 |
GPS unit, the course pointer would aim to the inside of that curve or |
| 10 |
intersection, and only when you have passed that point will the GPS |
| 11 |
aim to the next waypoint in the route. This behavior is useful in |
| 12 |
marine navigation but when biking, for instance, it may be a bit late |
| 13 |
to decide where to turn to in an intersection.</para> |
| 14 |
|
| 15 |
<para>This filter tries to solve that creating a waypoint before and after |
| 16 |
where there is a change in direction.That way, the course pointer will |
| 17 |
point to the direction you should turn to ahead in time.</para> |
| 18 |
|
| 19 |
<para>For this filter to work correctly, the route should be simple enough |
| 20 |
that there is only one waypoint inside each curve or intersection. |
| 21 |
Because of that, it is usually a good idea to use the simplify filter |
| 22 |
before this one.</para> |
| 23 |
|
| 24 |
<para>This command line reads route.gpx and replaces each point with other two |
| 25 |
points: one 25 meters before and another 25 meters after the original |
| 26 |
point. It replaces a point only if there is a change of direction |
| 27 |
larger than 5 degrees.</para> |
| 28 |
|
| 29 |
<para><userinput>gpsbabel -i gpx -f route.gpx -x |
| 30 |
bend,distance=25,interpolate,minangle=5 -o gpx -F newroute.gpx |
| 31 |
</userinput></para> |