Browse Source

Merge pull request #8209 from DonLakeFlyer/FollowXYCalc

Fix Follow X/Y calc from distance/angle
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
de430cfc26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/AutoPilotPlugins/APM/APMFollowComponent.qml

4
src/AutoPilotPlugins/APM/APMFollowComponent.qml

@ -112,10 +112,10 @@ SetupPage { @@ -112,10 +112,10 @@ SetupPage {
} else {
_followOffsetX.rawValue = Math.sin(angleRadians) * distance
_followOffsetY.rawValue = Math.cos(angleRadians) * distance
if (_followOffsetX.rawValue < 0.0001) {
if (Math.abs(_followOffsetX.rawValue) < 0.0001) {
_followOffsetX.rawValue = 0
}
if (_followOffsetY.rawValue < 0.0001) {
if (Math.abs(_followOffsetY.rawValue) < 0.0001) {
_followOffsetY.rawValue = 0
}
}

Loading…
Cancel
Save