Compare commits

4 Commits

Author SHA1 Message Date
cd77081009 fix name, remove useless stuff from docker-compose, readme 2023-03-10 21:41:48 +01:00
b9a91a59a2 add legal note 2023-03-10 21:30:02 +01:00
561cf13eb8 fml 2023-03-10 21:15:23 +01:00
f9fc7f2490 adjust branch names 2023-03-10 21:08:03 +01:00
4 changed files with 23 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ steps:
settings:
dockerfile: Dockerfile
registry: git.fsisp.de
repo: git.fsisp.de/fionn/isasure-wx
repo: git.fsisp.de/fionn/iassure-wx
username:
from_secret: reg_username
password:
@@ -20,6 +20,7 @@ steps:
trigger:
branch:
- dev
- develop
---
kind: pipeline
@@ -32,7 +33,7 @@ steps:
settings:
dockerfile: Dockerfile
registry: git.fsisp.de
repo: git.fsisp.de/fionn/isasure-wx
repo: git.fsisp.de/fionn/iassure-wx
username:
from_secret: reg_username
password:

View File

@@ -1,7 +1,18 @@
# TypeScript Project Template
# IASsure-WX
## preparation
## idea
```sh
npm install -g eslint eslint-config-airbnb-typescript eslint-plugin-import eslint-plugin-n eslint-plugin-promise
```
This service is designed to gather weather data to be used by [IASsure](https://github.com/MorpheusXAUT/IASsure) by [MorpheusXAT](https://github.com/MorpheusXAUT). It is uses the [Open-Meteo.com](https://open-meteo.com)-API to gather the necessary data to provide to the plugin.
## Installation/Deployment
IASsure-WX can be installed using docker. The image is available at `git.fsisp.de/fionn/iassure`.
Tags:
- `latest` - The newest recommended build, built from `main`
- `dev` - The newest development/staging build, built from `develop`
- Other than those tags, every image is tagged with the git commit id
## Configuration
IASsure-WX can be configured using the `wx-config.json`-file. For now it contains test data but will include production data for at least the Langen FIR. It necessary, another file can be mounted on top of it (`/opt/wx-config.json`). You may also choose to make the necessary changes to the file in this repository. The file is documented in the schema definition file (`wx-config.schema.json`).

View File

@@ -54,6 +54,7 @@ export interface WxData {
info: {
date: string;
datestring: string;
legal: string;
};
data: {
[key: string]: WxFixData;
@@ -80,8 +81,8 @@ export async function getDataAtFix(fix: WxFix, index: number): Promise<WxFixData
for(const [qnh, fl] of Object.entries(qnhLevelMapping)) {
const temp = Number(hourlyData?.[`temperature_${qnh}hPa`]?.[index]) + 273.15;
const dir = hourlyData?.[`windspeed_${qnh}hPa`]?.[index];
const speed = hourlyData?.[`winddirection_${qnh}hPa`]?.[index];
const dir = hourlyData?.[`winddirection_${qnh}hPa`]?.[index];
const speed = hourlyData?.[`windspeed_${qnh}hPa`]?.[index];
data.levels[String(fl)] = {
"T(K)": String(temp),
@@ -103,6 +104,7 @@ export async function generateData() {
info: {
date: now.toISOString(),
datestring: `${now.getUTCDate()}${now.getUTCHours()}`,
legal: "Weather data by Open-Meteo.com (https://open-meteo.com)"
},
data: {}
}

View File

@@ -13,6 +13,3 @@ services:
- '9229:9229/tcp'
volumes:
- .:/opt:delegated
environment:
- MONGO_URI
- PORT=3030