Subversion Repositories NaviCtrl

Rev

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

Rev 130 Rev 131
Line 496... Line 496...
496
                                                                // GPS Coordinates are in 1-E7 deg, i.e. 1 counts is 1E-7°/360°*40E+8cm = 1.11 cm
496
                                                                // GPS Coordinates are in 1-E7 deg, i.e. 1 counts is 1E-7°/360°*40E+8cm = 1.11 cm
497
                                                                // normal manual activtion threshold is 8 counts that results in a change of the hold position
497
                                                                // normal manual activtion threshold is 8 counts that results in a change of the hold position
498
                                                                // of min 8*1.11cm * 5Hz = 8.88 = 44.4cm/s an max 127*1.11cm *5Hz = 705cm/s
498
                                                                // of min 8*1.11cm * 5Hz = 8.88 = 44.4cm/s an max 127*1.11cm *5Hz = 705cm/s
499
                                                                GPS_HoldPosition.Latitude +=  (s32)(cos_h*FC.StickNick + sin_h*FC.StickRoll);
499
                                                                GPS_HoldPosition.Latitude +=  (s32)(cos_h*FC.StickNick + sin_h*FC.StickRoll);
500
                                                                GPS_HoldPosition.Longitude +=  (s32)((sin_h*FC.StickNick - cos_h*FC.StickRoll) / cos(RadiansFromGPS(GPS_HoldPosition.Latitude)) );
500
                                                                GPS_HoldPosition.Longitude +=  (s32)((sin_h*FC.StickNick - cos_h*FC.StickRoll) / cos(RadiansFromGPS(GPS_HoldPosition.Latitude)) );
501
                                                                GPS_HoldPosition.Status = NEWDATA;
-
 
502
                                                        }
501
                                                        }
503
                                                        GPS_pTargetPosition = &GPS_HoldPosition;
502
                                                        GPS_pTargetPosition = &GPS_HoldPosition;
504
                                                        GPS_TargetRadius = 100; // 1 meter
503
                                                        GPS_TargetRadius = 100; // 1 meter
505
                                                }
504
                                                }
506
                                                break;
505
                                                break;