Skip to content

Commit

Permalink
Slip/skid indicates correctly in UDP; limit UI slip/skid to 10 deg max.
Browse files Browse the repository at this point in the history
  • Loading branch information
westphae committed Apr 2, 2017
1 parent ac6da35 commit 23df9c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main/gps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions web/plates/js/ahrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 23df9c9

Please sign in to comment.