Slip/skid indicates correctly in UDP; limit UI slip/skid to 10 deg max.

pull/592/head ahrs0.5
Eric Westphal 2017-04-02 10:26:23 -04:00
rodzic ac6da35e3b
commit 23df9c9c2e
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -1820,7 +1820,7 @@ func makeAHRSGDL90Report() {
pitch = roundToInt16(mySituation.AHRSPitch * 10)
roll = roundToInt16(mySituation.AHRSRoll * 10)
hdg = roundToInt16(mySituation.AHRSGyroHeading * 10) // TODO westphae: switch to AHRSMagHeading?
slip_skid = roundToInt16(mySituation.AHRSSlipSkid * 10)
slip_skid = roundToInt16(-mySituation.AHRSSlipSkid * 10)
yaw_rate = roundToInt16(mySituation.AHRSTurnRate * 10)
g = roundToInt16(mySituation.AHRSGLoad * 10)
}

Wyświetl plik

@ -113,6 +113,11 @@ AHRSRenderer.prototype = {
this.roll = roll;
this.heading = heading;
this.slipSkid = slipSkid;
if (this.slipSkid < -10) {
this.slipSkid = -10;
} else if (this.slipSkid > 10) {
this.slipSkid = +10;
}
this.pitchClip.translate(0, -10 * this.pitch);
this.rollClip.rotate(this.roll, 0, 0);