142,7 → 142,8 |
SPI_Version_t FC_Version; |
s16 POI_KameraNick = 0; |
u8 NC_Wait_for_LED = 0; |
s16 GyroCompassCorrected = 0; // corrected with the magnetic declination |
s16 GyroCompassCorrected = 0; //in 0,1° corrected with the magnetic declination |
s16 OrientationGyroCompassCorrected = 0; //in 0,1° corrected with the FC-Orientation |
s16 CompassSetpointCorrected = 0; // The compass setpoint that the FC tries to keep - corrected with the magnetic declination |
s16 CompassSetpoint = 0; // in 0,1° |
s16 SimulatedDirection = 0; // only for flight simulation |
395,6 → 396,7 |
ToFlightCtrl.CompassHeading = Compass_Heading; |
DebugOut.Analog[10] = ToFlightCtrl.CompassHeading; |
GyroCompassCorrected = (3600 + FromFlightCtrl.GyroHeading + FC.FromFC_CompassOffset + GeoMagDec) % 3600; |
OrientationGyroCompassCorrected = ((3600 + GyroCompassCorrected + Parameter.OrientationAngle * 150) % 3600); |
if(ToFlightCtrl.CompassHeading >= 0) ToFlightCtrl.CompassHeading = (360 + ToFlightCtrl.CompassHeading + FromFlightCtrl.GyroYaw / 12) % 360; |
// ToFlightCtrl.MagVecX = MagVector.X; |
// ToFlightCtrl.MagVecY = MagVector.Y; |
625,7 → 627,7 |
ToFlightCtrl.Param.Byte[0] = 3+3; // index +3, weil bei HoTT V4 3 Bytes eingeschoben wurden |
ToFlightCtrl.Param.Byte[1] = 9-1; // how many |
//----------------------------- |
ToFlightCtrl.Param.Byte[2] = GyroCompassCorrected / 20;//NaviData.HomePositionDeviation.Bearing / 2; |
ToFlightCtrl.Param.Byte[2] = OrientationGyroCompassCorrected / 20;//NaviData.HomePositionDeviation.Bearing / 2; |
i1 = GPSData.Speed_Ground; // in cm/sec |
i1 *= 36; |
i1 /= 1000; |