-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from naturerobots/dev
final changes
- Loading branch information
Showing
18 changed files
with
242 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- docs/** | ||
- mkdocs.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
# Improvements | ||
|
||
The following section contains suggestions for improving the application and may be extended much further. | ||
|
||
## Tiling of garden images to increase loading speed | ||
|
||
Administrators of companies or gardens have the ability to upload a (self-taken) picture of a garden using | ||
the web interface. The image can be displayed in the dashboard-, beds- or plants-view in the web interface, | ||
replacing the satellite image at the exact location of the garden, providing a much more detailed | ||
view of the beds and plants. | ||
|
||
High resolution images can have a large file size, this can lead to long loading times | ||
of the web interface, especially for users which have a slow internet connection. | ||
|
||
To solve this problem, a functionality could be implemented, which splits the uploaded image into many little | ||
square tiles. A single tile can be loaded much faster, because of the smaller file size. The tiles will be loaded | ||
incrementally, building the hole image. Users will have the advantage of seeing parts of the image earlier | ||
and having better visual feedback of the loading process. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 3D-View | ||
|
||
## Overview | ||
|
||
| Name | HTTP | URL | | | | ||
|---------------------------------------------------------------------|------|-----------------------------------------------------------------------------------|---|---| | ||
| [Get list of 3d meta plant information](#3d-meta-plant-information-list) | GET | `/companies/<int:company_id>/gardens/<int:garden_id>/beds/<int:bed_id>/3d-scene/` | | | | ||
|
||
## 3d meta plant information list | ||
|
||
Send a GET request to this endpoint to get the Plant information. | ||
The response contains two elements. | ||
Firstly an array called plants, which contains informations about every plant in the bed. | ||
Secondly an global element which describes center position of the bed. | ||
|
||
The plants array only contains plants for which the pointclouds are in the `django/storage/media/pointclouds/ply` folder. | ||
The pointcloud of a plant can be loaded by the url given in the plants array. | ||
|
||
for more information on how to access the pointclouds take a look at the [storage system](/reference/storage-system). | ||
|
||
**Request**: `/companies/<int:company_id>/gardens/<int:garden_id>/beds/<int:bed_id>/3d-scene/` | ||
**Response** `200 Ok`, `404 Not Found`, `400 Bad Request` | ||
|
||
Example response: | ||
|
||
```json | ||
{ | ||
"plants": [ | ||
{ | ||
"geometryUUID": "a671dab73f9844b280ac4d36f0314ad5", | ||
"measurementUUID": "8374c5058da64b73a7520955fc0c65fd", | ||
"url": "http://localhost:8000/media/pointclouds/ply/e1ef73b1258b475a996d2b72924c27ac/a671dab73f9844b280ac4d36f0314ad5.ply", | ||
"name": "crop 16", | ||
"locationDescription": 1, | ||
"type": "mangold", | ||
"position": { | ||
"x": "-2.0091417", | ||
"y": "0.0038527877", | ||
"z": "-0.817174" | ||
}, | ||
"health": [ | ||
{ | ||
"type": "water", | ||
"loglevel": 2, | ||
"shortcut": "w" | ||
}, | ||
{ | ||
"type": "nutrients", | ||
"loglevel": 1, | ||
"shortcut": "n" | ||
}, | ||
{ | ||
"type": "diseases", | ||
"loglevel": 3, | ||
"shortcut": "d" | ||
} | ||
], | ||
"yield": 705.1650603082642, | ||
"status": "vegetating", | ||
"harvest": "4 Weeks", | ||
"progress": "0.9351895742166416" | ||
} | ||
], | ||
"global": { | ||
"position": { | ||
"x": "-1.9149369", | ||
"y": "-0.05081649", | ||
"z": "-0.8281588" | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# External APIs | ||
|
||
## OpenWeatherMap | ||
|
||
The following [APIs](https://openweathermap.org/api) from [OpenWeatherMap](https://openweathermap.org/) | ||
were used for the `weather widget`. | ||
To use the APIs, an [OpenWeatherMap account](https://home.openweathermap.org/users/sign_up) | ||
and a [token](https://home.openweathermap.org/api_keys) must be created. | ||
The token must then be added as environment variable `VITE_TOKEN_OWM`. | ||
|
||
| API | Description | [Pricing](https://openweathermap.org/price) | | ||
|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------| | ||
| [Current weather data](https://openweathermap.org/current) | Used to get the current temperature, weather and city name based on the coordinates of the garden. <br>**The geocoder used in the API will soon be deprecated.** | 60 free calls/minute <br> 1,000,000 free calls/month | | ||
| [One Call API 3.0](https://openweathermap.org/api/one-call-3) | Used to get the current day's temperature low and high, as well as the hourly forecast for temperature, rain probability, and wind speed and direction. | 1,000 free calls/day | | ||
| [Geocoding API](https://openweathermap.org/api/geocoding-api) | **Not used yet**, but the service has already been implemented for it, so it can be used when the `Current weater data API` geocoder API is deprecated. | 60 free calls/minute <br> 1,000,000 free calls/month | | ||
|
||
## Mapbox | ||
|
||
The following [APIs](https://www.mapbox.com/product-apis) from [Mapbox](https://www.mapbox.com/) | ||
were used for the `garden map`. | ||
To use the APIs, an [Mapbox account](https://account.mapbox.com/auth/signup/) and a `token` must be created. | ||
The token must then be added as environment variable `VITE_TOKEN_MAPBOX`. | ||
|
||
| API | Description | [Pricing](https://www.mapbox.com/pricing) | | ||
|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|----------------------------------| | ||
| [Static Tiles](https://docs.mapbox.com/api/maps/static-tiles/) | Used to add tiles to the map for the garden, so that the garden image can be better placed in the environment. | 200,000 free tile requests/month | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Storage System | ||
|
||
## Basics | ||
|
||
To store files like the garden images, logs or plant pointclouds we use the storage folder. | ||
Images is a common folder, which allows to store files that are not accessible through an url. | ||
The logs folder uses the [django logging system](https://docs.djangoproject.com/en/4.1/topics/logging/). | ||
It is configured to contain two logs. `debug.log`, which shows all logs but can get kind of messy. | ||
For a cleaner logging experience we added the second log `info.log`, which shows everything except the logs defined as debug. | ||
As a third option for storage we added the media folder. | ||
everything inside this folder can be accessed through an url. | ||
For this we implemented the [django storage system](https://docs.djangoproject.com/en/4.1/ref/files/storage/). | ||
There is currently no system implemented to restrict the access to the data inside of the media folder. | ||
|
||
## Folder Structure | ||
|
||
Files inside the media folder can be accessed by `http://localhost:8000/media/`. | ||
An example GET request to the pointcloud of plant1 would look like this `http://localhost:8000/media/pointclouds/ply/05717c979b0d4bd790d31ce218cd58ee/06694a57e7cf4ee1acce970ab9d9d67a.ply`. | ||
|
||
```text | ||
storage | ||
├── images | ||
│ └── garden1.png <garden-image.png> | ||
├── logs | ||
│ ├── debug.log | ||
│ └── info.log | ||
└── media | ||
└── pointclouds | ||
└── ply | ||
├── 05717c979b0d4bd790d31ce218cd58ee <bed1-uuid> | ||
│ ├── 06694a57e7cf4ee1acce970ab9d9d67a.ply <plant1-uuid> | ||
│ ├── 0bf37a0851b7402d88674e153f58e6f8.ply <plant2-uuid> | ||
│ ├── 0d927fa6b3534f9580d1db73d483b254.ply <plant3-uuid> | ||
│ ├── ... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[data-md-color-scheme="naturerobots"] { | ||
--md-primary-fg-color: #b6c1a7; | ||
--md-primary-fg-color: #79b729; | ||
--md-accent-fg-color: #9c9b9b; | ||
--md-typeset-a-color: #26561d; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.