kopia lustrzana https://github.com/cyoung/stratux
Merge branch 'invalid' into eric
commit
d84a3a0199
25
main/gps.go
25
main/gps.go
|
@ -1894,12 +1894,25 @@ func makeAHRSGDL90Report() {
|
||||||
palt := uint16(0xFFFF)
|
palt := uint16(0xFFFF)
|
||||||
vs := int16(0x7FFF)
|
vs := int16(0x7FFF)
|
||||||
if isAHRSValid() {
|
if isAHRSValid() {
|
||||||
pitch = roundToInt16(mySituation.AHRSPitch * 10)
|
// AHRS code uses 36727/10 for an invalid value.
|
||||||
roll = roundToInt16(mySituation.AHRSRoll * 10)
|
if mySituation.AHRSPitch < 360 {
|
||||||
hdg = roundToInt16(mySituation.AHRSGyroHeading * 10) // TODO westphae: switch to AHRSMagHeading?
|
pitch = roundToInt16(mySituation.AHRSPitch * 10)
|
||||||
slip_skid = roundToInt16(-mySituation.AHRSSlipSkid * 10)
|
}
|
||||||
yaw_rate = roundToInt16(mySituation.AHRSTurnRate * 10)
|
if mySituation.AHRSRoll < 360 {
|
||||||
g = roundToInt16(mySituation.AHRSGLoad * 10)
|
roll = roundToInt16(mySituation.AHRSRoll * 10)
|
||||||
|
}
|
||||||
|
if mySituation.AHRSGyroHeading < 360 {
|
||||||
|
hdg = roundToInt16(mySituation.AHRSGyroHeading * 10) // TODO westphae: switch to AHRSMagHeading?
|
||||||
|
}
|
||||||
|
if mySituation.AHRSSlipSkid < 360 {
|
||||||
|
slip_skid = roundToInt16(-mySituation.AHRSSlipSkid * 10)
|
||||||
|
}
|
||||||
|
if mySituation.AHRSTurnRate < 360 {
|
||||||
|
yaw_rate = roundToInt16(mySituation.AHRSTurnRate * 10)
|
||||||
|
}
|
||||||
|
if mySituation.AHRSTurnRate < 360 {
|
||||||
|
g = roundToInt16(mySituation.AHRSGLoad * 10)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if isTempPressValid() {
|
if isTempPressValid() {
|
||||||
palt = uint16(mySituation.BaroPressureAltitude + 5000.5)
|
palt = uint16(mySituation.BaroPressureAltitude + 5000.5)
|
||||||
|
|
Ładowanie…
Reference in New Issue