Merge pull request #720 from westphae/gyro-heading-fix

Fix gdl90 AHRSGyroHeading reporting.
6_new_products
cyoung 2018-05-29 18:53:36 -04:00 zatwierdzone przez GitHub
commit 8eeb20a9df
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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