Skip to content

Commit

Permalink
Merge pull request #430 from pro3d-space/features/gisView-trajectories
Browse files Browse the repository at this point in the history
GIS View
  • Loading branch information
haraldsteinlechner authored Oct 21, 2024
2 parents 5c53589 + 9fe0bb9 commit 79e1fc0
Show file tree
Hide file tree
Showing 167 changed files with 112,893 additions and 114,098 deletions.
31 changes: 2 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,6 @@ src\Aardvark.OpcViewer.psess
/src/PRo3D.DomainModel/bin/Release
/src/PRo3D.Base/bin/Release
/.paket/Paket.Restore.targets
/src/Aardvark.Opc.Viewer/bin/Debug/Aardvark.Opc.Viewer.XML
/src/Aardvark.Opc.Viewer/bin/Debug/Aardvark.Opc.Viewer.exe
/src/Aardvark.Opc.Viewer/bin/Debug/Aardvark.Opc.Viewer.exe.config
/src/Aardvark.Opc.Viewer/bin/Debug/Aardvark.Opc.Viewer.pdb
/src/Aardvark.Opc.Viewer/bin/Debug/FSharp.Core.dll
/src/Aardvark.Opc.Viewer/bin/Debug/FSharp.Core.xml
/src/Aardvark.Opc.Viewer/bin/Debug/System.ValueTuple.dll
/src/Aardvark.Opc.Viewer/bin/Release/Aardvark.Opc.Viewer.XML
/src/Aardvark.Opc.Viewer/packages.config
/src/Aardvark.Opc.Viewer/paket.references
/src/packages/System.ValueTuple.4.3.1/System.ValueTuple.4.3.1.nupkg
/src/packages/System.ValueTuple.4.3.1/ThirdPartyNotices.txt
/src/packages/System.ValueTuple.4.3.1/dotnet_library_license.txt
/src/packages/System.ValueTuple.4.3.1/lib/MonoAndroid10/_._
/src/packages/System.ValueTuple.4.3.1/lib/MonoTouch10/_._
/src/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/.xml
/src/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/System.ValueTuple.dll
/src/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/.xml
/src/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll
/src/packages/System.ValueTuple.4.3.1/lib/xamarinios10/_._
/src/packages/System.ValueTuple.4.3.1/lib/xamarinmac20/_._
/src/packages/System.ValueTuple.4.3.1/lib/xamarintvos10/_._
/src/packages/System.ValueTuple.4.3.1/lib/xamarinwatchos10/_._
/src/packages/System.ValueTuple.4.3.1/ref/MonoAndroid10/_._
/src/packages/System.ValueTuple.4.3.1/ref/MonoTouch10/_._
/src/packages/System.ValueTuple.4.3.1/ref/xamarinios10/_._
/src/packages/System.ValueTuple.4.3.1/ref/xamarinmac20/_._
/src/packages/System.ValueTuple.4.3.1/ref/xamarintvos10/_._
/src/packages/System.ValueTuple.4.3.1/ref/xamarinwatchos10/_._
/src/Aardvark.Opc.Viewer/bin/Release
*.domaincache
/.paket
Expand All @@ -81,3 +52,5 @@ src\Aardvark.OpcViewer.psess
/aardium/dist
/aardium/yarn-error.log
/provex/result.obj
**/bin/Debug/**
**/bin/Release/**
7 changes: 7 additions & 0 deletions 3rdPartyLICENSES/FomanticUI-LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 changes: 14 additions & 0 deletions CREDITS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- Typography
- Uncodium.Eigensystems
- Chiron
- FomanticUI
- FSPickler
- Newtonsoft.Json
- node-getopt
Expand Down Expand Up @@ -2458,6 +2459,19 @@ SOFTWARE.
```

## FomanticUI


```# The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

## FSPickler


Expand Down
17 changes: 17 additions & 0 deletions PRODUCT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 4.25.0-prerelease7
- distance- and trianglefilter fix
- fixed problem with sequenced bookmarks performance problem when a traverse is loaded
- fixed obj not being rendered with batch rendering## 4.24.0

## 4.21.0-prerelease3
- bugfix contour lines

## 4.21.0-prerelease2
- Bugfix Entity creation
- Added new default Entities
- Spice Kernel is now loaded when a scene is loaded and a spice kernel is defined in GisApp

## 4.21.0-prerelease1
- added readme to opc-tool

## 4.24.0
- streamlined up kdtree loading

Expand All @@ -10,6 +26,7 @@
## 4.23.0
- tweaked kdtree split limit epsilon for smaller kdtrees


## 4.22.0
- further improved kdtree loading on NTFS/macbook

Expand Down
14 changes: 13 additions & 1 deletion TEST_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
## 4.25.0-prerelease10
- optimized kd tree loading from caches

## 4.25.0-prerelease6
- #413 (without footprints part), #330, #414, #397

## 4.25.0-prerelease5
- trafo updates merged with develop

## 4.25.0-prerelease4
- fixed refsystem normalization

## 4.25.0-prerelease2
- option for switching euler angle order

## 4.25.0-prerelease1
- testrelease
- fixed pivot transformation

## 4.24.0-prerelease1
- testrelease
2 changes: 2 additions & 0 deletions docs/Build-Deploy-System.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ all resources should be embedded using dotnet embedded resources to allow "singl

## Manual release as a zip file

`build publish` or
```SET GH_TOKEN=... && ./build.{cmd|sh} GitHubRelease```
to just create the release in the bin/publish folder.

## CI

Expand Down
141 changes: 141 additions & 0 deletions docs/GisView.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@

## PRo3D.GIS

Summary: This feature allows to interpret celestial bodies and surfaces from within pro3d and serves as a basis for GIS functionality in PRo3D.
General concept: A new UI tab allows to assign coordiante frames and celestial body information to surfaces and GIS entities. By setting observeration time and by choosing an observer body, views or fly-by scenarious can be modelled.


## SPICE

### Pre-requisistes
As mentioned in [SPICE docs](./spice.md) pro3d allows to load custom spice kernels. In this documentation we use the [HERA spice kernels](https://s2e2.cosmos.esa.int/bitbucket/projects/spice_kernels/repos/hera/browse), which are also used in the [solar-system demo](https://github.com/pro3d-space/PRo3D.SPICE)

To follow the demo download or clone the [repository](https://s2e2.cosmos.esa.int/bitbucket/projects/spice_kernels/repos/hera/browse).


### Loading the kernel

There are two options to load SPICE kernels.

#### The command line
- by using the command-line argument `--defaultSpiceKernel path`, e.g. the path to the tm file: `"../hera/kernels/mk/hera_crema_2_0_LPC_ECP_PDP.tm"`, the SPICE kernel to be loaded at application startup can be specified.

#### The UI

1. Initially PRo3D with GIS view enabled looks like this:

![alt text](./images/gis-view.png)

2. Load the kernel via:

![alt text](images/loadKernel.png)

3. Then the Gis View should print the path to the kernel (scroll down, and look at the settings pane within the GIS view):

![](images/loadedKernel.png)

A green check mark appears below the path if loading the kernel was successful. If there is a red exclamation mark beneath the path loading was not successful. PRo3D's text output will give more detailed information why, it might be that the path to the kernel is not correct.

## PRO3D GIS View Tab

### Current Observation Settings

At the top of the GIS tab there is a section entitled "Current Observation Settings". This is used to define an observer, a target, a point in time, and a reference frame.

![](images/currentObservationSettings.png)

* Observer: The entity from which we want to observe a specific target. The camera will be placed at the location of the observer.
* Target: The entity we want to look at. The camera will look in the direction of the target.
* Time: The point of time at which we want to observe. The loaded spice kernel needs to have data for observer and target at the selected point in time!
* Reference Frame: The reference frame into which all other frames will be converted. Which frame is selected here should not change the visual result.

### Surfaces

To use a surface with PRo3D's GIS functionality, it has to be associated with a reference frame, and can be associated with an entity. This reference frame in which the surface is defined is needed to transform the surface to the global reference system used by PRo3D.
Assigning a reference frame and entity to a loaded surfaces is done in the "Surfaces" tab.

![](images/surfaces.png)

Select the correct reference frame (and optionally entity) from the dropdown menu. If the entity or reference frame needed is not in the dropdown menu, it can be created in the "Entities"/"Reference Frames" tab.

### Entities

Entities can be celestial bodies or spacecraft. To work with PRO3D's GIS functionality the Spice Name of the entity needs to be defined in the loaded spice kernel.

The entity tab lists all entities. There are some default entities already present in PRo3D.

![](images/entities.png)

An entity can be edited by clicking on the right hand icon in the "Actions" column. The icon used to edit the HERA entity is circled in red in the screenshot below.

![](images/editEntities.png)

The red cross to the left of the edit icon deletes the corresponding entity.

Each entity can be assigned a reference frame in the column "Reference Frame". For each entity, a sphere can be drawn in the scene. Whether a sphere is drawn is determined by the checkbox in the "Draw" column.

A new entity can be created by clicking on the green plus icon at the bottom right hand side of the Entities tab. The spice name can only be set when creating an entity, it cannot be changed once the entity is created. To change a spice name you need to deleted the old entity and create a new one with the new spice name and the settings of the old entity. Spice names are unique, so you cannot create two entities with the same spice name.

Clicking on the edit icon of an entity (see above), opens a section for the entity:

![](images/editEntity.png)

The reference frame and whether to draw an entity can be selected in this view as well as the following settings:

- **Geometry Path** (not yet implemented) path to a geometry that is displayed at the location of this entity instead of a simple sphere
- **Texture Path** The path to an image (for example a jpeg file) that is rendered onto the entity.
- **Radius** The radius of the sphere that is drawn in the location of the entity in meters.

The green save icon at the bottom right hand corner closes the edit view.

Below an example of the entity Moon with a radius of 1736000 meters and a texture path.

![](images/exampleMoonTexture.png)

## Reference Frames

Reference frames can be deleted (red cross icon) and created (green plus icon in the bottom right corner) in this view. They can also be assigned an entity which is associated with them.

![](images/referenceFrames.png)

A new reference frame can be created by clicking on the green plus icon at the bottom right hand side of the Reference Frames tab. The spice name can only be set when creating a reference frame, it cannot be changed once the reference frame is created. To change a spice name you need to deleted the old reference frame and create a new one with the new spice name and the settings of the old reference frame. Spice names are unique, so you cannot create two reference frame with the same spice name.

## Observing mars

Let us now observe mars from, say phobos.
1. Set the observation settings (including a time which is in available in the kernel)
![](images/observe.png)

2. Next, make sure the proxy visualization for mars is enabled:
![](./images/MarsProperties.png)
and

![](./images/visibleMars.png)

Also make sure to have the far plane set far away for viewing mars from phobos. Ajust the near *and* far planes accordingly:
![](./images/farplane.png)

Now mars should be visible from the observation point of view.

By using the visualization properties in the entity list the element can be textured as well.

![](./images/textured.png)

Next let us load the mola dataset.
In the Surfaces pane witin the Gis View, now specifiy reference frame and celestial body for the surface (if it does not appear change the observation settings, e.g. by setting the time):
![](images/surfaceRefFrame.png)

Since we have a full surface for mars now, we can switch of the proxy geometry:
![](images/molaObservation.png)

## Extended features

It is possible to add new celestial bodies, new reference frames.

## Extended concept

For story telling, PRo3D also supports to create GIS bookmarks. Similarly to stories on surfaces this can be used to create movies and interactive presentations for science.

## Caveats

Currently the GIS settings are not stored to scene files.
File renamed without changes.
Binary file added docs/images/MarsProperties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/currentObservationSettings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/editEntities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/editEntity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/entities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exampleMoonTexture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/farplane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gis-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loadKernel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/loadedKernel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/molaObservation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/observation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/observe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/referenceFrames.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/surfaceRefFrame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/surfaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/textured.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/visibleMars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions docs/spice.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@

## SPICE

This refers to the current state as of march 2024 after reworking SPICE integration.


```mermaid
flowchart LR
spice["SPICE Toolkit"] --> cppwrapper
cppwrapper["DaKup/PRo3D-Extensions"] --> pro3dspice
pro3dspice["pro3d-space/PRo3D.SPICE"] --> pro3dviewer
pro3dviewer["PRo3D.Viewer"]
click spice "https://naif.jpl.nasa.gov/naif/toolkit.html" "The SPICE Toolkit"
click wrapper "https://github.com/pro3d-space/PRo3D.SPICE" "look at the repository on github"
click cppwrapper "https://github.com/DaKup/PRo3D-Extensions" "look at the repository on github"
```

The components are:
1. The SPICE toolkit at [https://naif.jpl.nasa.gov/naif/toolkit.html](https://naif.jpl.nasa.gov/naif/toolkit.html)
2. The CPP lib which wrapps some SPICE functionality and [JR](https://www.joanneum.at/)'s functionality. This one is deployed for all platforms using [github actions](https://github.com/DaKup/PRo3D-Extensions/actions).
3. The [PRo3D.SPICE](https://github.com/pro3d-space/PRo3D.SPICE) repository provides a dotnet wrapper for the c++ lib and deploys itself via [github actions](https://github.com/pro3d-space/PRo3D.SPICE/actions) to a [nuget](https://www.nuget.org/packages/PRo3D.SPICE) package which works on all supported platforms.
4. In this repository the nuget library is consumed [paket.dependencies](https://github.com/pro3d-space/PRo3D/blob/392fd2723bd66aca34c076c5d344fcb99f5d1b34/paket.dependencies#L71) using the paket (standard pro3d package management).


Caveats:
- A legacy library for working with instruments is still handled directly via pro3d (JR.Wrappers provides the wrapper). This can be subsumed by SPICE the functionality is ready.


## Details

Here we brievly explain how SPICE interacts with PRo3D:

- SPICE, CooRegistration and InstrumentPlatforms in PRo3D is provided by the c++ lib which can be found here: https://github.com/pro3d-space/PRo3D-Extensions.
Expand Down
24 changes: 24 additions & 0 deletions docs/tests/contourLines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Layered OPCs

Goal: [Countour lines](../Contour-Lines.md) can be mapped onto secondary textures of [multilayer opcs](../Feature-Multitexture.md). Contour distance can be specified, the lines should appear as anti-aliased lines given a line width.

Dependent tests: [layers](./layers.md)

Approach:
- import of OPC data
- changing visualization properties to use secondary texture
- apply contour line onto secondary texture
- save/load of scenes and check whether all properties are restored properly

Out-of-scope:
- Multitextured OBJs

Data needed: OPC with layers, e.g. Dimorphos, HeraV3.

Steps:
- [ ] run the [layers](./layers.md) test
- [ ] Check whether counturs tab in the surface window appears
![](./images/contours1.png)
- [ ] For eleveation as layer, choose distance/width/border accordingly:
![](./images/contours2.png)
Note: Lines should be crisp and anti-aliased. In the current screenshot above those are not. When we get higher-resolution layer this image will be updated.
35 changes: 35 additions & 0 deletions docs/tests/cutoutGeometry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Cutout geometry

Goal: Perform annotations on a [multilayer](../Feature-Multitexture.md) opc and export cut-out geometry described by the annotation.

Dependent tests: [layers](./layers.md)

Approach:
- import of OPC data
- perform an annotation
- use vscode nodebook to run a demo [notebook](../../notebooks/CutoutDemo.ipynb) to create an obj of the cutout geometry

Prerequisited:
- vscode with: ionide & polyglot notebook extension

Out-of-scope:
- Multitextured OBJs

Data needed: OPC with layers, e.g. Dimorphos, HeraV3.

Steps:
- [ ] start PRo3D with the the pro3d api enabled using the command line flag (`--remoteApi `) or the predefined launch profile
![](./images/cutout1.png)
- [ ] run the [layers](./layers.md) test
- [ ] open vscode in PRo3D root/notebooks and open the [cutout notebook](../../notebooks/CutoutDemo.ipynb).
![](./images/cutout2.png)
- [ ] run the first cell and check the result (should be a green tickbox)
![](./images/cutout3.png)
- [ ] create a annotation which forms a convex polygon
![](./images/cutout4.png)
![](./images/cutout5.png)
- [ ] run the next cell in the notebook. First it should print the ID of the annotation created:
![](./images/cutout6.png)
- [ ] next it should print filtered vertices. Next check the result.obj - does it contain geometry representing the cotout, colored with elevation values:
![](./images/cutout7.png)
![](./images/cutout8.png)
Binary file added docs/tests/images/contours1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/contours2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tests/images/cutout6.png
Binary file added docs/tests/images/cutout7.png
Binary file added docs/tests/images/cutout8.png
Binary file added docs/tests/images/layers1.png
Binary file added docs/tests/images/layers2.png
Binary file added docs/tests/images/layers3.png
Binary file added docs/tests/images/layers4.png
Binary file added docs/tests/images/layers4_1.png
Binary file added docs/tests/images/layers5.png
Loading

0 comments on commit 79e1fc0

Please sign in to comment.