Subversion Repositories NaviCtrl

Rev

Rev 695 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 695 Rev 737
Line 815... Line 815...
815
 
815
 
816
        // clear current point list
816
        // clear current point list
817
        PointList_Clear();
817
        PointList_Clear();
Line 818... Line 818...
818
        // prepare WP at current position
818
        // prepare WP at current position
819
 
819
 
820
        if(NCFlags & NC_FLAG_FREE || NaviData.TargetPositionDeviation.Distance > 7*10)
820
        if(NCFlags & NC_FLAG_FREE || NaviData.TargetPositionDeviation.Distance_dm > 7*10)
821
        {  // take actual position
821
        {  // take actual position
822
                GPSPos_Copy(&GPSData.Position, &(WP.Position));
822
                GPSPos_Copy(&GPSData.Position, &(WP.Position));
823
        }
823
        }
Line 919... Line 919...
919
                        // restore former altitude 
919
                        // restore former altitude 
920
                        PointList[i].Position.Altitude = altitude;
920
                        PointList[i].Position.Altitude = altitude;
921
                        // move new reference according to the deviation of the old reference
921
                        // move new reference according to the deviation of the old reference
922
                        if(RotationAngle > 0)
922
                        if(RotationAngle > 0)
923
                        {
923
                        {
924
                                retval = GPSPos_ShiftGeodetic(&(PointList[i].Position), (RefDeviation.Bearing + 180 + RotationAngle)%360, RefDeviation.Distance );
924
                                retval = GPSPos_ShiftGeodetic(&(PointList[i].Position), (RefDeviation.Bearing + 180 + RotationAngle)%360, RefDeviation.Distance_cm );
925
                                // Now rotate the heading positions if they are fixed angles
925
                                // Now rotate the heading positions if they are fixed angles
926
                                if(PointList[i].Heading >= 0 && PointList[i].Heading <= 360) PointList[i].Heading = (PointList[i].Heading + RotationAngle) % 360;
926
                                if(PointList[i].Heading >= 0 && PointList[i].Heading <= 360) PointList[i].Heading = (PointList[i].Heading + RotationAngle) % 360;
927
                        }
927
                        }
928
                        else // no rotation
928
                        else // no rotation
929
                        {
929
                        {