Merge pull request #29 from MONICA-Project/v1.2.10

Create Release v1.2.10
This commit is contained in:
Philip Schell 2019-12-11 11:55:29 +01:00 committed by GitHub
commit 977e5415fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 3140 additions and 565 deletions

106
.github/workflows/dotnetcore.yml vendored Normal file
View File

@ -0,0 +1,106 @@
name: Build, Test, Publish and Dockerise Lora-Map
on: [push]
jobs:
build:
name: Build, pack and release
runs-on: ubuntu-latest
steps:
- name: Checkout parent project with dependencys
uses: actions/checkout@v1
with:
repository: MONICA-Project/map-project
ref: refs/heads/master
submodules: true
- name: Checkout last versions
run: git -C Lora-Map checkout --progress --force ${{ github.sha }}
working-directory: ../map-project
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100
- name: Build with dotnet
run: dotnet build Lora-Map.sln --configuration Release
working-directory: ../map-project/Lora-Map
- name: Create deb files
if: success()
run: |
mkdir ../../../Builds
chmod oug+x make-deb.sh
./make-deb.sh amd64
./make-deb.sh armhf
id: create_deb
working-directory: ../map-project/Lora-Map/Lora-Map/dpkg
- name: Create release
if: success()
id: nightly_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_deb.outputs.builddaterelease }}
release_name: Nightly from master
body: This is a nightly release. It may be not working properly.
draft: false
prerelease: true
- name: Upload release asset amd64
if: success()
id: upload-release-asset-amd64
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.nightly_release.outputs.upload_url }}
asset_path: ../map-project/Builds/amd64-${{ steps.create_deb.outputs.debuilderfile }}
asset_name: amd64-${{ steps.create_deb.outputs.debuilderfile }}
asset_content_type: application/x-deb
- name: Upload release asset armhf
if: success()
id: upload-release-asset-armhf
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.nightly_release.outputs.upload_url }}
asset_path: ../map-project/Builds/armhf-${{ steps.create_deb.outputs.debuilderfile }}
asset_name: armhf-${{ steps.create_deb.outputs.debuilderfile }}
asset_content_type: application/x-deb
docker:
name: Build and push dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout parent project with dependencys
uses: actions/checkout@v1
with:
repository: MONICA-Project/map-project
ref: refs/heads/master
submodules: true
- name: Checkout last versions
run: git -C Lora-Map checkout --progress --force ${{ github.sha }}
working-directory: ../map-project
- name: Docker build
id: docker_build
run: |
DOCKERTAG=$(date +%Y%m%d%H%M%S)
echo "##[set-output name=dockertag;]$DOCKERTAG"
docker build . -t monicaproject/lora-map:latest -t monicaproject/lora-map:$DOCKERTAG
working-directory: ../map-project
- name: Docker-compose publish
if: success()
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin ${INPUT_REGISTRY}
docker push monicaproject/lora-map:latest
docker push monicaproject/lora-map:${{ steps.docker_build.outputs.dockertag }}
working-directory: ../map-project

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/.vs /.vs
/Lora-Map/obj /Lora-Map/obj
/Lora-Map/bin /Lora-Map/bin
/Doku/.vs

View File

@ -1,5 +1,23 @@
# Changelogs # Changelogs
## 1.2.10
### New Features
* Posibility to display sensor data on map
### Bugfixes
* Parse also all Doublevalues as Int
### Changes
* Change Online Map MaxZoom to 19
* Searchfunction case insensitive
* Show Numbers from a Place not with linebreaking
* Numbers on places are not clickable, also as the grid
* Search in Description of Polygons
* Change Sani to Rettungsdienst
* Display GateCounting Boxes in a line not a collumn
* Create Aliases for Camera Count
* Filter Fight under level
* Refactoring
* Porting to .NET Core
## 1.2.9 ## 1.2.9
### New Features ### New Features
* Add setting model to code * Add setting model to code

BIN
Lora-Map.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,25 +1,34 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.27703.2026 VisualStudioVersion = 16.0.29519.87
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lora-Map", "Lora-Map\Lora-Map.csproj", "{95D6F48A-9488-42A6-A973-941B45B26DB8}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lora-Map_Core", "Lora-Map\Lora-Map.csproj", "{78136B15-FF0B-4DCE-94CA-1D6148DEA232}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7DD32F31-ACB0-4F5E-B3D8-78564A83ACEF}"
ProjectSection(SolutionItems) = preProject
..\.dockerignore = ..\.dockerignore
..\CONTRIBUTING.md = ..\CONTRIBUTING.md
..\docker-compose.yml = ..\docker-compose.yml
..\Dockerfile = ..\Dockerfile
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
..\update.sh = ..\update.sh
EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectorDataMqtt", "..\Utils\ConnectorDataMqtt\ConnectorDataMqtt\ConnectorDataMqtt.csproj", "{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot-Utils_Core", "..\Utils\Bot-Utils\Bot-Utils\Bot-Utils_Core.csproj", "{ED37370F-AE65-498D-A425-413FEE69C0A8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils_Core", "..\Utils\Utils\Utils\Utils_Core.csproj", "{E8268FE5-D6F0-4805-9BDE-9DBC9CB517FF}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2Mqtt_4.7.1", "..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj", "{A11AEF5A-B246-4FE8-8330-06DB73CC8074}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT_Core", "..\Utils\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj", "{04CF6328-3976-44D3-9959-A3B1A2C5C45A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot-Utils", "..\Utils\Bot-Utils\Bot-Utils\Bot-Utils.csproj", "{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectorDataMqtt_Core", "..\Utils\ConnectorDataMqtt\ConnectorDataMqtt\ConnectorDataMqtt_Core.csproj", "{E40D29CB-B499-4FA6-AEA1-18E8CEAA911B}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "..\Utils\Utils\Utils\Utils.csproj", "{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson_Core", "..\Librarys\litjson\litjson\litjson_Core.csproj", "{FFC66B7F-B4FB-4E42-B896-2C6772D899AA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix", "..\Librarys\Mono.Posix\Mono.Posix\Mono.Posix.csproj", "{E2CA132E-E85C-40AD-BE94-B138AA68772B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "M2Mqtt_Core", "..\Librarys\mqtt\M2Mqtt\M2Mqtt_Core.csproj", "{00C678EE-6BAA-4FCB-AAA5-7755E65C6CC5}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoordinateSharp", "..\Librarys\Coordinates\CoordinateSharp\CoordinateSharp.csproj", "{DA8510CE-7899-49DD-9E17-7C974382288D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoordinateSharp_Core", "..\Librarys\Coordinates\CoordinateSharp\CoordinateSharp_Core.csproj", "{D9D4C842-5818-4E96-9BFE-7ADFB4D811BA}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -27,47 +36,43 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{95D6F48A-9488-42A6-A973-941B45B26DB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {78136B15-FF0B-4DCE-94CA-1D6148DEA232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95D6F48A-9488-42A6-A973-941B45B26DB8}.Debug|Any CPU.Build.0 = Debug|Any CPU {78136B15-FF0B-4DCE-94CA-1D6148DEA232}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95D6F48A-9488-42A6-A973-941B45B26DB8}.Release|Any CPU.ActiveCfg = Release|Any CPU {78136B15-FF0B-4DCE-94CA-1D6148DEA232}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95D6F48A-9488-42A6-A973-941B45B26DB8}.Release|Any CPU.Build.0 = Release|Any CPU {78136B15-FF0B-4DCE-94CA-1D6148DEA232}.Release|Any CPU.Build.0 = Release|Any CPU
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ED37370F-AE65-498D-A425-413FEE69C0A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU {ED37370F-AE65-498D-A425-413FEE69C0A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU {ED37370F-AE65-498D-A425-413FEE69C0A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.Build.0 = Release|Any CPU {ED37370F-AE65-498D-A425-413FEE69C0A8}.Release|Any CPU.Build.0 = Release|Any CPU
{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E8268FE5-D6F0-4805-9BDE-9DBC9CB517FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.Build.0 = Debug|Any CPU {E8268FE5-D6F0-4805-9BDE-9DBC9CB517FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.ActiveCfg = Release|Any CPU {E8268FE5-D6F0-4805-9BDE-9DBC9CB517FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.Build.0 = Release|Any CPU {E8268FE5-D6F0-4805-9BDE-9DBC9CB517FF}.Release|Any CPU.Build.0 = Release|Any CPU
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {04CF6328-3976-44D3-9959-A3B1A2C5C45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU {04CF6328-3976-44D3-9959-A3B1A2C5C45A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU {04CF6328-3976-44D3-9959-A3B1A2C5C45A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.Build.0 = Release|Any CPU {04CF6328-3976-44D3-9959-A3B1A2C5C45A}.Release|Any CPU.Build.0 = Release|Any CPU
{A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E40D29CB-B499-4FA6-AEA1-18E8CEAA911B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.Build.0 = Debug|Any CPU {E40D29CB-B499-4FA6-AEA1-18E8CEAA911B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.ActiveCfg = Release|Any CPU {E40D29CB-B499-4FA6-AEA1-18E8CEAA911B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.Build.0 = Release|Any CPU {E40D29CB-B499-4FA6-AEA1-18E8CEAA911B}.Release|Any CPU.Build.0 = Release|Any CPU
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FFC66B7F-B4FB-4E42-B896-2C6772D899AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.Build.0 = Debug|Any CPU {FFC66B7F-B4FB-4E42-B896-2C6772D899AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {FFC66B7F-B4FB-4E42-B896-2C6772D899AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.Build.0 = Release|Any CPU {FFC66B7F-B4FB-4E42-B896-2C6772D899AA}.Release|Any CPU.Build.0 = Release|Any CPU
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {00C678EE-6BAA-4FCB-AAA5-7755E65C6CC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.Build.0 = Debug|Any CPU {00C678EE-6BAA-4FCB-AAA5-7755E65C6CC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.ActiveCfg = Release|Any CPU {00C678EE-6BAA-4FCB-AAA5-7755E65C6CC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.Build.0 = Release|Any CPU {00C678EE-6BAA-4FCB-AAA5-7755E65C6CC5}.Release|Any CPU.Build.0 = Release|Any CPU
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9D4C842-5818-4E96-9BFE-7ADFB4D811BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9D4C842-5818-4E96-9BFE-7ADFB4D811BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9D4C842-5818-4E96-9BFE-7ADFB4D811BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.Build.0 = Release|Any CPU {D9D4C842-5818-4E96-9BFE-7ADFB4D811BA}.Release|Any CPU.Build.0 = Release|Any CPU
{DA8510CE-7899-49DD-9E17-7C974382288D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA8510CE-7899-49DD-9E17-7C974382288D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA8510CE-7899-49DD-9E17-7C974382288D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA8510CE-7899-49DD-9E17-7C974382288D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1534B636-9FC8-49BB-BB14-FC403ECDF889} SolutionGuid = {7B1C516B-2EDC-4F6A-A1A5-A9BCA14C8603}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -4,73 +4,8 @@
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security> <security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC-Manifestoptionen
Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den
Knoten "requestedExecutionLevel" wie folgt.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert.
Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
für die Anwendung erforderlich ist.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges> </requestedPrivileges>
</security> </security>
</trustInfo> </trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Eine Liste der Windows-Versionen, unter denen diese Anwendung getestet
und für die sie entwickelt wurde. Wenn Sie die Auskommentierung der entsprechenden Elemente aufheben,
wird von Windows automatisch die kompatibelste Umgebung ausgewählt. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Gibt an, dass die Anwendung mit DPI-Werten kompatibel ist und von Windows nicht automatisch auf höhere
DPI-Werte skaliert wird. WPF-Anwendungen (Windows Presentation Foundation) sind automatisch mit DPI-Werten kompatibel und müssen sich nicht
anmelden. Für Windows Forms-Anwendungen für .NET Framework 4.6, die sich für diese Einstellung anmelden, muss
auch die Einstellung "'EnableWindowsFormsHighDpiAutoResizing" in der "app.config" auf "true" festgelegt werden. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly> </assembly>

View File

@ -1,257 +1,206 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{95D6F48A-9488-42A6-A973-941B45B26DB8}</ProjectGuid>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>Fraunhofer.Fit.IoT.LoraMap</RootNamespace> <RootNamespace>Fraunhofer.Fit.IoT.LoraMap</RootNamespace>
<AssemblyName>Lora-Map</AssemblyName> <AssemblyName>Lora-Map</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Adminrights.manifest</ApplicationManifest> <ApplicationManifest>Adminrights.manifest</ApplicationManifest>
<Product>Lora-Map</Product>
<Description>Displays Items with Coordinates from Mqtt on a Map</Description>
<Company>Fraunhofer FIT</Company>
<PackageId>LoraMap.IoT.Fit.Fraunhofer</PackageId>
<Copyright>Copyright © Fraunhofer FIT, BlubbFish 2018 - 11.12.2019</Copyright>
<Authors>BlubbFish</Authors>
<Version>1.2.10</Version>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/MONICA-Project/lora-map</PackageProjectUrl>
<RepositoryUrl>https://github.com/MONICA-Project/lora-map.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<NeutralLanguage>de-DE</NeutralLanguage>
<PackageReleaseNotes>1.2.10 Refactoring is the thing
1.2.9 The PüMa Release
1.2.8 Improving the UI
1.2.7 Reorganise a lot of things, add Support for Cameradata
1.2.6 New Types of marker for person
1.2.5 Set textsize for every zoomlevel
1.2.4 Can draw Textmarkers on the Map, use MGRS (UTM) on the Map
1.2.3 #9 display polygons and marker on the map
1.2.2 Bugfix, if only recieve panic packet with gps data, update the marker on the map also
1.2.1 #6 Load the map from the Device
1.2.0 #4 Possible to Ex and Import Setting
1.1.7 #8 Editor for Names
1.1.6 #5 Create admin area
1.1.5 Add support for alert button
1.1.4 #3 Create icons for devices
1.1.3 #1 Click on icon and show details
1.1.2 #2 Show versions number in Site
1.1.1 Add Debian package config</PackageReleaseNotes>
<PackageTags>lora mqtt map lagekarte</PackageTags>
<StartupObject>Fraunhofer.Fit.IoT.LoraMap.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <ProjectReference Include="..\..\Librarys\Coordinates\CoordinateSharp\CoordinateSharp_Core.csproj" />
<Reference Include="System.Core" /> <ProjectReference Include="..\..\Librarys\litjson\litjson\litjson_Core.csproj" />
<Reference Include="System.Xml.Linq" /> <ProjectReference Include="..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_Core.csproj" />
<Reference Include="System.Data.DataSetExtensions" /> <ProjectReference Include="..\..\Utils\Bot-Utils\Bot-Utils\Bot-Utils_Core.csproj" />
<Reference Include="Microsoft.CSharp" /> <ProjectReference Include="..\..\Utils\ConnectorDataMqtt\ConnectorDataMqtt\ConnectorDataMqtt_Core.csproj" />
<Reference Include="System.Data" /> <ProjectReference Include="..\..\Utils\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj" />
<Reference Include="System.Net.Http" /> <ProjectReference Include="..\..\Utils\Utils\Utils\Utils_Core.csproj" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Lib\WebRequests.cs" /> <Content Include="../CHANGELOG.md" />
<Compile Include="Model\Admin\AdminModel.cs" /> <Content Include="../CONTRIBUTING.md" />
<Compile Include="Model\Admin\AdminSession.cs" /> <Content Include="../LICENSE" />
<Compile Include="Model\Camera.cs" /> <Content Include="../README.md" />
<Compile Include="Model\Crowd.cs" /> <Content Include="../.github/workflows/dotnetcore.yml" />
<Compile Include="Model\Fight.cs" />
<Compile Include="Model\Marker.cs" />
<Compile Include="Model\AlarmItem.cs" />
<Compile Include="Model\Settings.cs" />
<Compile Include="Model\UTMData.cs" />
<Compile Include="Model\WeatherWarnings.cs" />
<Compile Include="Server.cs" />
<Compile Include="Model\PositionItem.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Adminrights.manifest" /> <None Update="config-example\requests.conf.example">
<None Include="..\CHANGELOG" />
<None Include="config-example\settings.conf.example">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="dpkg\control" /> <None Update="config-example\settings.conf.example">
<None Include="dpkg\create-Builds.bat" />
<None Include="dpkg\loramap-logrotate" />
<None Include="dpkg\loramap.service" />
<None Include="dpkg\make-deb.sh" />
<None Include="dpkg\postinst" />
<None Include="dpkg\preinst" />
<None Include="dpkg\prerm" />
<None Include="resources\icons\marker\din1451m.woff">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="resources\js\leaflet\leaflet-src.js.map" /> <None Update="resources\admin\css\global.css">
</ItemGroup>
<ItemGroup>
<Content Include="resources\admin\css\global.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\admin\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\admin\login.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\global.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\admin-with-cogwheels.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\cctv.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\failtile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\filter.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\information.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\placeholder.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\search.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\storm-ac.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\storm-in.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\akku\0-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\akku\1-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\akku\2-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\akku\3-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\akku\4-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\add.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\bullet_add.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\bullet_delete.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\bullet_star.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\edit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\icon_edit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\remove.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\general\save.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\marker\map-marker.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\marker\Marker.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\icons\marker\Person.svg">
<SubType>Designer</SubType>
</Content>
<Content Include="resources\js\functions.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\images\layers-2x.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\images\layers.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\images\marker-icon-2x.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\images\marker-icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\images\marker-shadow.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\leaflet-src.js" />
<Content Include="resources\js\leaflet\leaflet.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\leaflet\leaflet.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\menu.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\map.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\js\marker.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="config-example\requests.conf.example">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<Content Include="resources\favicon.ico"> <None Update="resources\admin\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
<Content Include="resources\index.html"> <None Update="resources\admin\js\menu.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
</ItemGroup> <None Update="resources\admin\login.html">
<ItemGroup>
<ProjectReference Include="..\..\Librarys\Coordinates\CoordinateSharp\CoordinateSharp.csproj">
<Project>{da8510ce-7899-49dd-9e17-7c974382288d}</Project>
<Name>CoordinateSharp</Name>
</ProjectReference>
<ProjectReference Include="..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj">
<Project>{91a14cd2-2940-4500-8193-56d37edddbaa}</Project>
<Name>litjson_4.7.1</Name>
</ProjectReference>
<ProjectReference Include="..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj">
<Project>{a11aef5a-b246-4fe8-8330-06db73cc8074}</Project>
<Name>M2Mqtt_4.7.1</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\Bot-Utils\Bot-Utils\Bot-Utils.csproj">
<Project>{bb7bfcb5-3db0-49e1-802a-3ce3eecc59f9}</Project>
<Name>Bot-Utils</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\ConnectorDataMqtt\ConnectorDataMqtt\ConnectorDataMqtt.csproj">
<Project>{ee6c8f68-ed46-4c1c-abdd-cfcdf75104f2}</Project>
<Name>ConnectorDataMqtt</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\Utils-IoT\Utils-IoT\Utils-IoT.csproj">
<Project>{b870e4d5-6806-4a0b-b233-8907eedc5afc}</Project>
<Name>Utils-IoT</Name>
</ProjectReference>
<ProjectReference Include="..\..\Utils\Utils\Utils\Utils.csproj">
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
<Name>Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="resources\admin\js\menu.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
</ItemGroup> <None Update="resources\css\global.css">
<ItemGroup>
<Content Include="resources\js\overlays.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
<None Update="resources\css\icons\admin-with-cogwheels.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\cctv.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\failtile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\filter.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\information.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\placeholder.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\search.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\storm-ac.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\css\icons\storm-in.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\favicon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\akku\0-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\akku\1-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\akku\2-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\akku\3-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\akku\4-4.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\add.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\bullet_add.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\bullet_delete.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\bullet_star.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\edit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\icon_edit.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\remove.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\general\save.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\marker\din1451m.woff">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\marker\map-marker.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\icons\marker\Marker.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\functions.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\images\layers-2x.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\images\layers.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\images\marker-icon-2x.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\images\marker-icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\images\marker-shadow.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\leaflet.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\leaflet\leaflet.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\map.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\marker.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\menu.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="resources\js\overlays.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
</Project>

View File

@ -23,34 +23,34 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
public AlarmItem(JsonData json) => this.Update(json); public AlarmItem(JsonData json) => this.Update(json);
public void Update(JsonData json) { public void Update(JsonData json) {
this.Rssi = (Double)json["Rssi"]; this.Rssi = json["Rssi"].IsInt ? (Int32)json["Rssi"] : (Double)json["Rssi"];
this.Snr = (Double)json["Snr"]; this.Snr = json["Snr"].IsInt ? (Int32)json["Snr"] : (Double)json["Snr"];
if(DateTime.TryParse((String)json["Receivedtime"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime updatetime)) { if (DateTime.TryParse((String)json["Receivedtime"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime updatetime)) {
this.Lorarecievedtime = updatetime.ToUniversalTime(); this.Lorarecievedtime = updatetime.ToUniversalTime();
} }
this.Recievedtime = DateTime.UtcNow; this.Recievedtime = DateTime.UtcNow;
this.Latitude = (Double)json["Gps"]["Latitude"]; this.Latitude = json["Gps"]["Latitude"].IsInt ? (Int32)json["Gps"]["Latitude"] : (Double)json["Gps"]["Latitude"];
this.Longitude = (Double)json["Gps"]["Longitude"]; this.Longitude = json["Gps"]["Longitude"].IsInt ? (Int32)json["Gps"]["Longitude"] : (Double)json["Gps"]["Longitude"];
this.Fix = (Boolean)json["Gps"]["Fix"]; this.Fix = (Boolean)json["Gps"]["Fix"];
if(!this.Fix) { if (!this.Fix) {
this.Latitude = (Double)json["Gps"]["LastLatitude"]; this.Latitude = json["Gps"]["LastLatitude"].IsInt ? (Int32)json["Gps"]["LastLatitude"] : (Double)json["Gps"]["LastLatitude"];
this.Longitude = (Double)json["Gps"]["LastLongitude"]; this.Longitude = json["Gps"]["LastLongitude"].IsInt ? (Int32)json["Gps"]["LastLongitude"] : (Double)json["Gps"]["LastLongitude"];
} }
this.UTM = new UTMData(this.Latitude, this.Longitude); this.UTM = new UTMData(this.Latitude, this.Longitude);
this.Hdop = (Double)json["Gps"]["Hdop"]; this.Hdop = json["Gps"]["Hdop"].IsInt ? (Int32)json["Gps"]["Hdop"] : (Double)json["Gps"]["Hdop"];
this.Height = (Double)json["Gps"]["Height"]; this.Height = json["Gps"]["Height"].IsInt ? (Int32)json["Gps"]["Height"] : (Double)json["Gps"]["Height"];
this.SetHistory(json); this.SetHistory(json);
} }
private void SetHistory(JsonData json) { private void SetHistory(JsonData json) {
String key = ((Double)json["BatteryLevel"]).ToString(); String key = json["BatteryLevel"].ToString();
key += "_" + ((Int32)json["Calculatedcrc"]).ToString(); key += "_" + json["Calculatedcrc"].ToString();
key += "_" + ((Double)json["Gps"]["Hdop"]).ToString(); key += "_" + json["Gps"]["Hdop"].ToString();
key += "_" + ((Double)json["Gps"]["Height"]).ToString(); key += "_" + json["Gps"]["Height"].ToString();
key += "_" + ((Boolean)json["Gps"]["Fix"]).ToString(); key += "_" + json["Gps"]["Fix"].ToString();
key += "_" + ((Double)json["Gps"]["LastLatitude"]).ToString(); key += "_" + json["Gps"]["LastLatitude"].ToString();
key += "_" + ((Double)json["Gps"]["LastLongitude"]).ToString(); key += "_" + json["Gps"]["LastLongitude"].ToString();
key += "_" + ((String)json["Gps"]["Time"]); key += "_" + json["Gps"]["Time"].ToString();
if(!this.buttonhistory.ContainsValue(key)) { if(!this.buttonhistory.ContainsValue(key)) {
this.buttonhistory.Add(DateTime.UtcNow, key); this.buttonhistory.Add(DateTime.UtcNow, key);
if(this.buttonhistory.Count > 10) { if(this.buttonhistory.Count > 10) {
@ -61,21 +61,21 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
public static String GetId(JsonData json) => (String)json["Name"]; public static String GetId(JsonData json) => (String)json["Name"];
public static Boolean CheckJson(JsonData json) => public static Boolean CheckJson(JsonData json) =>
json.ContainsKey("Rssi") && json["Rssi"].IsDouble && json.ContainsKey("Rssi") && (json["Rssi"].IsDouble || json["Rssi"].IsInt)
json.ContainsKey("Snr") && json["Snr"].IsDouble && && json.ContainsKey("Snr") && (json["Snr"].IsDouble || json["Snr"].IsInt)
json.ContainsKey("Receivedtime") && json["Receivedtime"].IsString && && json.ContainsKey("Receivedtime") && json["Receivedtime"].IsString
json.ContainsKey("Gps") && json["Gps"].IsObject && && json.ContainsKey("BatteryLevel") && (json["BatteryLevel"].IsDouble || json["BatteryLevel"].IsInt)
json["Gps"].ContainsKey("Latitude") && json["Gps"]["Latitude"].IsDouble && && json.ContainsKey("Gps") && json["Gps"].IsObject
json["Gps"].ContainsKey("Longitude") && json["Gps"]["Longitude"].IsDouble && && json["Gps"].ContainsKey("Latitude") && (json["Gps"]["Latitude"].IsDouble || json["Gps"]["Latitude"].IsInt)
json["Gps"].ContainsKey("LastLatitude") && json["Gps"]["LastLatitude"].IsDouble && && json["Gps"].ContainsKey("Longitude") && (json["Gps"]["Longitude"].IsDouble || json["Gps"]["Longitude"].IsInt)
json["Gps"].ContainsKey("LastLongitude") && json["Gps"]["LastLongitude"].IsDouble && && json["Gps"].ContainsKey("LastLatitude") && (json["Gps"]["LastLatitude"].IsDouble || json["Gps"]["LastLatitude"].IsInt)
json["Gps"].ContainsKey("Hdop") && json["Gps"]["Hdop"].IsDouble && && json["Gps"].ContainsKey("LastLongitude") && (json["Gps"]["LastLongitude"].IsDouble || json["Gps"]["LastLongitude"].IsInt)
json["Gps"].ContainsKey("Fix") && json["Gps"]["Fix"].IsBoolean && && json["Gps"].ContainsKey("LastGPSPos") && json["Gps"]["LastGPSPos"].IsString
json["Gps"].ContainsKey("Height") && json["Gps"]["Height"].IsDouble && && json["Gps"].ContainsKey("Hdop") && (json["Gps"]["Hdop"].IsDouble || json["Gps"]["Hdop"].IsInt)
json["Gps"].ContainsKey("Time") && json["Gps"]["Time"].IsString && && json["Gps"].ContainsKey("Fix") && json["Gps"]["Fix"].IsBoolean
json.ContainsKey("Name") && json["Name"].IsString && && json["Gps"].ContainsKey("Height") && (json["Gps"]["Height"].IsDouble || json["Gps"]["Height"].IsInt)
json.ContainsKey("Calculatedcrc") && json["Calculatedcrc"].IsInt && && json.ContainsKey("Name") && json["Name"].IsString &&
json.ContainsKey("BatteryLevel") && json["BatteryLevel"].IsDouble; json.ContainsKey("Calculatedcrc") && json["Calculatedcrc"].IsInt;
} }
} }

View File

@ -0,0 +1,41 @@
using System;
using System.Globalization;
using LitJson;
namespace Fraunhofer.Fit.IoT.LoraMap.Model {
class EnviromentData {
public String Name { get; private set; }
public Double Rssi { get; private set; }
public Double Snr { get; private set; }
public Double Temperature { get; private set; }
public Double Humidity { get; private set; }
public Double Windspeed { get; private set; }
public DateTime Lorarecievedtime { get; private set; }
public EnviromentData(JsonData json) => this.Update(json);
public void Update(JsonData json) {
this.Name = GetId(json);
this.Rssi = json["Rssi"].IsInt ? (Int32)json["Rssi"] : (Double)json["Rssi"];
this.Snr = json["Snr"].IsInt ? (Int32)json["Snr"] : (Double)json["Snr"];
this.Temperature = json["Temperature"].IsInt ? (Int32)json["Temperature"] : (Double)json["Temperature"];
this.Humidity = json["Humidity"].IsInt ? (Int32)json["Humidity"] : (Double)json["Humidity"];
this.Windspeed = json["Windspeed"].IsInt ? (Int32)json["Windspeed"] : (Double)json["Windspeed"];
if(DateTime.TryParse((String)json["Receivedtime"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime updatetime)) {
this.Lorarecievedtime = updatetime.ToUniversalTime();
}
}
public static Boolean CheckJson(JsonData json) =>
json.ContainsKey("Name") && json["Name"].IsString &&
json.ContainsKey("Rssi") && (json["Rssi"].IsDouble || json["Rssi"].IsInt) &&
json.ContainsKey("Snr") && (json["Snr"].IsDouble || json["Snr"].IsInt) &&
json.ContainsKey("Temperature") && (json["Temperature"].IsDouble || json["Temperature"].IsInt) &&
json.ContainsKey("Humidity") && (json["Humidity"].IsDouble || json["Humidity"].IsInt) &&
json.ContainsKey("Windspeed") && (json["Windspeed"].IsDouble || json["Windspeed"].IsInt) &&
json.ContainsKey("Receivedtime") && json["Receivedtime"].IsString;
public static String GetId(JsonData json) => (String)json["Name"];
}
}

View File

@ -37,45 +37,46 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
this.Group = null; this.Group = null;
} }
} }
public static Boolean CheckJson(JsonData json) => json.ContainsKey("Rssi") && json["Rssi"].IsDouble public static Boolean CheckJson(JsonData json) =>
&& json.ContainsKey("Snr") && json["Snr"].IsDouble json.ContainsKey("Rssi") && (json["Rssi"].IsDouble || json["Rssi"].IsInt)
&& json.ContainsKey("Snr") && (json["Snr"].IsDouble || json["Snr"].IsInt)
&& json.ContainsKey("Receivedtime") && json["Receivedtime"].IsString && json.ContainsKey("Receivedtime") && json["Receivedtime"].IsString
&& json.ContainsKey("BatteryLevel") && json["BatteryLevel"].IsDouble && json.ContainsKey("BatteryLevel") && (json["BatteryLevel"].IsDouble || json["BatteryLevel"].IsInt)
&& json.ContainsKey("Gps") && json["Gps"].IsObject && json.ContainsKey("Gps") && json["Gps"].IsObject
&& json["Gps"].ContainsKey("Latitude") && json["Gps"]["Latitude"].IsDouble && json["Gps"].ContainsKey("Latitude") && (json["Gps"]["Latitude"].IsDouble || json["Gps"]["Latitude"].IsInt)
&& json["Gps"].ContainsKey("Longitude") && json["Gps"]["Longitude"].IsDouble && json["Gps"].ContainsKey("Longitude") && (json["Gps"]["Longitude"].IsDouble || json["Gps"]["Longitude"].IsInt)
&& json["Gps"].ContainsKey("LastLatitude") && json["Gps"]["LastLatitude"].IsDouble && json["Gps"].ContainsKey("LastLatitude") && (json["Gps"]["LastLatitude"].IsDouble || json["Gps"]["LastLatitude"].IsInt)
&& json["Gps"].ContainsKey("LastLongitude") && json["Gps"]["LastLongitude"].IsDouble && json["Gps"].ContainsKey("LastLongitude") && (json["Gps"]["LastLongitude"].IsDouble || json["Gps"]["LastLongitude"].IsInt)
&& json["Gps"].ContainsKey("LastGPSPos") && json["Gps"]["LastGPSPos"].IsString && json["Gps"].ContainsKey("LastGPSPos") && json["Gps"]["LastGPSPos"].IsString
&& json["Gps"].ContainsKey("Hdop") && json["Gps"]["Hdop"].IsDouble && json["Gps"].ContainsKey("Hdop") && (json["Gps"]["Hdop"].IsDouble || json["Gps"]["Hdop"].IsInt)
&& json["Gps"].ContainsKey("Fix") && json["Gps"]["Fix"].IsBoolean && json["Gps"].ContainsKey("Fix") && json["Gps"]["Fix"].IsBoolean
&& json["Gps"].ContainsKey("Height") && json["Gps"]["Height"].IsDouble && json["Gps"].ContainsKey("Height") && (json["Gps"]["Height"].IsDouble || json["Gps"]["Height"].IsInt)
&& json.ContainsKey("Name") && json["Name"].IsString; && json.ContainsKey("Name") && json["Name"].IsString;
public static String GetId(JsonData json) => (String)json["Name"]; public static String GetId(JsonData json) => (String)json["Name"];
public void Update(JsonData json) { public void Update(JsonData json) {
this.Rssi = (Double)json["Rssi"]; this.Rssi = json["Rssi"].IsInt ? (Int32)json["Rssi"] : (Double)json["Rssi"];
this.Snr = (Double)json["Snr"]; this.Snr = json["Snr"].IsInt ? (Int32)json["Snr"] : (Double)json["Snr"];
if(DateTime.TryParse((String)json["Receivedtime"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime updatetime)) { if(DateTime.TryParse((String)json["Receivedtime"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime updatetime)) {
this.Lorarecievedtime = updatetime.ToUniversalTime(); this.Lorarecievedtime = updatetime.ToUniversalTime();
} }
this.Recievedtime = DateTime.UtcNow; this.Recievedtime = DateTime.UtcNow;
this.Battery = Math.Round((Double)json["BatteryLevel"], 2); this.Battery = Math.Round(json["BatteryLevel"].IsInt ? (Int32)json["BatteryLevel"] : (Double)json["BatteryLevel"], 2);
this.Batterysimple = this.Battery < 3.44 ? 0 : this.Battery < 3.53 ? 1 : this.Battery < 3.6525 ? 2 : this.Battery < 3.8825 ? 3 : 4; this.Batterysimple = this.Battery < 3.44 ? 0 : this.Battery < 3.53 ? 1 : this.Battery < 3.6525 ? 2 : this.Battery < 3.8825 ? 3 : 4;
this.Latitude = (Double)json["Gps"]["Latitude"]; this.Latitude = json["Gps"]["Latitude"].IsInt ? (Int32)json["Gps"]["Latitude"] : (Double)json["Gps"]["Latitude"];
this.Longitude = (Double)json["Gps"]["Longitude"]; this.Longitude = json["Gps"]["Longitude"].IsInt ? (Int32)json["Gps"]["Longitude"] : (Double)json["Gps"]["Longitude"];
this.Fix = (Boolean)json["Gps"]["Fix"]; this.Fix = (Boolean)json["Gps"]["Fix"];
if(!this.Fix) { if(!this.Fix) {
this.Latitude = (Double)json["Gps"]["LastLatitude"]; this.Latitude = json["Gps"]["LastLatitude"].IsInt ? (Int32)json["Gps"]["LastLatitude"] : (Double)json["Gps"]["LastLatitude"];
this.Longitude = (Double)json["Gps"]["LastLongitude"]; this.Longitude = json["Gps"]["LastLongitude"].IsInt ? (Int32)json["Gps"]["LastLongitude"] : (Double)json["Gps"]["LastLongitude"];
} }
this.UTM = new UTMData(this.Latitude, this.Longitude); this.UTM = new UTMData(this.Latitude, this.Longitude);
if(DateTime.TryParse((String)json["Gps"]["LastGPSPos"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime lastgpstime)) { if(DateTime.TryParse((String)json["Gps"]["LastGPSPos"], DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AssumeUniversal, out DateTime lastgpstime)) {
this.Lastgpspostime = lastgpstime.ToUniversalTime(); this.Lastgpspostime = lastgpstime.ToUniversalTime();
} }
this.Hdop = (Double)json["Gps"]["Hdop"]; this.Hdop = json["Gps"]["Hdop"].IsInt ? (Int32)json["Gps"]["Hdop"] : (Double)json["Gps"]["Hdop"];
this.Height = (Double)json["Gps"]["Height"]; this.Height = json["Gps"]["Height"].IsInt ? (Int32)json["Gps"]["Height"] : (Double)json["Gps"]["Height"];
} }

View File

@ -12,8 +12,9 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
public Double Startloclat { get; private set; } public Double Startloclat { get; private set; }
public Double Startloclon { get; private set; } public Double Startloclon { get; private set; }
public Dictionary<String, List<Dictionary<String, List<Double>>>> Grid { get; private set; } public Dictionary<String, List<Dictionary<String, List<Double>>>> Grid { get; private set; }
public Dictionary<String, List<List<Double>>> FightDedection { get; private set; } public Dictionary<String, Fight> FightDedection { get; private set; }
public Dictionary<String, Density> DensityArea { get; private set; } public Dictionary<String, Density> DensityArea { get; private set; }
public Dictionary<String, Sensor> Sensors { get; private set; }
public Settings() => this.ParseJson(); public Settings() => this.ParseJson();
@ -21,9 +22,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
private void ParseJson() { private void ParseJson() {
JsonData json = JsonMapper.ToObject(File.ReadAllText("json/settings.json")); JsonData json = JsonMapper.ToObject(File.ReadAllText("json/settings.json"));
if(json.ContainsKey("StartPos") && json["StartPos"].IsObject && if(json.ContainsKey("StartPos") && json["StartPos"].IsObject && json["StartPos"].ContainsKey("lat") && json["StartPos"]["lat"].IsDouble && json["StartPos"].ContainsKey("lon") && json["StartPos"]["lon"].IsDouble) {
json["StartPos"].ContainsKey("lat") && json["StartPos"]["lat"].IsDouble &&
json["StartPos"].ContainsKey("lon") && json["StartPos"]["lon"].IsDouble) {
this.Startloclat = (Double)json["StartPos"]["lat"]; this.Startloclat = (Double)json["StartPos"]["lat"];
this.Startloclon = (Double)json["StartPos"]["lon"]; this.Startloclon = (Double)json["StartPos"]["lon"];
} else { } else {
@ -31,7 +30,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
this.Startloclon = 0; this.Startloclon = 0;
} }
this.weatherCellIDs.Clear(); this.weatherCellIDs.Clear();
if (json.ContainsKey("CellIds") && json["CellIds"].IsArray && json["CellIds"].Count > 0) { if(json.ContainsKey("CellIds") && json["CellIds"].IsArray && json["CellIds"].Count > 0) {
foreach (JsonData item in json["CellIds"]) { foreach (JsonData item in json["CellIds"]) {
if(Int32.TryParse(item.ToString(), out Int32 cellid)) { if(Int32.TryParse(item.ToString(), out Int32 cellid)) {
this.weatherCellIDs.Add(cellid); this.weatherCellIDs.Add(cellid);
@ -39,9 +38,11 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
} }
} }
if(json.ContainsKey("FightDedection") && json["FightDedection"].IsObject) { if(json.ContainsKey("FightDedection") && json["FightDedection"].IsObject) {
Dictionary<String, List<List<Double>>> fight = new Dictionary<String, List<List<Double>>>(); Dictionary<String, Fight> fights = new Dictionary<String, Fight>();
foreach (KeyValuePair<String, JsonData> entry in json["FightDedection"]) { foreach (KeyValuePair<String, JsonData> entry in json["FightDedection"]) {
List<List<Double>> poly = new List<List<Double>>(); Fight fight = new Fight {
Polygon = new List<List<Double>>()
};
if(entry.Value.ContainsKey("Poly") && entry.Value["Poly"].IsArray) { if(entry.Value.ContainsKey("Poly") && entry.Value["Poly"].IsArray) {
foreach (JsonData coord in entry.Value["Poly"]) { foreach (JsonData coord in entry.Value["Poly"]) {
List<Double> coords = new List<Double>(); List<Double> coords = new List<Double>();
@ -49,18 +50,25 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
coords.Add((Double)coord["Lat"]); coords.Add((Double)coord["Lat"]);
coords.Add((Double)coord["Lon"]); coords.Add((Double)coord["Lon"]);
} }
poly.Add(coords); fight.Polygon.Add(coords);
} }
} }
fight.Add(entry.Key, poly); if (entry.Value.ContainsKey("Level") && entry.Value["Level"].IsDouble) {
fight.Level = (Double)entry.Value["Level"];
}
if (entry.Value.ContainsKey("Alias") && entry.Value["Alias"].IsString) {
fight.Alias = (String)entry.Value["Alias"];
}
fights.Add(entry.Key, fight);
} }
this.FightDedection = fight; this.FightDedection = fights;
} }
if (json.ContainsKey("CrwodDensity") && json["CrwodDensity"].IsObject) { if(json.ContainsKey("CrwodDensity") && json["CrwodDensity"].IsObject) {
Dictionary<String, Density> densitys = new Dictionary<String, Density>(); Dictionary<String, Density> densitys = new Dictionary<String, Density>();
foreach (KeyValuePair<String, JsonData> entry in json["CrwodDensity"]) { foreach (KeyValuePair<String, JsonData> entry in json["CrwodDensity"]) {
Density density = new Density(); Density density = new Density {
density.Polygon = new List<List<Double>>(); Polygon = new List<List<Double>>()
};
if (entry.Value.ContainsKey("Poly") && entry.Value["Poly"].IsArray) { if (entry.Value.ContainsKey("Poly") && entry.Value["Poly"].IsArray) {
foreach (JsonData coord in entry.Value["Poly"]) { foreach (JsonData coord in entry.Value["Poly"]) {
List<Double> coords = new List<Double>(); List<Double> coords = new List<Double>();
@ -74,16 +82,48 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
if(entry.Value.ContainsKey("Count") && (entry.Value["Count"].IsInt || entry.Value["Count"].IsDouble)) { if(entry.Value.ContainsKey("Count") && (entry.Value["Count"].IsInt || entry.Value["Count"].IsDouble)) {
density.Maximum = (Int32)entry.Value["Count"]; density.Maximum = (Int32)entry.Value["Count"];
} }
if(entry.Value.ContainsKey("Alias") && entry.Value["Alias"].IsString) {
density.Alias = (String)entry.Value["Alias"];
}
densitys.Add(entry.Key, density); densitys.Add(entry.Key, density);
} }
this.DensityArea = densitys; this.DensityArea = densitys;
} }
if(json.ContainsKey("Sensors") && json["Sensors"].IsObject) {
Dictionary<String, Sensor> sensors = new Dictionary<String, Sensor>();
foreach(KeyValuePair<String, JsonData> entry in json["Sensors"]) {
Sensor sensor = new Sensor {
Coordinates = new List<Double>()
};
if(entry.Value.ContainsKey("Poly") && entry.Value["Poly"].IsObject) {
JsonData coord = entry.Value["Poly"];
List<Double> coords = new List<Double>();
if(coord.ContainsKey("Lat") && coord["Lat"].IsDouble && coord.ContainsKey("Lon") && coord["Lon"].IsDouble) {
coords.Add((Double)coord["Lat"]);
coords.Add((Double)coord["Lon"]);
}
sensor.Coordinates = coords;
if(entry.Value.ContainsKey("Level") && (entry.Value["Level"].IsInt || entry.Value["Level"].IsDouble)) {
sensor.Level = entry.Value["Level"].IsInt ? (Int32)entry.Value["Level"] : (Double)entry.Value["Level"];
}
if(entry.Value.ContainsKey("Alias") && entry.Value["Alias"].IsString) {
sensor.Alias = (String)entry.Value["Alias"];
}
sensors.Add(entry.Key, sensor);
}
}
this.Sensors = sensors;
}
this.gridradius = json.ContainsKey("GridRadius") && json["GridRadius"].IsInt && this.Startloclat != 0 && this.Startloclon != 0 ? (Int32)json["GridRadius"] : 0; this.gridradius = json.ContainsKey("GridRadius") && json["GridRadius"].IsInt && this.Startloclat != 0 && this.Startloclon != 0 ? (Int32)json["GridRadius"] : 0;
this.GenerateGrid(); this.GenerateGrid();
} }
private void GenerateGrid() { private void GenerateGrid() {
if(this.Startloclat == 0 || this.Startloclon == 0 || this.gridradius == 0) { this.Grid = new Dictionary<String, List<Dictionary<String, List<Double>>>> {
{ "Major", new List<Dictionary<String, List<Double>>>() },
{ "Minor", new List<Dictionary<String, List<Double>>>() }
};
if (this.Startloclat == 0 || this.Startloclon == 0 || this.gridradius == 0) {
return; return;
} }
MilitaryGridReferenceSystem start = new Coordinate(this.Startloclat, this.Startloclon).MGRS; MilitaryGridReferenceSystem start = new Coordinate(this.Startloclat, this.Startloclon).MGRS;
@ -92,10 +132,6 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
Double bottom = start.Northing - this.gridradius - (start.Northing - this.gridradius) % 100; Double bottom = start.Northing - this.gridradius - (start.Northing - this.gridradius) % 100;
Double right = start.Easting + this.gridradius + (100 - (start.Easting + this.gridradius) % 100); Double right = start.Easting + this.gridradius + (100 - (start.Easting + this.gridradius) % 100);
Double top = start.Northing + this.gridradius + (100 - (start.Northing + this.gridradius) % 100); Double top = start.Northing + this.gridradius + (100 - (start.Northing + this.gridradius) % 100);
this.Grid = new Dictionary<String, List<Dictionary<String, List<Double>>>> {
{ "Major", new List<Dictionary<String, List<Double>>>() },
{ "Minor", new List<Dictionary<String, List<Double>>>() }
};
for (Double i = left; i <= right; i += 50) { for (Double i = left; i <= right; i += 50) {
Coordinate TopLeft = MilitaryGridReferenceSystem.MGRStoLatLong(new MilitaryGridReferenceSystem(start.LatZone, start.LongZone, start.Digraph, i, top)); Coordinate TopLeft = MilitaryGridReferenceSystem.MGRStoLatLong(new MilitaryGridReferenceSystem(start.LatZone, start.LongZone, start.Digraph, i, top));
Coordinate BottomLeft = MilitaryGridReferenceSystem.MGRStoLatLong(new MilitaryGridReferenceSystem(start.LatZone, start.LongZone, start.Digraph, i, bottom)); Coordinate BottomLeft = MilitaryGridReferenceSystem.MGRStoLatLong(new MilitaryGridReferenceSystem(start.LatZone, start.LongZone, start.Digraph, i, bottom));
@ -165,6 +201,19 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
public struct Density { public struct Density {
public List<List<Double>> Polygon { get; set; } public List<List<Double>> Polygon { get; set; }
public Int32 Maximum { get; set; } public Int32 Maximum { get; set; }
public String Alias { get; set; }
}
public struct Fight {
public List<List<Double>> Polygon { get; set; }
public Double Level { get; set; }
public String Alias { get; set; }
}
public struct Sensor {
public List<Double> Coordinates { get; set; }
public Double Level { get; set; }
public String Alias { get; set; }
} }
} }
} }

View File

@ -10,6 +10,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
public class WeatherWarnings { public class WeatherWarnings {
private readonly Settings settings; private readonly Settings settings;
private Thread bgthread; private Thread bgthread;
private Boolean backgroundrunnerAlive;
private readonly WebRequests webrequests = new WebRequests(); private readonly WebRequests webrequests = new WebRequests();
public List<Warning> Warnungen { get; private set; } public List<Warning> Warnungen { get; private set; }
@ -21,11 +22,12 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
private void StartBackgroundThread() { private void StartBackgroundThread() {
this.bgthread = new Thread(this.BackGroundRunner); this.bgthread = new Thread(this.BackGroundRunner);
this.backgroundrunnerAlive = true;
this.bgthread.Start(); this.bgthread.Start();
} }
private void BackGroundRunner() { private void BackGroundRunner() {
while(true) { while(this.backgroundrunnerAlive) {
List<Warning> ret = new List<Warning>(); List<Warning> ret = new List<Warning>();
foreach(Int32 item in this.settings.GetWeatherCellIds()) { foreach(Int32 item in this.settings.GetWeatherCellIds()) {
try { try {
@ -40,11 +42,23 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
} catch { } } catch { }
} }
this.Warnungen = ret; this.Warnungen = ret;
Thread.Sleep(60 * 1000); for (Int32 i = 0; i < 1000; i++) {
if (this.backgroundrunnerAlive) {
Thread.Sleep(60);
}
}
} }
} }
internal void Dispose() => this.bgthread.Abort(); internal void Dispose() {
try {
this.backgroundrunnerAlive = false;
while (this.bgthread.IsAlive) {
Thread.Sleep(10);
}
this.bgthread = null;
} catch { }
}
public class Warning { public class Warning {
public Warning(JsonData warning) { public Warning(JsonData warning) {

View File

@ -5,7 +5,7 @@ using BlubbFish.Utils.IoT.Connector;
namespace Fraunhofer.Fit.IoT.LoraMap { namespace Fraunhofer.Fit.IoT.LoraMap {
class Program { class Program {
static void Main(String[] args) { static void Main(String[] _1) {
InIReader.SetSearchPath(new List<String>() { "/etc/loramap", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\loramap" }); InIReader.SetSearchPath(new List<String>() { "/etc/loramap", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\loramap" });
if (!InIReader.ConfigExist("settings")) { if (!InIReader.ConfigExist("settings")) {
Helper.WriteError("settings.ini not found!"); Helper.WriteError("settings.ini not found!");

View File

@ -1,57 +0,0 @@
using System.Resources;
using System.Reflection;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("Lora-Map")]
[assembly: AssemblyDescription("Displays Items with Coordinates from Mqtt on a Map")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Fraunhofer FIT")]
[assembly: AssemblyProduct("Lora-Map")]
[assembly: AssemblyCopyright("Copyright © 2018 - 30.08.2019")]
[assembly: AssemblyTrademark("Fraunhofer FIT, BlubbFish")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("de-DE")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("95d6f48a-9488-42a6-a973-941b45b26db8")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.9")]
[assembly: AssemblyFileVersion("1.2.9")]
/*
* 1.1.1 Add Debian package config
* 1.1.2 #2 Show versions number in Site
* 1.1.3 #1 Click on icon and show details
* 1.1.4 #3 Create icons for devices
* 1.1.5 Add support for alert button
* 1.1.6 #5 Create admin area
* 1.1.7 #8 Editor for Names
* 1.2.0 #4 Possible to Ex and Import Setting
* 1.2.1 #6 Load the map from the Device
* 1.2.2 Bugfix, if only recieve panic packet with gps data, update the marker on the map also
* 1.2.3 #9 display polygons and marker on the map
* 1.2.4 Can draw Textmarkers on the Map, use MGRS (UTM) on the Map
* 1.2.5 #10 text Letzer Datenempfang is too long when scrollbar is there and #11 set textsize for every zoomlevel
* 1.2.6 New Types of marker for person
* 1.2.7 Reorganise a lot of things, add Support for Cameradata
* 1.2.8 Improving the UI
* 1.2.9 The PüMa Release
*/

View File

@ -18,6 +18,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
private readonly SortedDictionary<String, Camera> counter = new SortedDictionary<String, Camera>(); private readonly SortedDictionary<String, Camera> counter = new SortedDictionary<String, Camera>();
private readonly SortedDictionary<String, Crowd> density = new SortedDictionary<String, Crowd>(); private readonly SortedDictionary<String, Crowd> density = new SortedDictionary<String, Crowd>();
private readonly SortedDictionary<String, Fight> fights = new SortedDictionary<String, Fight>(); private readonly SortedDictionary<String, Fight> fights = new SortedDictionary<String, Fight>();
private readonly SortedDictionary<String, EnviromentData> sensors = new SortedDictionary<String, EnviromentData>();
private JsonData marker; private JsonData marker;
private readonly Settings settings; private readonly Settings settings;
private readonly WeatherWarnings weather; private readonly WeatherWarnings weather;
@ -28,6 +29,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
private readonly Object lockFight = new Object(); private readonly Object lockFight = new Object();
private readonly Object lockCount = new Object(); private readonly Object lockCount = new Object();
private readonly Object lockDensy = new Object(); private readonly Object lockDensy = new Object();
private readonly Object lockSensor = new Object();
public Server(ADataBackend backend, Dictionary<String, String> settings, InIReader requests) : base(backend, settings, requests) { public Server(ADataBackend backend, Dictionary<String, String> settings, InIReader requests) : base(backend, settings, requests) {
this.logger.SetPath(settings["loggingpath"]); this.logger.SetPath(settings["loggingpath"]);
@ -98,18 +100,17 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
Console.WriteLine("PANIC erhalten!"); Console.WriteLine("PANIC erhalten!");
} else if(Camera.CheckJson(d) && ((String)mqtt.From).Contains("camera/count")) { } else if(Camera.CheckJson(d) && ((String)mqtt.From).Contains("camera/count")) {
String cameraid = Camera.GetId(d); String cameraid = Camera.GetId(d);
lock (this.lockCount) { lock(this.lockCount) {
if (this.counter.ContainsKey(cameraid)) { if(this.counter.ContainsKey(cameraid)) {
this.counter[cameraid].Update(d); this.counter[cameraid].Update(d);
} else { } else {
this.counter.Add(cameraid, new Camera(d)); this.counter.Add(cameraid, new Camera(d));
} }
} }
} else if(((((String)mqtt.From).Contains("sfn/crowd_density_local") || ((String)mqtt.From).Contains("camera/crowd")) && Crowd.CheckJsonCrowdDensityLocal(d)) || } else if((((String)mqtt.From).Contains("sfn/crowd_density_local") || ((String)mqtt.From).Contains("camera/crowd")) && Crowd.CheckJsonCrowdDensityLocal(d) || ((String)mqtt.From).Contains("sfn/flow") && Crowd.CheckJsonFlow(d)) {
(((String)mqtt.From).Contains("sfn/flow") && Crowd.CheckJsonFlow(d))) {
String cameraid = Crowd.GetId(d); String cameraid = Crowd.GetId(d);
lock (this.lockDensy) { lock(this.lockDensy) {
if (this.density.ContainsKey(cameraid)) { if(this.density.ContainsKey(cameraid)) {
this.density[cameraid].Update(d); this.density[cameraid].Update(d);
} else { } else {
this.density.Add(cameraid, new Crowd(d)); this.density.Add(cameraid, new Crowd(d));
@ -117,13 +118,23 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
} }
} else if((((String)mqtt.From).Contains("camera/fighting_detection") || ((String)mqtt.From).Contains("sfn/fighting_detection")) && Fight.CheckJsonFightingDetection(d)) { } else if((((String)mqtt.From).Contains("camera/fighting_detection") || ((String)mqtt.From).Contains("sfn/fighting_detection")) && Fight.CheckJsonFightingDetection(d)) {
String cameraid = Fight.GetId(d); String cameraid = Fight.GetId(d);
lock (this.lockFight) { lock(this.lockFight) {
if (this.fights.ContainsKey(cameraid)) { if(this.fights.ContainsKey(cameraid)) {
this.fights[cameraid].Update(d); this.fights[cameraid].Update(d);
} else { } else {
this.fights.Add(cameraid, new Fight(d)); this.fights.Add(cameraid, new Fight(d));
} }
} }
} else if(((String)mqtt.From).Contains("lora/sensor") && EnviromentData.CheckJson(d)) {
String sensorid = EnviromentData.GetId(d);
lock(this.lockSensor) {
if(this.sensors.ContainsKey(sensorid)) {
this.sensors[sensorid].Update(d);
} else {
this.sensors.Add(sensorid, new EnviromentData(d));
}
}
Console.WriteLine("Umweltdaten erhalten!");
} }
} catch(Exception e) { } catch(Exception e) {
Helper.WriteError("Backend_MessageIncomming(): "+e.Message + "\n\n" + e.StackTrace); Helper.WriteError("Backend_MessageIncomming(): "+e.Message + "\n\n" + e.StackTrace);
@ -139,7 +150,8 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
{ "cameracount", this.counter }, { "cameracount", this.counter },
{ "crowdcount", this.density }, { "crowdcount", this.density },
{ "fightdedect", this.fights }, { "fightdedect", this.fights },
{ "weatherwarnings", this.weather.Warnungen } { "weatherwarnings", this.weather.Warnungen },
{ "sensors", this.sensors }
}, cont); }, cont);
} else if (cont.Request.Url.PathAndQuery.StartsWith("/get60000")) { } else if (cont.Request.Url.PathAndQuery.StartsWith("/get60000")) {
return SendJsonResponse(new Dictionary<String, Object>() { return SendJsonResponse(new Dictionary<String, Object>() {
@ -147,7 +159,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
}, cont); }, cont);
} else if (cont.Request.Url.PathAndQuery.StartsWith("/getonce")) { } else if (cont.Request.Url.PathAndQuery.StartsWith("/getonce")) {
return SendJsonResponse(new Dictionary<String, Object>() { return SendJsonResponse(new Dictionary<String, Object>() {
{ "getlayer", this.FindMapLayer(cont.Request) }, { "getlayer", this.FindMapLayer() },
{ "getgeo", JsonMapper.ToObject(File.ReadAllText("json/geo.json")) }, { "getgeo", JsonMapper.ToObject(File.ReadAllText("json/geo.json")) },
{ "startup", this.settings } { "startup", this.settings }
}, cont); }, cont);
@ -175,14 +187,14 @@ namespace Fraunhofer.Fit.IoT.LoraMap {
return SendFileResponse(cont); return SendFileResponse(cont);
} }
private Dictionary<String, Dictionary<String, Object>> FindMapLayer(HttpListenerRequest request) { private Dictionary<String, Dictionary<String, Object>> FindMapLayer() {
Dictionary<String, Dictionary<String, Object>> ret = new Dictionary<String, Dictionary<String, Object>> { Dictionary<String, Dictionary<String, Object>> ret = new Dictionary<String, Dictionary<String, Object>> {
{ "online", new Dictionary<String, Object>() { { "online", new Dictionary<String, Object>() {
{ "title", "Online Map" }, { "title", "Online Map" },
{ "url", "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" }, { "url", "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" },
{ "attribution", "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors" }, { "attribution", "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors" },
{ "minZoom", 1 }, { "minZoom", 1 },
{ "maxZoom", 18 } { "maxZoom", 19 }
} } } }
}; };
if(Directory.Exists("resources" + Path.DirectorySeparatorChar + "maps")) { if(Directory.Exists("resources" + Path.DirectorySeparatorChar + "maps")) {

View File

@ -3,7 +3,7 @@ Version: x.x-x
Section: base Section: base
Priority: optional Priority: optional
Architecture: any Architecture: any
Depends: mono-runtime (>= 5.18), libmono-posix4.0-cil (>= 5.18), libmono-system-web4.0-cil (>= 5.18) Depends: dotnet-runtime-3.0 (>= 3.0.1)
Maintainer: BlubbFish <dev@blubbfish.net> Maintainer: BlubbFish <dev@blubbfish.net>
Description: Lora-Map Description: Lora-Map
Lora-Map shows a Map to control the Lora Tracker Lora-Map shows a Map to control the Lora Tracker

View File

@ -2,26 +2,35 @@
HOMEDIR=$HOME HOMEDIR=$HOME
ROOT="$HOMEDIR/deb" ROOT="$HOMEDIR/deb"
OUTPUT="../bin/Release" OUTPUT="../bin/Release/netcoreapp3.0"
EXEC="$ROOT/usr/local/bin/loramap" DEBNAME="loramap"
CONFIG="$ROOT/etc/loramap" CSPROJFILE="Lora-Map.csproj"
EXEC="$ROOT/usr/local/bin/$DEBNAME"
CONFIG="$ROOT/etc/$DEBNAME"
SYSTEMD="$ROOT/lib/systemd/system" SYSTEMD="$ROOT/lib/systemd/system"
LOGROTATE="$ROOT/etc/logrotate.d" LOGROTATE="$ROOT/etc/logrotate.d"
echo "Catch all paths together for $DEBNAME."
DEBIAN="$ROOT/DEBIAN" DEBIAN="$ROOT/DEBIAN"
VMAJOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 1) VMAJOR=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 1)
VMINOR=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 2) VMINOR=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 2)
VBUILD=$(grep -e "^\[assembly: AssemblyVersion(\"" ../Properties/AssemblyInfo.cs | cut -d'"' -f 2 | cut -d'.' -f 3) VBUILD=$(grep -e "<Version>" ../$CSPROJFILE | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'.' -f 3)
ARCHT=$1 ARCHT=$1
echo "Versionsumber parsed: $VMAJOR.$VMINOR-$VBUILD."
mkdir -p $EXEC mkdir -p $EXEC
mkdir -p $CONFIG mkdir -p $CONFIG
mkdir -p $DEBIAN mkdir -p $DEBIAN
mkdir -p $SYSTEMD mkdir -p $SYSTEMD
mkdir -p $LOGROTATE mkdir -p $LOGROTATE
cp control $DEBIAN echo "Created directorys."
cp control $DEBIAN/control
cp preinst $DEBIAN cp preinst $DEBIAN
cp postinst $DEBIAN cp postinst $DEBIAN
cp prerm $DEBIAN cp prerm $DEBIAN
@ -29,26 +38,49 @@ sed -i s/Version:\ x\.x-x/"Version: $VMAJOR.$VMINOR-$VBUILD"/ $DEBIAN/control
sed -i s/Architecture:\ any/"Architecture: $ARCHT"/ $DEBIAN/control sed -i s/Architecture:\ any/"Architecture: $ARCHT"/ $DEBIAN/control
chmod 755 $DEBIAN -R chmod 755 $DEBIAN -R
cp loramap.service $SYSTEMD echo "Copy deb control files."
chmod 644 $SYSTEMD/loramap.service
cp $OUTPUT/*.exe $EXEC/ cp "service-$DEBNAME" "$SYSTEMD/$DEBNAME.service"
#cp $OUTPUT/gpio.2.44 $EXEC/ chmod 644 $SYSTEMD/"$DEBNAME.service"
#cp $OUTPUT/libwiringPi.so.2.44 $EXEC/
echo "Copy $DEBNAME.service to $SYSTEMD."
cp $OUTPUT/*.runtimeconfig.json $EXEC/
find $OUTPUT -name \*.dll -exec cp {} $EXEC/ \; find $OUTPUT -name \*.dll -exec cp {} $EXEC/ \;
chmod 644 $EXEC/* chmod 644 $EXEC/*
chmod 755 $EXEC chmod 755 $EXEC
echo "Copy programm files to $EXEC."
cp $OUTPUT/resources $EXEC -r cp $OUTPUT/resources $EXEC -r
sed -i s/"<div id=\"version\">vx.x.x"/"<div id=\"version\">$VMAJOR.$VMINOR.$VBUILD"/ $EXEC/resources/index.html sed -i s/"<div id=\"version\">vx.x.x"/"<div id=\"version\">$VMAJOR.$VMINOR.$VBUILD"/ $EXEC/resources/index.html
echo "Change Versionnumber in index.html"
cp $OUTPUT/config-example/* $CONFIG cp $OUTPUT/config-example/* $CONFIG
chmod 644 $CONFIG/* chmod 644 $CONFIG/*
chmod 755 $CONFIG chmod 755 $CONFIG
cp loramap-logrotate $LOGROTATE/loramap echo "Copy example-conf to $CONFIG."
cp "logrotate-$DEBNAME" "$LOGROTATE/$DEBNAME.conf"
chmod 644 $LOGROTATE/* chmod 644 $LOGROTATE/*
echo "Copy $DEBNAME.conf to $LOGROTATE."
dpkg-deb --build $ROOT dpkg-deb --build $ROOT
mv $HOMEDIR/deb.deb ../../../Builds/"$ARCHT-loramap_$VMAJOR.$VMINOR-$VBUILD.deb"
rm $HOMEDIR/deb -r echo "Build deb packet."
TARGETFILE="$DEBNAME""_$VMAJOR.$VMINOR-$VBUILD.deb"
mv $HOMEDIR/deb.deb "../../../Builds/$ARCHT-$TARGETFILE"
echo "Move $ARCHT-$TARGETFILE to Builds."
rm $HOMEDIR/deb -r
echo "Remove $HOMEDIR/deb."
echo "##[set-output name=debuilderfile;]$TARGETFILE"
echo "##[set-output name=builddaterelease;]$(date +"%F_%H%M%S")"

View File

@ -1,9 +1,17 @@
#!/bin/bash #!/bin/bash
systemctl enable loramap DEBNAME="loramap"
systemctl enable $DEBNAME
systemctl daemon-reload systemctl daemon-reload
if [ -f /tmp/loramap_service_runner ]; then touch /var/log/loramap.log
service loramap start chown loramapbot:loramapbot /var/log/loramap.log
rm /tmp/loramap_service_runner chmod 644 /var/log/loramap.log
chown -R loramapbot:loramapbot /usr/local/bin/$DEBNAME
if [ -f /tmp/$DEBNAME_service_runner ]; then
service $DEBNAME start
rm /tmp/$DEBNAME_service_runner
fi fi

View File

@ -1,2 +1,6 @@
#!/bin/bash #!/bin/bash
useradd -M loramapbot
usermod -L loramapbot
groupadd loramapbot
usermod -G loramapbot,adm loramapbot

View File

@ -1,7 +1,9 @@
#!/bin/bash #!/bin/bash
if [[ $(systemctl is-active loramap || true) == "active" ]] DEBNAME="loramap"
if [[ $(systemctl is-active $DEBNAME || true) == "active" ]]
then then
touch /tmp/loramap_service_runner touch /tmp/$DEBNAME_service_runner
service loramap stop service $DEBNAME stop
fi fi

View File

@ -5,10 +5,12 @@ Description=Lora-Map
After=network-online.target After=network-online.target
[Service] [Service]
User=root User=loramapbot
Group=root Group=loramapbot
WorkingDirectory=/usr/local/bin/loramap WorkingDirectory=/usr/local/bin/loramap
ExecStart=/usr/bin/mono /usr/local/bin/loramap/Lora-Map.exe PermissionsStartOnly=true
ExecStartPre=setcap 'cap_net_bind_service=+ep' /usr/share/dotnet/dotnet
ExecStart=/usr/bin/dotnet /usr/local/bin/loramap/Lora-Map.dll
KillMode=control-group KillMode=control-group
TimeoutStopSec=5 TimeoutStopSec=5
Restart=on-failure Restart=on-failure

View File

@ -372,12 +372,19 @@ var Settings = {
if (typeof jsonsettings.CrwodDensity === "undefined") { if (typeof jsonsettings.CrwodDensity === "undefined") {
jsonsettings.CrwodDensity = []; jsonsettings.CrwodDensity = [];
} }
if (typeof jsonsettings.Counting === "undefined") {
jsonsettings.Counting = [];
}
if (typeof jsonsettings.Sensors === "undefined") {
jsonsettings.Sensors = [];
}
var html = "<div id='settingseditor'><div class='title'>Einstellungen</div>"; var html = "<div id='settingseditor'><div class='title'>Einstellungen</div>";
html += "<div class='startloc'>Startpunkt: <input value='" + jsonsettings.StartPos.lat + "' id='startlat'> Lat, <input value='" + jsonsettings.StartPos.lon + "' id='startlon'> Lon</div>"; html += "<div class='startloc'>Startpunkt: <input value='" + jsonsettings.StartPos.lat + "' id='startlat'> Lat, <input value='" + jsonsettings.StartPos.lon + "' id='startlon'> Lon</div>";
html += "<div class='wetterwarnings'>CellId's für DWD-Wetterwarnungen: <input value='" + jsonsettings.CellIds.join(";") + "' id='wetterids'> (Trennen durch \";\", <a href='https://www.dwd.de/DE/leistungen/opendata/help/warnungen/cap_warncellids_csv.html'>cap_warncellids_csv</a>)</div>"; html += "<div class='wetterwarnings'>CellId's für DWD-Wetterwarnungen: <input value='" + jsonsettings.CellIds.join(";") + "' id='wetterids'> (Trennen durch \";\", <a href='https://www.dwd.de/DE/leistungen/opendata/help/warnungen/cap_warncellids_csv.html'>cap_warncellids_csv</a>)</div>";
html += "<div class='gridradius'>Radius für das Grid um den Startpunkt: <input value='" + jsonsettings.GridRadius + "' id='gridrad'>m</div>"; html += "<div class='gridradius'>Radius für das Grid um den Startpunkt: <input value='" + jsonsettings.GridRadius + "' id='gridrad'>m</div>";
html += "<div class='fightdedection'>Fight Dedection Kameras: <br>" + this._renderFightDedection(jsonsettings.FightDedection) + "</div>"; html += "<div class='fightdedection'>Fight Dedection Kameras: <br>" + this._renderFightDedection(jsonsettings.FightDedection) + "</div>";
html += "<div class='crowddensity'>Crowd Density Kameras: <br>" + this._renderCrowdDensity(jsonsettings.CrwodDensity) + "</div>"; html += "<div class='crowddensity'>Crowd Density Kameras: <br>" + this._renderCrowdDensity(jsonsettings.CrwodDensity) + "</div>";
html += "<div class='sensorsettings'>Sensors: <br>" + this._renderSensorSettings(jsonsettings.Sensors) + "</div>";
html += "<div class='savesettings'><img src='../icons/general/save.png' onclick='Settings.Save()' class='pointer'></div>"; html += "<div class='savesettings'><img src='../icons/general/save.png' onclick='Settings.Save()' class='pointer'></div>";
document.getElementById("content").innerHTML = html + "</div>"; document.getElementById("content").innerHTML = html + "</div>";
}, },
@ -403,7 +410,7 @@ var Settings = {
var coord = coords[j].split(";"); var coord = coords[j].split(";");
polyjson[j] = { "Lat": this._filterFloat(coord[0]), "Lon": this._filterFloat(coord[1]) }; polyjson[j] = { "Lat": this._filterFloat(coord[0]), "Lon": this._filterFloat(coord[1]) };
} }
fightjson[id] = { "Poly": polyjson }; fightjson[id] = { "Poly": polyjson, "Alias": rowsf[i].children[2].innerText, "Level": this._filterFloat(rowsf[i].children[3].innerText) };
} }
ret.FightDedection = fightjson; ret.FightDedection = fightjson;
@ -425,11 +432,32 @@ var Settings = {
} }
crowdjson[id] = { crowdjson[id] = {
"Poly": polyjson, "Poly": polyjson,
"Count": num "Count": num,
"Alias": rowsc[i].children[3].innerText
}; };
} }
ret.CrwodDensity = crowdjson; ret.CrwodDensity = crowdjson;
var rowss = document.getElementById("sensortable").children[1].children;
var sensorjson = {};
for (i = 0; i < rowss.length; i++) {
if (rowss[i].children[0].children.length === 1) {
alert("Bitte zuerst alle Zeilen speichern oder Löschen!");
return;
}
id = rowss[i].children[0].innerText;
coord = rowss[i].children[2].innerHTML.split(";");
sensorjson[id] = {
"Poly": {
"Lat": this._filterFloat(coord[0]),
"Lon": this._filterFloat(coord[1])
},
"Level": this._filterFloat(rowss[i].children[3].innerText),
"Alias": rowss[i].children[1].innerText
};
}
ret.Sensors = sensorjson;
var savesettings = new XMLHttpRequest(); var savesettings = new XMLHttpRequest();
savesettings.onreadystatechange = function () { savesettings.onreadystatechange = function () {
if (savesettings.readyState === 4) { if (savesettings.readyState === 4) {
@ -442,11 +470,32 @@ var Settings = {
}; };
savesettings.open("POST", "/admin/set_json_settings", true); savesettings.open("POST", "/admin/set_json_settings", true);
savesettings.send(JSON.stringify(ret)); savesettings.send(JSON.stringify(ret));
}, },
_renderSensorSettings: function (json) {
var ret = "";
ret += "<table id='sensortable' class='settingstable'>";
ret += "<thead><tr><th width='150'>ID</th><th width='150'>Alias</th><th width='250'>Koordinaten</th><th width='150'>Warn above</th><th width='50'></th></tr></thead>";
ret += "<tbody>";
for (var id in json) {
ret += "<tr>" +
"<td>" + id + "</td>" +
"<td>" + json[id].Alias + "</td>" +
"<td>" + json[id].Poly.Lat + ";" + json[id].Poly.Lon + "</td>" +
"<td>" + json[id].Level + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditSensor(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>" +
"</tr>";
}
ret += "</tbody>";
ret += "<tfoot><tr><td></td><td></td><td></td><td></td><td><img src='../icons/general/add.png' onclick='Settings.AddSensor()' class='pointer'></td></tr></tfoot>";
ret += "</table>";
return ret;
},
_renderFightDedection: function (json) { _renderFightDedection: function (json) {
var ret = ""; var ret = "";
ret += "<table id='fighttable' class='settingstable'>"; ret += "<table id='fighttable' class='settingstable'>";
ret += "<thead><tr><th width='150'>ID</th><th width='250'>Koordinaten</th><th width='50'></th></tr></thead>"; ret += "<thead><tr><th width='150'>ID</th><th width='250'>Koordinaten</th><th width='150'>Alias</th><th width='150'>Alertlimit</th><th width='50'></th></tr></thead>";
ret += "<tbody>"; ret += "<tbody>";
for (var id in json) { for (var id in json) {
var coords = []; var coords = [];
@ -456,18 +505,20 @@ var Settings = {
ret += "<tr>" + ret += "<tr>" +
"<td>" + id + "</td>" + "<td>" + id + "</td>" +
"<td>" + coords.join("<br>") + "</td>" + "<td>" + coords.join("<br>") + "</td>" +
"<td>" + json[id].Alias + "</td>" +
"<td>" + json[id].Level + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditFight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>" + "<td><img src='../icons/general/edit.png' onclick='Settings.EditFight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>" +
"</tr>"; "</tr>";
} }
ret += "</tbody>"; ret += "</tbody>";
ret += "<tfoot><tr><td></td><td></td><td><img src='../icons/general/add.png' onclick='Settings.AddFight()' class='pointer'></td></tr></tfoot>"; ret += "<tfoot><tr><td></td><td></td><td></td><td></td><td><img src='../icons/general/add.png' onclick='Settings.AddFight()' class='pointer'></td></tr></tfoot>";
ret += "</table>"; ret += "</table>";
return ret; return ret;
}, },
_renderCrowdDensity: function (json) { _renderCrowdDensity: function (json) {
var ret = ""; var ret = "";
ret += "<table id='crowdtable' class='settingstable'>"; ret += "<table id='crowdtable' class='settingstable'>";
ret += "<thead><tr><th width='150'>ID</th><th width='200'>Personenanzahl</th><th width='250'>Koordinaten</th><th width='50'></th></tr></thead>"; ret += "<thead><tr><th width='150'>ID</th><th width='200'>Personenanzahl</th><th width='250'>Koordinaten</th><th width='150'>Alias</th><th width='50'></th></tr></thead>";
ret += "<tbody>"; ret += "<tbody>";
for (var id in json) { for (var id in json) {
var coords = []; var coords = [];
@ -478,18 +529,30 @@ var Settings = {
"<td>" + id + "</td>" + "<td>" + id + "</td>" +
"<td>" + json[id].Count + "</td>" + "<td>" + json[id].Count + "</td>" +
"<td>" + coords.join("<br>") + "</td>" + "<td>" + coords.join("<br>") + "</td>" +
"<td>" + json[id].Alias + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditDensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>" + "<td><img src='../icons/general/edit.png' onclick='Settings.EditDensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>" +
"</tr>"; "</tr>";
} }
ret += "</tbody>"; ret += "</tbody>";
ret += "<tfoot><tr><td></td><td></td><td></td><td><img src='../icons/general/add.png' onclick='Settings.AddDensity()' class='pointer'></td></tr></tfoot>"; ret += "<tfoot><tr><td></td><td></td><td></td><td></td><td><img src='../icons/general/add.png' onclick='Settings.AddDensity()' class='pointer'></td></tr></tfoot>";
ret += "</table>"; ret += "</table>";
return ret; return ret;
}, },
AddSensor: function () {
var newrow = document.createElement("tr");
newrow.innerHTML = "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><input style='width: 250px;'/></td>";
newrow.innerHTML += "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowSensor(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
document.getElementById("sensortable").children[1].appendChild(newrow);
},
AddFight: function () { AddFight: function () {
var newrow = document.createElement("tr"); var newrow = document.createElement("tr");
newrow.innerHTML = "<td><input style='width: 145px;'/></td>"; newrow.innerHTML = "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><textarea style='width: 240px;height: 60px;'></textarea></td>"; newrow.innerHTML += "<td><textarea style='width: 240px;height: 60px;'></textarea></td>";
newrow.innerHTML += "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowfight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>"; newrow.innerHTML += "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowfight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
document.getElementById("fighttable").children[1].appendChild(newrow); document.getElementById("fighttable").children[1].appendChild(newrow);
}, },
@ -498,12 +561,36 @@ var Settings = {
newrow.innerHTML = "<td><input style='width: 145px;'/></td>"; newrow.innerHTML = "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><input style='width: 195px;'/></td>"; newrow.innerHTML += "<td><input style='width: 195px;'/></td>";
newrow.innerHTML += "<td><textarea style='width: 240px;height: 60px;'></textarea></td>"; newrow.innerHTML += "<td><textarea style='width: 240px;height: 60px;'></textarea></td>";
newrow.innerHTML += "<td><input style='width: 145px;'/></td>";
newrow.innerHTML += "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowdensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>"; newrow.innerHTML += "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowdensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
document.getElementById("crowdtable").children[1].appendChild(newrow); document.getElementById("crowdtable").children[1].appendChild(newrow);
}, },
Abort: function (el) { Abort: function (el) {
el.parentNode.removeChild(el); el.parentNode.removeChild(el);
}, },
SaveRowSensor: function (el) {
var coords = el.children[2].children[0].value;
var coord = coords.split(";");
var fail = false;
if (coord.length !== 2) {
fail = true;
} else if (isNaN(this._filterFloat(coord[0])) || isNaN(this._filterFloat(coord[1]))) {
fail = true;
}
if (isNaN(this._filterFloat(el.children[3].children[0].value))) {
alert("Die Eingabe des Alertlevel erwartet einen Float");
return;
}
if (fail) {
alert("Die Eingabe der Koordinaten ist nicht Korrekt!\n\nBeispiel:\n50.7;7.8");
return;
}
el.innerHTML = "<td>" + el.children[0].children[0].value + "</td>" +
"<td>" + el.children[1].children[0].value + "</td>" +
"<td>" + coords + "</td>" +
"<td>" + this._filterFloat(el.children[3].children[0].value) + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditSensor(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>";
},
SaveRowfight: function (el) { SaveRowfight: function (el) {
var coords = el.children[1].children[0].value.replace(/\n/gi, "<br>"); var coords = el.children[1].children[0].value.replace(/\n/gi, "<br>");
var coordscheck = coords.split("<br>"); var coordscheck = coords.split("<br>");
@ -519,13 +606,19 @@ var Settings = {
break; break;
} }
} }
if (isNaN(this._filterFloat(el.children[3].children[0].value))) {
alert("Die Eingabe des Alertlevel erwartet einen Float");
return;
}
if (fail) { if (fail) {
alert("Die Eingabe der Koordinaten ist nicht Korrekt!\n\nBeispiel:\n50.7;7.8\n50.6;7.9"); alert("Die Eingabe der Koordinaten ist nicht Korrekt!\n\nBeispiel:\n50.7;7.8\n50.6;7.9");
return; return;
} }
el.innerHTML = "<td>" + el.children[0].children[0].value + "</td>" + el.innerHTML = "<td>" + el.children[0].children[0].value + "</td>" +
"<td>" + coords + "</td>" + "<td>" + coords + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditFight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.DeleteFight(this.parentNode.parentNode)' class='pointer'></td>"; "<td>" + el.children[2].children[0].value + "</td>" +
"<td>" + this._filterFloat(el.children[3].children[0].value) + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditFight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>";
}, },
SaveRowdensity: function (el) { SaveRowdensity: function (el) {
var coords = el.children[2].children[0].value.replace(/\n/gi, "<br>"); var coords = el.children[2].children[0].value.replace(/\n/gi, "<br>");
@ -553,7 +646,8 @@ var Settings = {
el.innerHTML = "<td>" + el.children[0].children[0].value + "</td>" + el.innerHTML = "<td>" + el.children[0].children[0].value + "</td>" +
"<td>" + el.children[1].children[0].value + "</td>" + "<td>" + el.children[1].children[0].value + "</td>" +
"<td>" + coords + "</td>" + "<td>" + coords + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditDensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.DeleteFight(this.parentNode.parentNode)' class='pointer'></td>"; "<td>" + el.children[3].children[0].value + "</td>" +
"<td><img src='../icons/general/edit.png' onclick='Settings.EditDensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Delete(this.parentNode.parentNode)' class='pointer'></td>";
}, },
Delete: function (el) { Delete: function (el) {
var answ = window.prompt("Wollen sie den Eintrag für \"" + el.firstChild.innerHTML + "\" wirklich löschen?", ""); var answ = window.prompt("Wollen sie den Eintrag für \"" + el.firstChild.innerHTML + "\" wirklich löschen?", "");
@ -561,15 +655,25 @@ var Settings = {
el.parentNode.removeChild(el); el.parentNode.removeChild(el);
} }
}, },
EditSensor: function (el) {
el.innerHTML = "<td><input style='width: 145px;' value='" + el.children[0].innerText + "'/></td>" +
"<td><input style='width: 145px;' value='" + el.children[1].innerText + "'/></td>" +
"<td><input style='width: 250px;' value='" + el.children[2].innerText + "'/></td>" +
"<td><input style='width: 145px;' value='" + el.children[3].innerText + "'/></td>" +
"<td><img src='../icons/general/save.png' onclick='Settings.SaveRowSensor(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
},
EditFight: function (el) { EditFight: function (el) {
el.innerHTML = "<td><input style='width: 145px;' value='" + el.children[0].innerText + "'/></td>" + el.innerHTML = "<td><input style='width: 145px;' value='" + el.children[0].innerText + "'/></td>" +
"<td><textarea style='width: 240px;height: 60px;'>" + el.children[1].innerText + "</textarea></td>" + "<td><textarea style='width: 240px;height: 60px;'>" + el.children[1].innerText + "</textarea></td>" +
"<td><input style='width: 145px;' value='" + el.children[2].innerText + "'/></td>" +
"<td><input style='width: 145px;' value='" + el.children[3].innerText + "'/></td>" +
"<td><img src='../icons/general/save.png' onclick='Settings.SaveRowfight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>"; "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowfight(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
}, },
EditDensity: function (el) { EditDensity: function (el) {
el.innerHTML = "<td><input style='width: 145px;' value='" + el.children[0].innerText + "'/></td>" + el.innerHTML = "<td><input style='width: 145px;' value='" + el.children[0].innerText + "'/></td>" +
"<td><input style='width: 195px;' value='" + el.children[1].innerText + "'/></td>" + "<td><input style='width: 195px;' value='" + el.children[1].innerText + "'/></td>" +
"<td><textarea style='width: 240px;height: 60px;'>" + el.children[2].innerText + "</textarea></td>" + "<td><textarea style='width: 240px;height: 60px;'>" + el.children[2].innerText + "</textarea></td>" +
"<td><input style='width: 145px;' value='" + el.children[3].innerText + "'/></td>" +
"<td><img src='../icons/general/save.png' onclick='Settings.SaveRowdensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>"; "<td><img src='../icons/general/save.png' onclick='Settings.SaveRowdensity(this.parentNode.parentNode)' class='pointer'> <img src='../icons/general/remove.png' onclick='Settings.Abort(this.parentNode.parentNode)' class='pointer'></td>";
}, },
_filterFloat: function (value) { _filterFloat: function (value) {
@ -586,7 +690,6 @@ var ExImport = {
html += "<div class='names'>names.json (Namen und Icons)<br/><textarea id='ex_names'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveNames()' class='pointer'></div>"; html += "<div class='names'>names.json (Namen und Icons)<br/><textarea id='ex_names'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveNames()' class='pointer'></div>";
html += "<div class='names'>geo.json (Layer on the MAP) <a href='https://mapbox.github.io/togeojson/'>Kml Konverter</a><br/><textarea id='ex_geo'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveGeo()' class='pointer'></div>"; html += "<div class='names'>geo.json (Layer on the MAP) <a href='https://mapbox.github.io/togeojson/'>Kml Konverter</a><br/><textarea id='ex_geo'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveGeo()' class='pointer'></div>";
html += "<div class='names'>settings.json (Settings of the Map)<br/><textarea id='ex_settings'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveSettings()' class='pointer'></div>"; html += "<div class='names'>settings.json (Settings of the Map)<br/><textarea id='ex_settings'></textarea> <img src='../icons/general/save.png' onclick='ExImport.SaveSettings()' class='pointer'></div>";
html += "</div>"; html += "</div>";
document.getElementById("content").innerHTML = html; document.getElementById("content").innerHTML = html;
document.getElementById("ex_names").value = jsonnames; document.getElementById("ex_names").value = jsonnames;

View File

@ -13,6 +13,7 @@
#bigmap .leaflet-map-pane .leaflet-marker-pane .snumber-icon { #bigmap .leaflet-map-pane .leaflet-marker-pane .snumber-icon {
font-weight: bold; font-weight: bold;
font-size: 5px; font-size: 5px;
white-space: nowrap;
} }
#bigmap .leaflet-map-pane .leaflet-marker-pane .coord-icon { #bigmap .leaflet-map-pane .leaflet-marker-pane .coord-icon {
font-size: 13px; font-size: 13px;
@ -20,6 +21,28 @@
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
} }
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor {
background-color: white;
border: 2px solid black;
padding: 5px;
border-radius: 10px;
}
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor.alert {
border: 2px solid red;
}
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor span {
display: block;
text-align: center;
}
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor .name {
font-weight: bold;
}
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor .wind {
font-size: 18px;
}
#bigmap .leaflet-map-pane .leaflet-marker-pane .mapsensor.alert .wind {
color: red;
}
/* Optional: Makes the sample page fill the window. */ /* Optional: Makes the sample page fill the window. */
html, body { html, body {
@ -324,12 +347,14 @@ object {
font-size: 11px; font-size: 11px;
font-family: "Verdana"; font-family: "Verdana";
padding: 3px; padding: 3px;
display: inline-flex;
} }
#overlays #cameracount .camera { #overlays #cameracount .camera {
background-color: white; background-color: white;
border: rgba(0,0,0,0.3) solid 2px; border: rgba(0,0,0,0.3) solid 2px;
border-radius: 5px; border-radius: 5px;
padding: 4px; padding: 4px;
margin-right: 5px;
} }
#overlays #cameracount .camera span { #overlays #cameracount .camera span {
display: block; display: block;

View File

@ -26,7 +26,7 @@
<h1>Angezeigte Gruppen</h1> <h1>Angezeigte Gruppen</h1>
<select multiple onchange="MarkerObject.ChangeFilter(this);"> <select multiple onchange="MarkerObject.ChangeFilter(this);">
<option value="fw">Feuerwehr</option> <option value="fw">Feuerwehr</option>
<option value="sani">Sanitäter</option> <option value="sani">Rettungsdienst</option>
<option value="pol">Polizei</option> <option value="pol">Polizei</option>
<option value="oa">Ordnungsamt</option> <option value="oa">Ordnungsamt</option>
<option value="si">Sicherheitsdienst</option> <option value="si">Sicherheitsdienst</option>

View File

@ -28,6 +28,7 @@
MarkerObject._ParseAJAXPanic(json["panic"]); MarkerObject._ParseAJAXPanic(json["panic"]);
OverlayObject._ParseAJAXCount(json["cameracount"]); OverlayObject._ParseAJAXCount(json["cameracount"]);
OverlayObject._ParseAJAXDensity(json["crowdcount"]); OverlayObject._ParseAJAXDensity(json["crowdcount"]);
MarkerObject._ParseAJAXSensors(json["sensors"]);
MenuObject._ParseAJAXWeatherAlerts(json["weatherwarnings"]); MenuObject._ParseAJAXWeatherAlerts(json["weatherwarnings"]);
MapObject._ParseAJAXFightDedection(json["fightdedect"]); MapObject._ParseAJAXFightDedection(json["fightdedect"]);
MapObject._ParseAJAXDensity(json["crowdcount"]); MapObject._ParseAJAXDensity(json["crowdcount"]);
@ -44,6 +45,8 @@
MapObject._ParseAJAXLayers(json["getlayer"]); MapObject._ParseAJAXLayers(json["getlayer"]);
MapObject._ParseAJAXGeo(json["getgeo"]); MapObject._ParseAJAXGeo(json["getgeo"]);
MapObject._ParseAJAXSettings(json["startup"]); MapObject._ParseAJAXSettings(json["startup"]);
OverlayObject._ParseAJAXSettings(json["startup"]);
MarkerObject._ParseAJAXSettings(json["startup"]);
} }
}; };
getonce.open("GET", "/getonce", true); getonce.open("GET", "/getonce", true);

View File

@ -58,35 +58,39 @@
_GenerateGrid: function (grid) { _GenerateGrid: function (grid) {
for (var i = 0; i < grid.Major.length; i++) { for (var i = 0; i < grid.Major.length; i++) {
var linemajor = grid.Major[i]; var linemajor = grid.Major[i];
L.polyline([[linemajor.from[0], linemajor.from[1]], [linemajor.to[0], linemajor.to[1]]], { color: "red", weight: 1 }).addTo(this.Map); L.polyline([[linemajor.from[0], linemajor.from[1]], [linemajor.to[0], linemajor.to[1]]], { color: "red", weight: 1, interactive: false }).addTo(this.Map);
} }
for (var j = 0; j < grid.Minor.length; j++) { for (var j = 0; j < grid.Minor.length; j++) {
var lineminor = grid.Minor[j]; var lineminor = grid.Minor[j];
L.polyline([[lineminor.from[0], lineminor.from[1]], [lineminor.to[0], lineminor.to[1]]], { color: "red", weight: 0.7, opacity: 0.5 }).addTo(this.Map); L.polyline([[lineminor.from[0], lineminor.from[1]], [lineminor.to[0], lineminor.to[1]]], { color: "red", weight: 0.7, opacity: 0.5, interactive: false }).addTo(this.Map);
} }
}, },
_GenerateFightBoxes: function (fightdedection) { _GenerateFightBoxes: function (fightdedection) {
for (var cameraid in fightdedection) { for (var cameraid in fightdedection) {
this._FightDedection[cameraid] = L.polygon(fightdedection[cameraid], { color: 'black', weight: 1 }).addTo(this.Map); this._FightDedection[cameraid] = {};
this._FightDedection[cameraid].bindPopup("Fightdedection für Kamera: " + cameraid); this._FightDedection[cameraid].Box = L.polygon(fightdedection[cameraid].Polygon, { color: 'black', weight: 1 }).addTo(this.Map);
this._FightDedection[cameraid].Box.bindPopup("Fightdedection " + fightdedection[cameraid].Alias);
this._FightDedection[cameraid].Level = fightdedection[cameraid].Level;
} }
}, },
_ParseAJAXFightDedection: function (json) { _ParseAJAXFightDedection: function (json) {
for (var cameraid in json) { for (var cameraid in json) {
if (this._FightDedection.hasOwnProperty(cameraid)) { if (this._FightDedection.hasOwnProperty(cameraid)) {
var fight = json[cameraid]; var fight = json[cameraid];
var box = this._FightDedection[cameraid]; var box = this._FightDedection[cameraid].Box;
var diff = FunctionsObject.TimeCalculation(fight["LastUpdate"], "diffraw"); var diff = FunctionsObject.TimeCalculation(fight["LastUpdate"], "diffraw");
if (diff <= 10 && box.options.color === "black") { if (fight["FightProbability"] > this._FightDedection[cameraid].Level) {
box.setStyle({ color: 'rgb(' + fight["FightProbability"] * 255 + ',0,0)' }); if (diff <= 10 && box.options.color === "black") {
} else if (diff <= 10 && box.options.color !== "black") {
if (diff % 2 === 0) {
box.setStyle({ color: 'rgb(' + fight["FightProbability"] * 255 + ',0,0)' }); box.setStyle({ color: 'rgb(' + fight["FightProbability"] * 255 + ',0,0)' });
} else { } else if (diff <= 10 && box.options.color !== "black") {
box.setStyle({ color: 'green' }); if (diff % 2 === 0) {
box.setStyle({ color: 'rgb(' + fight["FightProbability"] * 255 + ',0,0)' });
} else {
box.setStyle({ color: 'green' });
}
} else if (diff > 10 && box.options.color !== "black") {
box.setStyle({ color: 'black' });
} }
} else if (diff > 10 && box.options.color !== "black") {
box.setStyle({ color: 'black' });
} }
} }
} }
@ -138,7 +142,7 @@
if (feature.properties.hasOwnProperty("description")) { if (feature.properties.hasOwnProperty("description")) {
text = text + "<br>" + feature.properties.description; text = text + "<br>" + feature.properties.description;
} }
layer.bindPopup(text); layer.bindPopup(text, { maxWidth: 485 });
} }
}, },
pointToLayer: function (geoJsonPoint, latlng) { pointToLayer: function (geoJsonPoint, latlng) {
@ -148,7 +152,8 @@
className: "snumber-icon", className: "snumber-icon",
html: geoJsonPoint.properties["name"], html: geoJsonPoint.properties["name"],
iconSize: [8, 8] iconSize: [8, 8]
}) }),
interactive: false
}); });
MapObject._SpecialMarkers.push(snumbericon); MapObject._SpecialMarkers.push(snumbericon);
return snumbericon; return snumbericon;
@ -157,7 +162,8 @@
icon: new L.DivIcon({ icon: new L.DivIcon({
className: "coord-icon", className: "coord-icon",
html: geoJsonPoint.properties["name"] html: geoJsonPoint.properties["name"]
}) }),
interactive: false
}); });
MapObject._SpecialMarkers.push(coordicon); MapObject._SpecialMarkers.push(coordicon);
return coordicon; return coordicon;
@ -249,6 +255,7 @@
} }
}); });
} }
MarkerObject.ScaleSensors("zoom");
}); });
}, },
_SetupClickHandler: function () { _SetupClickHandler: function () {

View File

@ -3,6 +3,8 @@
PanicData: {}, PanicData: {},
LocationData: {}, LocationData: {},
VisibleMarkers: {}, VisibleMarkers: {},
_Sensors: {},
_SensorSettings: {},
Start: function () { Start: function () {
return this; return this;
}, },
@ -90,6 +92,60 @@
} }
} }
}, },
_ParseAJAXSensors: function (sensorjson) {
for (var sensorid in sensorjson) {
if (sensorjson.hasOwnProperty(sensorid)) {
if (this._SensorSettings.hasOwnProperty(sensorid)) {
var sensordata = sensorjson[sensorid];
var sensorsettings = this._SensorSettings[sensorid];
if (!this._Sensors.hasOwnProperty(sensorid)) { //Sensor is not drawn until now
var sensor = null;
var sensorIcon = L.divIcon({
className: 'sensoricon',
iconSize: [60, 120],
iconAnchor: [30, 60],
html: '<div class="mapsensor" id="MapSensor_id_' + sensorid + '"><span class="name">' + sensorsettings.Alias + '</span>' +
'<span class="temp">' + sensordata.Temperature + ' °C</span>' +
'<span class="wind">' + sensordata.Windspeed + ' m/s</span>' +
'<span class="hum">' + sensordata.Humidity + ' %rl</span></div>'
});
sensor = L.marker(sensorsettings.Coordinates, { 'title': sensorsettings.Alias, 'icon': sensorIcon, interactive: false });
this._Sensors[sensorid] = sensor.addTo(MapObject.Map);
this.ScaleSensors(document.getElementById('MapSensor_id_' + sensorid));
} else { //Sensor refresh!
document.getElementById('MapSensor_id_' + sensorid).innerHTML = '<span class="name">' + sensorsettings.Alias + '</span>' +
'<span class="temp">' + sensordata.Temperature + ' °C</span>' +
'<span class="wind">' + sensordata.Windspeed + ' m/s</span>' +
'<span class="hum">' + sensordata.Humidity + ' %rl</span>';
}
document.getElementById('MapSensor_id_' + sensorid).className = "mapsensor" + (sensordata.Windspeed > sensorsettings.Level ? ' alert' : '');
}
}
}
},
ScaleSensors: function (el) {
if (el === "zoom") {
for (var sensorid in this._Sensors) {
this.ScaleSensors(document.getElementById('MapSensor_id_' + sensorid));
}
return;
}
var currentZoom = MapObject.Map.getZoom();
var scale = 1;
if (currentZoom < 14) {
scale = 0;
} else if (currentZoom === 14) {
scale = 0.2;
} else if (currentZoom === 15) {
scale = 0.5;
} else if (currentZoom >= 16) {
scale = 1;
}
el.style.cssText = "transform: scale(" + scale + ");";
},
_ParseAJAXSettings: function(json) {
this._SensorSettings = json["Sensors"];
},
ChangeFilter: function (select) { ChangeFilter: function (select) {
this.VisibleMarkers = {}; this.VisibleMarkers = {};
if (select.selectedOptions.length > 0) { if (select.selectedOptions.length > 0) {

View File

@ -203,7 +203,9 @@
if (MapObject.GeoJson.features.length > 0) { if (MapObject.GeoJson.features.length > 0) {
for (var i = 0; i < MapObject.GeoJson.features.length; i++) { for (var i = 0; i < MapObject.GeoJson.features.length; i++) {
var feature = MapObject.GeoJson.features[i]; var feature = MapObject.GeoJson.features[i];
if (feature.properties.name.indexOf(searchtext) !== -1 && feature.geometry.type === "Polygon") { if ((feature.properties.name.toLowerCase().indexOf(searchtext.toLowerCase()) !== -1 ||
(typeof feature.properties.description !== "undefined" && feature.properties.description.toLowerCase().indexOf(searchtext.toLowerCase()) !== -1)) &&
feature.geometry.type === "Polygon") {
if (feature.geometry.coordinates.length > 0 && feature.geometry.coordinates[0].length > 0 && feature.geometry.coordinates[0][0].length > 0) { if (feature.geometry.coordinates.length > 0 && feature.geometry.coordinates[0].length > 0 && feature.geometry.coordinates[0][0].length > 0) {
html += "<div class='result' onclick='MapObject.JumpTo(" + feature.geometry.coordinates[0][0][1] + "," + feature.geometry.coordinates[0][0][0]+");'><span class='text'>" + html += "<div class='result' onclick='MapObject.JumpTo(" + feature.geometry.coordinates[0][0][1] + "," + feature.geometry.coordinates[0][0][0]+");'><span class='text'>" +
"<span class='title'>" + feature.properties.name + "</span>" + "<span class='title'>" + feature.properties.name + "</span>" +

View File

@ -1,4 +1,5 @@
var OverlayObject = { var OverlayObject = {
_DensitySettings: {},
Start: function () { Start: function () {
return this; return this;
}, },
@ -22,14 +23,19 @@
var densystext = ""; var densystext = "";
for (var densyid in cameradensy) { for (var densyid in cameradensy) {
if (cameradensy.hasOwnProperty(densyid)) { if (cameradensy.hasOwnProperty(densyid)) {
var densy = cameradensy[densyid]; if (this._DensitySettings.hasOwnProperty(densyid)) {
var densytext = "<div class='camera'>"; var densy = cameradensy[densyid];
densytext += "<span class='name'>" + densyid + "</span>"; var densytext = "<div class='camera'>";
densytext += "<span class='count'>" + densy["DensityCount"] + "</span>"; densytext += "<span class='name'>" + this._DensitySettings[densyid].Alias + "</span>";
densytext += "</div>"; densytext += "<span class='count'>" + densy["DensityCount"] + "</span>";
densystext += densytext; densytext += "</div>";
densystext += densytext;
}
} }
} }
document.getElementById("crwoddensy").innerHTML = densystext; document.getElementById("crwoddensy").innerHTML = densystext;
},
_ParseAJAXSettings: function (json) {
this._DensitySettings = json["DensityArea"];
} }
}.Start(); }.Start();

View File

@ -1,14 +1,45 @@
# Fraunhofer.Fit.IoT.LoraMap (Lora-Map) # Fraunhofer.Fit.IoT.LoraMap (Lora-Map)
Program that displays items with coordinates from Mqtt on a map <!-- Short description of the project. -->
## Linking to Program that displays items with coordinates from Mqtt on a map. This readme is meant for describing the application.
### Internal
* BlubbFish.Utils ([Utils](http://git.blubbfish.net/vs_utils/Utils)) ![Picture of the Application](Lora-Map.jpg)
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT)) <!-- A teaser figure may be added here. It is best to keep the figure small (<500KB) and in the same repo -->
* BlubbFish.Utils.IoT.Bots ([Bot-Utils](http://git.blubbfish.net/vs_utils/Bot-Utils))
* BlubbFish.Utils.IoT.Connector.Data.Mqtt ([ConnectorDataMqtt](http://git.blubbfish.net/vs_utils/ConnectorDataMqtt)) ## Getting Started
<!-- Instruction to make the project up and running. -->
### External
* litjson The project documentation is available on the [Wiki](https://github.com/MONICA-Project/lora-map/wiki).
* M2Mqtt
* Mono.Posix ## Deployment
<!-- Deployment/Installation instructions. If this is software library, change this section to "Usage" and give usage examples -->
This repository is only for containing the code from Lora-Map. If you want to develop, please goto the [Map-Project](https://github.com/MONICA-Project/map-project). This repository contains all references as github submodules, even this one.
## Development
<!-- Developer instructions. -->
* Versioning: Use [SemVer](http://semver.org/) and tag the repository with full version string. E.g. `v1.0.0`
### Prerequisite
This projects depends on different librarys.
#### Linking to
##### Internal
* BlubbFish.Utils ([Utils](http://git.blubbfish.net/vs_utils/Utils))
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT))
* BlubbFish.Utils.IoT.Bots ([Bot-Utils](http://git.blubbfish.net/vs_utils/Bot-Utils))
* BlubbFish.Utils.IoT.Connector.Data.Mqtt ([ConnectorDataMqtt](http://git.blubbfish.net/vs_utils/ConnectorDataMqtt))
##### External
* litjson
* M2Mqtt
* CordinateSharp
## Contributing
Contributions are welcome.
Please fork, make your changes, and submit a pull request. For major changes, please open an issue first and discuss it with the other authors.
## Affiliation
![MONICA](https://github.com/MONICA-Project/template/raw/master/monica.png)
This work is supported by the European Commission through the [MONICA H2020 PROJECT](https://www.monica-project.eu) under grant agreement No 732350.

BIN
doc/Alert.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

323
doc/Communcation.yml Normal file
View File

@ -0,0 +1,323 @@
asyncapi: 2.0.0
info:
title: Lora-Internal-Flow
version: '1.0.0'
description: |
Internal Communication for:
* Lora-Gateway
* Lora-Map
license:
name: LGPL3
url: http://www.gnu.org/licenses/lgpl-3.0.html
servers:
production:
url: 127.0.0.1:{port}
protocol: mqtt
description: Lora-Broker
security:
- userPassword: []
variables:
port:
description: Secure connection (TLS) is available through port 8883.
default: '1883'
enum:
- '1883'
- '8883'
defaultContentType: application/json
channels:
lora/data/{deviceID}:
description: Topic witch contains the tracking data.
parameters:
deviceID:
$ref: '#/components/parameters/deviceID'
subscribe:
operationId: loradata
message:
$ref: '#/components/messages/loradata'
lora/panic/{deviceID}:
description: Topic witch contains the tracking data, when the panic buttons was pressed
parameters:
deviceID:
$ref: '#/components/parameters/deviceID'
subscribe:
operationId: lorapanic
message:
$ref: '#/components/messages/loradata'
lora/status/{deviceID}:
description: Topic witch contains status of the devices
parameters:
deviceID:
$ref: '#/components/parameters/deviceID'
subscribe:
operationId: lorastatus
message:
$ref: '#/components/messages/lorastatus'
components:
messages:
loradata:
name: trackerData
title: Positionsdata
summary: Informs you about a Position and Status of a Tracker
contentType: application/json
payload:
$ref: "#/components/schemas/loradataPayload"
lorastatus:
name: loraStatus
title: Statusdata
summary: Informs you about a Status of a Tracker
payload:
$ref: "#/components/schemas/lorastausPayload"
schemas:
loradataPayload:
$ref: "#/components/schemas/loradataObject"
lorastausPayload:
$ref: "#/components/schemas/lorastatusObject"
lorastatusObject:
type: object
properties:
Bandwidth:
type: integer
description: Bandwidth on witch the Signal was recieved
minimum: 7800
maximum: 500000
BatteryLevel:
type: number
description: Voltage of the battery from the device
minimum: 2.5
maximum: 5
Calculatedcrc:
type: integer
description: The calculated CRC
Codingrate:
type: integer
description: The Codingrate in witch the Signal was recieved
minimum: 5
maximum: 8
Crcstatus:
type: string
description: Shows the CRC-Status in a Field
enum:
- Ok
- Bad
- No
DeviceStatus:
type: string
description: Shows the internal state in a Field
enum:
- Startup
- Powersave
- Shutdown
Frequency:
type: integer
description: The Frequency on that the Message was arrived
FrequencyOffset:
type: integer
description: The internal offset to the base frequency, to compensate cheap china rf modules
Host:
type: string
description: Name of the Gateway that Recieves the Data
IpAddress:
type: string
description: IP-Address of the device, for debug
default: "0.0.0.0"
format: "[0-9]\\.[0-9]\\.[0-9]\\.[0-9]"
Name:
type: string
description: Name of the GPS-Tracker, must be unique between every Device
format: "/[a-z]{2}/i"
PacketRssi:
type: number
description: Recieve Signal Strength Index for the whole LORA-Messgae
Receivedtime:
type: string
description: Timestamp of the Gateway, when it recieves the LORA-Message
format: dd/mm/YYYY hh:MM:ss
default: 01/01/2019 12:00:00
Recieverinterface:
type: integer
description: Internal virtual Radio of the Gateway, witch recieves the LORA-Messange
Recieverradio:
type: integer
description: Internal Radio of the Gateway, witch recieves the LORA-Messange
Rssi:
type: number
description: Recieve Signal Strength Index for the LORA-Message
Snr:
type: number
description: Signal to Noise Ratio of the LORA-Message
Snrmax:
type: number
description: Maximum Signal to Noise Ratio of the LORA-Message
Snrmin:
type: number
description: Minimum Signal to Noise Ratio of the LORA-Message
Spreadingfactor:
type: integer
description: The Spreadingfactor of the LORA-Message
minimum: 7
maximum: 12
Time:
type: integer
description: Internal Timecounter of the LORA-Reciever
Version:
type: integer
description: Software-Versionsnumber of the Device
WifiActive:
type: boolean
description: Status if the Device successufly connect to a wifi
WifiSsid:
type: string
description: SSID of the WIFI witch the device connects to.
loradataObject:
type: object
required:
- BatteryLevel
- Gps
- Name
- Receivedtime
- Rssi
- Snr
properties:
Bandwidth:
type: integer
description: Bandwidth on witch the Signal was recieved
minimum: 7800
maximum: 500000
BatteryLevel:
type: number
description: Voltage of the battery from the device
minimum: 2.5
maximum: 5
Calculatedcrc:
type: integer
description: The calculated CRC
Codingrate:
type: integer
description: The Codingrate in witch the Signal was recieved
minimum: 5
maximum: 8
Crcstatus:
type: string
description: Shows the CRC-Status in a Field
enum:
- Ok
- Bad
- No
Frequency:
type: integer
description: The Frequency on that the Message was arrived
Gps:
type: object
description: Gps-Data of a Message
required:
- Fix
- Hdop
- Height
- LastGPSPos
- LastLatitude
- LastLongitude
- Latitude
- Longitude
properties:
Fix:
type: boolean
description: Status of the Tracker, true if it has GPS-Signal
Hdop:
type: number
description: Dislocation from GPS-Reciever
minimum: 0.8
maximum: 25
Height:
type: number
description: Height of the GPS-Reciever
LastGPSPos:
type: string
description: Timestamp when the GPS-Reciever has its last position
format: dd/mm/YYYY hh:MM:ss
default: 01/01/2019 12:00:00
LastLatitude:
type: number
description: Last Latitude of the GPS-Reciever
default: 50.7
LastLongitude:
type: number
description: Last Longitude of the GPS-Reciever
default: 7.2
Latitude:
type: number
description: Latitude of the GPS-Reciever
default: 50.7
Longitude:
type: number
description: Longitude of the GPS-Reciever
default: 7.2
Time:
type: string
description: Timestamp of the GPS-Reciever, that it gets from the Satelites
format: dd/mm/YYYY hh:MM:ss
default: 01/01/2019 12:00:00
Host:
type: string
description: Name of the Gateway that Recieves the Data
Name:
type: string
description: Name of the GPS-Tracker, must be unique between every Device
format: "/[a-z]{2}/i"
PacketRssi:
type: number
description: Recieve Signal Strength Index for the whole LORA-Messgae
Receivedtime:
type: string
description: Timestamp of the Gateway, when it recieves the LORA-Message
format: dd/mm/YYYY hh:MM:ss
default: 01/01/2019 12:00:00
Recieverinterface:
type: integer
description: Internal virtual Radio of the Gateway, witch recieves the LORA-Messange
Recieverradio:
type: integer
description: Internal Radio of the Gateway, witch recieves the LORA-Messange
Rssi:
type: number
description: Recieve Signal Strength Index for the LORA-Message
Snr:
type: number
description: Signal to Noise Ratio of the LORA-Message
Snrmax:
type: number
description: Maximum Signal to Noise Ratio of the LORA-Message
Snrmin:
type: number
description: Minimum Signal to Noise Ratio of the LORA-Message
Spreadingfactor:
type: integer
description: The Spreadingfactor of the LORA-Message
minimum: 7
maximum: 12
Time:
type: integer
description: Internal Timecounter of the LORA-Reciever
securitySchemes:
userPassword:
type: userPassword
description: Using Username and Password to connect to online broker
parameters:
deviceID:
description: The ID of the streetlight.
schema:
type: string

1858
doc/Communication.md Normal file

File diff suppressed because it is too large Load Diff

BIN
doc/Details.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

BIN
doc/Empfang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

BIN
doc/Filter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 KiB

BIN
doc/Filter2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

BIN
doc/Filter3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

BIN
doc/Gesamtliste.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
doc/Gesamtliste.psd Normal file

Binary file not shown.

BIN
doc/Global.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

BIN
doc/Global.psd Normal file

Binary file not shown.

BIN
doc/Infos1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

BIN
doc/Infos2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

BIN
doc/Infos3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 KiB

BIN
doc/Infos4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

BIN
doc/Infos5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

BIN
doc/Layer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

BIN
doc/Liste.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

39
doc/README.md Normal file
View File

@ -0,0 +1,39 @@
# Lora-Map
Lora-Map ist eine Karte die GPS-Positionen von Geräten anzeigt.
![Global mit Anmerkungen](Global.png)
## Bedienung
In diesem abschnitt findet sich eine Bedienungsnleitung über alle Funktionen der Karte.
### 1. Zoombuttons
![Zoombuttons](Zoombuttons.png)
Diese Knöpfe werden zum Steuern der Karte verwendet. Dabei kann mit `+` in die Karte hineingezoomt werden und mit `-` aus der Karte herraus.
### 2. Tracker
![Trackerbutton](Tracker.png)
Über diesen Schalter lassen sich Informationen über alle, sowie über einzelne Tracker abrufen.
#### 2.1 Gesamtliste
![Gesamtliste](Gesamtliste.png)
Hier wird eine Übersicht über alle aktiven Tracker angezeigt. Diese können angeklickt werden um Details zu diesen zu sehen [(siehe Abschnitt 2.2)][id_2_2].
##### 2.1.1 Batteriestatus
Der horizontale Balken in `Grün`, `Gelb` oder `Rot` zeigt den Akkuzustand schnell erkenntlich an. Grüne Tracker sind voll, Gelbe etwa halbvoll und Rote sollen geladen werden.
##### 2.1.2 Icon
Hier wird das Icon des Trackers dargestellt.
##### 2.1.3 Name
Hier erscheint der Eingetragene `Name` des Trackers. Dies kann ein Funkrufname oder auch ein anderes Kürzel sein. Die Anzahl der Zeichen ist begrenzt, da dieser Name auch auf der Karte über den Symbolen erscheint.
##### 2.1.4 Akkusymbol
Hier wird in einem 5 Stufensystem der Ladezustand des Trackers angezeigt. Jede Stufe entpricht etwa 3 Stunden und 10 Minuten (Gesamtlaufzeit etwa 16 Stunden.)
##### 2.1.5 GPS-Status
Hier wird dargestellt ob der Tracker bei seinem letzten Empfang ein gültiges GPS-Signal gesendet hat, also selbst Empfang hatte. In Gebäuden oder unter Brücken kann es passieren das der Tracker keinen Empfang mehr hat.
Ebenso ist der Empfang nach dem Einsachalten nicht sofort verfügbar.
##### 2.1.6 Letzer Signalempfang
In dieser Zeile wird die Zeitspanne seit dem letzten Signalempfang über Funk vom Tracker angezeigt. Somit ist ersichtlich wie Aktuell die genannte Posiotion auf der Karte ist.
#### 2.2 Tracker-Detail

BIN
doc/Suche.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

BIN
doc/Tracker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
doc/Wetter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 KiB

BIN
doc/Wettergefahren.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

BIN
doc/Zoombuttons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB