kopia lustrzana https://github.com/cyoung/stratux
More robust initialization of baro ewma for ROC calc.
rodzic
3d0ce092ab
commit
043f334dc2
|
@ -117,7 +117,7 @@ func tempAndPressureSender() {
|
|||
mySituation.Temp = temp
|
||||
altitude = CalcAltitude(press)
|
||||
mySituation.Pressure_alt = altitude
|
||||
if altLast == -9999 {
|
||||
if altLast < -2000 {
|
||||
altLast = altitude // Initialize
|
||||
}
|
||||
// Assuming timer is reasonably accurate, use a regular ewma
|
||||
|
@ -278,7 +278,7 @@ func sensorAttitudeSender() {
|
|||
}
|
||||
}
|
||||
|
||||
// If we have valid AHRS info, then send
|
||||
// If we have valid AHRS info, then update mySituation
|
||||
if s.Valid() {
|
||||
mySituation.mu_Attitude.Lock()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue