Skip to content

Commit

Permalink
#529 Viewshed set initial target and observer heights, also doc impro…
Browse files Browse the repository at this point in the history
…vements (#530)
  • Loading branch information
tariqksoliman authored Apr 10, 2024
1 parent a04e2b3 commit 90383d4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
14 changes: 7 additions & 7 deletions docs/pages/Setup/ENVs/ENVs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Environment variables are set within `MMGIS/.env`. A sample file `MMGIS/sample.e

The kind of server running (apache is deprecated) | string enum | default `''`

- _node:_ A node express server running NodeJS > 10.10
- _node:_ A node express server running NodeJS v20.11.1+
- _apache (deprecated):_ Served through Apache. Some or all functionality may not work

#### `AUTH=`
Expand Down Expand Up @@ -58,6 +58,12 @@ User of Postgres database | string | default `null`

Password of Postgres database | string | default `null`

## Optional Variables

#### `PORT=`

Port to run on | positive integer | default `3000`

#### `DB_POOL_MAX=`

Max number connections in the database's pool. CPUs \* 4 is a good number | integer | default `10`
Expand All @@ -74,12 +80,6 @@ How many milliseconds for an incoming connection to wait for a DB connection bef

A list of CSSO LDAP groups that have access | string[] | default `[]`

## Optional Variables

#### `PORT=`

Port to run on | positive integer | default `3000`

#### `VERBOSE_LOGGING=`

Potentially logs a bunch of extra stuff for development purposes | bool | default `false`
Expand Down
12 changes: 10 additions & 2 deletions docs/pages/Setup/Installation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@ nav_order: 1

## Installing with Docker

`/` will always refer to the repo's root directory

1. Clone the repo
`git clone https://github.com/NASA-AMMOS/MMGIS`

1. From within `/`
`npm install`

### Building

To build the Docker image, run:
`docker build -t <image tag> .`

### Running

This repo contains a `docker-compose.yml` file that defines a service for the application and a PostgreSQL database with PostGIS installed
This repo contains a `/docker-compose.yml` file that defines a service for the application and a PostgreSQL database with PostGIS installed

- Copy `/sample.env` to `.env`
`cp sample.env .env`
Expand All @@ -46,7 +54,7 @@ This repo contains a `docker-compose.yml` file that defines a service for the ap
- On the host machine, create a `Missions` directory and copy the contents of `./Missions` to your directory.
- Via the docker-compose.yml, map this directory to `/usr/src/app/Missions` in the container. For example, if the host directory is `./Missions`, the volume mapping would be `- ./Missions:/usr/src/app/Missions`

Run: `docker-compose up`
Run: `docker-compose up -d`

### First Time UI Setup

Expand Down
13 changes: 11 additions & 2 deletions src/essence/Tools/Viewshed/ViewshedTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,17 @@ let ViewshedTool = {
resolution: initObj.resolution != null ? initObj.resolution : 1,
invert: initObj.invert != null ? initObj.invert : 0,
targetHeight:
initObj.targetHeight != null ? initObj.targetHeight : 0,
height: initObj.height != null ? initObj.height : 2,
initObj.targetHeight != null
? initObj.targetHeight
: ViewshedTool?.vars?.defaultTargetHeight != null
? ViewshedTool.vars.defaultTargetHeight
: 0,
height:
initObj.height != null
? initObj.height
: ViewshedTool?.vars?.defaultObserverHeight != null
? ViewshedTool.vars.defaultObserverHeight
: 2,
centerAzimuth: initObj.centerAzimuth || 0,
FOVAzimuth: initObj.FOVAzimuth != null ? initObj.FOVAzimuth : 360,
centerElevation: initObj.centerElevation || 0,
Expand Down
4 changes: 3 additions & 1 deletion src/essence/Tools/Viewshed/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"elFOV": 30
},
{ "...": "..." }
]
],
"defaultObserverHeight": 2,
"defaultTargetHeight": 0
}
},
"hasVars": true,
Expand Down

0 comments on commit 90383d4

Please sign in to comment.