diff --git a/src/PlanView/CameraCalc.qml b/src/PlanView/CameraCalc.qml index 95c531f..14b626e 100644 --- a/src/PlanView/CameraCalc.qml +++ b/src/PlanView/CameraCalc.qml @@ -15,8 +15,9 @@ Column { spacing: _margin property var cameraCalc - property bool vehicleFlightIsFrontal: true + property bool vehicleFlightIsFrontal: true property string distanceToSurfaceLabel + property int distanceToSurfaceAltitudeMode: QGroundControl.AltitudeModeNone property string frontalDistanceLabel property string sideDistanceLabel @@ -226,8 +227,9 @@ Column { onClicked: cameraCalc.valueSetIsDistance.value = 1 } - FactTextField { + AltitudeFactTextField { fact: cameraCalc.distanceToSurface + altitudeMode: distanceToSurfaceAltitudeMode enabled: fixedDistanceRadio.checked Layout.fillWidth: true } @@ -285,8 +287,9 @@ Column { visible: cameraCalc.isManualCamera QGCLabel { text: distanceToSurfaceLabel } - FactTextField { + AltitudeFactTextField { fact: cameraCalc.distanceToSurface + altitudeMode: distanceToSurfaceAltitudeMode Layout.fillWidth: true } diff --git a/src/PlanView/CorridorScanEditor.qml b/src/PlanView/CorridorScanEditor.qml index ab42e20..6c833a2 100644 --- a/src/PlanView/CorridorScanEditor.qml +++ b/src/PlanView/CorridorScanEditor.qml @@ -67,11 +67,12 @@ Rectangle { CameraCalc { - cameraCalc: missionItem.cameraCalc - vehicleFlightIsFrontal: true - distanceToSurfaceLabel: qsTr("Altitude") - frontalDistanceLabel: qsTr("Trigger Distance") - sideDistanceLabel: qsTr("Spacing") + cameraCalc: missionItem.cameraCalc + vehicleFlightIsFrontal: true + distanceToSurfaceLabel: qsTr("Altitude") + distanceToSurfaceAltitudeMode: missionItem.followTerrain ? QGroundControl.AltitudeModeAboveTerrain : QGroundControl.AltitudeModeRelative + frontalDistanceLabel: qsTr("Trigger Dist") + sideDistanceLabel: qsTr("Spacing") } SectionHeader { diff --git a/src/PlanView/StructureScanEditor.qml b/src/PlanView/StructureScanEditor.qml index 380ef8f..ea8d454 100644 --- a/src/PlanView/StructureScanEditor.qml +++ b/src/PlanView/StructureScanEditor.qml @@ -75,11 +75,12 @@ Rectangle { } CameraCalc { - cameraCalc: missionItem.cameraCalc - vehicleFlightIsFrontal: false - distanceToSurfaceLabel: qsTr("Scan Distance") - frontalDistanceLabel: qsTr("Layer Height") - sideDistanceLabel: qsTr("Trigger Distance") + cameraCalc: missionItem.cameraCalc + vehicleFlightIsFrontal: false + distanceToSurfaceLabel: qsTr("Scan Distance") + distanceToSurfaceAltitudeMode: QGroundControl.AltitudeModeNone + frontalDistanceLabel: qsTr("Layer Height") + sideDistanceLabel: qsTr("Trigger Distance") } SectionHeader { @@ -117,14 +118,16 @@ Rectangle { } QGCLabel { text: qsTr("Scan Bottom Alt") } - FactTextField { + AltitudeFactTextField { fact: missionItem.scanBottomAlt + altitudeMode: QGroundControl.AltitudeModeRelative Layout.fillWidth: true } QGCLabel { text: qsTr("Entrance/Exit Alt") } - FactTextField { + AltitudeFactTextField { fact: missionItem.entranceAlt + altitudeMode: QGroundControl.AltitudeModeRelative Layout.fillWidth: true } diff --git a/src/PlanView/SurveyItemEditor.qml b/src/PlanView/SurveyItemEditor.qml index 183dc25..2b183a7 100644 --- a/src/PlanView/SurveyItemEditor.qml +++ b/src/PlanView/SurveyItemEditor.qml @@ -67,11 +67,12 @@ Rectangle { } CameraCalc { - cameraCalc: missionItem.cameraCalc - vehicleFlightIsFrontal: true - distanceToSurfaceLabel: qsTr("Altitude") - frontalDistanceLabel: qsTr("Trigger Distance") - sideDistanceLabel: qsTr("Spacing") + cameraCalc: missionItem.cameraCalc + vehicleFlightIsFrontal: true + distanceToSurfaceLabel: qsTr("Altitude") + distanceToSurfaceAltitudeMode: missionItem.followTerrain ? QGroundControl.AltitudeModeAboveTerrain : QGroundControl.AltitudeModeRelative + frontalDistanceLabel: qsTr("Trigger Dist") + sideDistanceLabel: qsTr("Spacing") } SectionHeader {