Subversion Repositories NaviCtrl

Rev

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

Rev 533 Rev 540
Line 353... Line 353...
353
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
353
                                ToFlightCtrl.Param.Byte[5] = (s8) ToFC_Rotate_C;
354
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
354
                                ToFlightCtrl.Param.Byte[6] = (s8) ToFC_Rotate_S;
355
                                ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator;
355
                                ToFlightCtrl.Param.Byte[7] = GPS_Aid_StickMultiplikator;
356
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
356
                                if(CAM_Orientation.UpdateMask & CAM_UPDATE_AZIMUTH)
357
                                {
357
                                {
358
                                        if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + 720 - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10)) % 360;  // the FC uses the uncorrected comnpass value
358
                                        if(CAM_Orientation.Azimuth != -1) ToFlightCtrl.Param.sInt[4] = (CAM_Orientation.Azimuth + (3*360) - (FC.FromFC_CompassOffset / 10 + GeoMagDec/10 + Parameter.OrientationAngle * 15)) % 360;  // the FC uses the uncorrected comnpass value
359
                                        else CAM_Orientation.Azimuth = -1;
359
                                        else CAM_Orientation.Azimuth = -1;
360
                                        CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
360
                                        CAM_Orientation.UpdateMask &= ~CAM_UPDATE_AZIMUTH;
361
                                }
361
                                }
362
                                else
362
                                else
363
                                {
363
                                {