Skip to content

Commit

Permalink
docs for 3D View is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
omid-esrafilian authored and DonLakeFlyer committed Feb 26, 2024
1 parent ec917ea commit 871875b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Binary file added docs/assets/viewer_3d/enable_3d_view.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/viewer_3d/icon_3d_view.jpg
Binary file not shown.
Binary file modified docs/assets/viewer_3d/viewer_3d_overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/viewer_3d/viewer_3d_setting_window.jpg
Binary file not shown.
21 changes: 11 additions & 10 deletions docs/en/qgc-user-guide/viewer_3d/viewer_3d.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ You can use it to:
# UI Overview
The screenshot above shows the main elements of the 3D View.

To open the 3D View, when you are in the [Fly View](../fly_view/fly_view.md), from the toolbar on the left, select the 3D View icon as shown below:
<font color="red">**Enabling the 3D View:** </font>The 3D View is disabled by default. To enable it, go to **Application Settings** ->**Fly View** tab, and under the **3D View** settings group, toggle the **Enabled** switch as shown below:

![3D View](../../../assets/viewer_3d/enable_3d_view.jpg)

To open the 3D View, when you are in the [Fly View](../fly_view/fly_view.md), from the toolbar on the left, select the 3D View icon as illustrated below:

![3D View](../../../assets/viewer_3d/open_3d_viewer.jpg)

Expand All @@ -33,17 +37,14 @@ Once the 3D View is opened, you can navigate through the 3D environment by using
- **To rotate**: Use two fingers, then tap and move your fingers while keeping them together.
- **To zoom**: Use a pinch with two fingers and move them together or apart to zoom in or out.

To visualize the 3D map of a particular area in the 3D viewer, you have to download the .osm file of that area from the [OpenStreetMap](https://www.openstreetmap.org/#map=16/47.3964/8.5498) website and then import it through the Setting menu. More details on the Setting menu can be found in the next section.
# Setting icon ![Setting icons](../../../assets/viewer_3d/icon_3d_view.jpg)
This icon will open a pop-up window for setting up the 3D View as shown below:
To visualize the 3D map of a particular area in the 3D viewer, you have to download the .osm file of that area from the [OpenStreetMap](https://www.openstreetmap.org/#map=16/47.3964/8.5498) website and then import it through the **3D View** settings. More details on the **3D View** settings can be found in the next section.
# Settings
You can change the settings of the 3D View from **Application Settings** ->**Fly View** tab under the **3D View** settings group.
The following properties can be modified in the 3D View settings group:

![Setting Window](../../../assets/viewer_3d/viewer_3d_setting_window.jpg)

The following properties can be modified in the setting window:
- **3D Map File**: The path to the .osm file of a region of interest to be visualized in the QGC. The .osm file can be uploaded by clicking on the "Select File" button.
- **Enabled**: To enable or disable the 3D View.
- **3D Map File**: The path to the .osm file of a region of interest to be visualized in the QGC. The .osm file can be uploaded by clicking on the **Select File** button. To clear the 3D View from the previously loaded .osm file, you can click on the **Clear** button.
- **Average Building Level Height**: This parameter determines the height of each storey of the buildings, as in .osm file sometimes the height of the buildings is specified in terms of the level/storey.
- **Vehicle Altitude Bias**: This refers to the bias in the altitude of vehicles and their missions with respect to the ground level. It is helpful in cases where the estimated altitude of the vehicle by its flight control is biased, as the relative altitude is currently used in the 3D View.

To apply the changes you have to press the "OK" button, otherwise, the changes will be discarded.


6 changes: 3 additions & 3 deletions src/FlightDisplay/FlyViewToolStripActionList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ ToolStripActionList {
iconSource: "/qmlimages/Plan.svg"
onTriggered:{
mainWindow.showPlanView()
mapIcon.showFlyMap()
view3DIcon.showFlyMap()
}
},
ToolStripAction {
property bool _is3DViewOpen: viewer3DWindow.isOpen

id: mapIcon
id: view3DIcon
visible: _viewer3DEnabled
text: qsTr("3D View")
iconSource: "/qmlimages/Viewer3D/City3DMapIcon.svg"
Expand All @@ -44,7 +44,7 @@ ToolStripActionList {

on_Is3DViewOpenChanged: {
if(_is3DViewOpen === true){
mapIcon.iconSource = "/qmlimages/PaperPlane.svg"
view3DIcon.iconSource = "/qmlimages/PaperPlane.svg"
text= qsTr("Fly")
}else{
viewer3DWindow.close()
Expand Down
3 changes: 1 addition & 2 deletions src/Viewer3D/Viewer3DQmlBackend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ void Viewer3DQmlBackend::_gpsRefChangedEvent(QGeoCoordinate newGpsRef, bool isRe
_gpsRef = newGpsRef;
_gpsRefSet = GPS_REF_SET_BY_MAP;
emit gpsRefChanged();
qDebug() << "3D viewer gps reference set by osm map:" << _gpsRef.latitude() << _gpsRef.longitude() << _gpsRef.altitude();
}else{
_gpsRefSet = GPS_REF_NOT_SET;
}

qDebug() << "3D viewer gps reference set by osm map:" << _gpsRef.latitude() << _gpsRef.longitude() << _gpsRef.altitude();
}

0 comments on commit 871875b

Please sign in to comment.