- if ( index == 0 ) {
- dist = 0;
- } else {
- const SGWayPoint& prev = route[ index - 1 ];
- curr.CourseAndDistance( prev, &course, &dist );
- }
+ if ( index == 0 ) {
+ dist = 0;
+ course = 0.0;
+ } else {
+ const SGWayPoint& prev = route[index - 1];
+ curr.CourseAndDistance( prev, &course, &dist );
+ }