kopia lustrzana https://github.com/cyoung/stratux
Merge pull request #720 from westphae/gyro-heading-fix
Fix gdl90 AHRSGyroHeading reporting.6_new_products
commit
8eeb20a9df
|
@ -1939,10 +1939,8 @@ func makeAHRSGDL90Report() {
|
|||
if !isAHRSInvalidValue(mySituation.AHRSRoll) {
|
||||
roll = roundToInt16(mySituation.AHRSRoll * 10)
|
||||
}
|
||||
if isAHRSInvalidValue(mySituation.AHRSGyroHeading) {
|
||||
hdg = roundToInt16(mySituation.AHRSGyroHeading * 10) // TODO westphae: switch to AHRSMagHeading?
|
||||
} else {
|
||||
hdg = roundToInt16(float64(mySituation.GPSTrueCourse))
|
||||
if !isAHRSInvalidValue(mySituation.AHRSGyroHeading) {
|
||||
hdg = roundToInt16(mySituation.AHRSGyroHeading * 10)
|
||||
}
|
||||
if !isAHRSInvalidValue(mySituation.AHRSSlipSkid) {
|
||||
slip_skid = roundToInt16(-mySituation.AHRSSlipSkid * 10)
|
||||
|
|
|
@ -277,7 +277,10 @@ func sensorAttitudeSender() {
|
|||
roll, pitch, heading = s.RollPitchHeading()
|
||||
mySituation.AHRSRoll = roll / ahrs.Deg
|
||||
mySituation.AHRSPitch = pitch / ahrs.Deg
|
||||
mySituation.AHRSGyroHeading = heading / ahrs.Deg
|
||||
mySituation.AHRSGyroHeading = heading
|
||||
if !isAHRSInvalidValue(heading) {
|
||||
mySituation.AHRSGyroHeading /= ahrs.Deg
|
||||
}
|
||||
|
||||
//TODO westphae: until magnetometer calibration is performed, no mag heading
|
||||
mySituation.AHRSMagHeading = ahrs.Invalid
|
||||
|
|
Ładowanie…
Reference in New Issue