Browse Source

Merge pull request #4707 from DonLakeFlyer/FWLandingFixes

FixedWing Landing Pattern fixes
QGC4.4
Don Gagne 8 years ago committed by GitHub
parent
commit
45cb473c10
  1. 1
      src/MissionEditor/FWLandingPatternMapVisual.qml
  2. 7
      src/MissionManager/FixedWingLandingComplexItem.cc
  3. 5
      src/QmlControls/ToolStrip.qml

1
src/MissionEditor/FWLandingPatternMapVisual.qml

@ -92,7 +92,6 @@ Item { @@ -92,7 +92,6 @@ Item {
function calcPointTangentToCircleWithCenter() {
if (_missionItem.landingCoordSet) {
console.log("recalc")
var radius = _missionItem.loiterRadius.value
var loiterPointPixels = map.fromCoordinate(_missionItem.loiterCoordinate, false /* clipToViewport */)
var landPointPixels = map.fromCoordinate(_missionItem.landingCoordinate, false /* clipToViewport */)

7
src/MissionManager/FixedWingLandingComplexItem.cc

@ -227,10 +227,15 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void) @@ -227,10 +227,15 @@ void FixedWingLandingComplexItem::_recalcLoiterCoordFromFacts(void)
convertGeoToNed(_landingCoordinate, tangentOrigin, &north, &east, &down);
// Heading is from loiter to land, so we need to rotate angle 180 degrees and go the opposite direction
double heading = _landingHeadingFact.rawValue().toDouble();
heading += 180.0;
heading *= -1.0;
QPointF originPoint(east, north);
north += _loiterToLandDistanceFact.rawValue().toDouble();
QPointF loiterPoint(east, north);
QPointF rotatedLoiterPoint = _rotatePoint(loiterPoint, originPoint, _landingHeadingFact.rawValue().toDouble());
QPointF rotatedLoiterPoint = _rotatePoint(loiterPoint, originPoint, heading);
convertNedToGeo(rotatedLoiterPoint.y(), rotatedLoiterPoint.x(), down, tangentOrigin, &_loiterCoordinate);

5
src/QmlControls/ToolStrip.qml

@ -79,8 +79,8 @@ Rectangle { @@ -79,8 +79,8 @@ Rectangle {
dropButtonsExclusiveGroup.current = null
// Signal all toggles as off
for (var i=0; i<model.length; i++) {
if (model[i].toggleButton === true) {
clicked(index, false)
if (model[i].toggle === true) {
_root.clicked(i, false)
}
}
}
@ -198,6 +198,7 @@ Rectangle { @@ -198,6 +198,7 @@ Rectangle {
dropPanel.hide() // hide affects checked, so this needs to be duplicated inside not outside if
} else {
dropPanel.hide() // hide affects checked, so this needs to be duplicated inside not outside if
uncheckAll()
checked = true
var panelEdgeTopPoint = mapToItem(_root, width, 0)
dropPanel.show(panelEdgeTopPoint, height, modelData.dropPanelComponent)

Loading…
Cancel
Save