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

View File

@@ -1,7 +1,18 @@
# TypeScript Project Template # IASsure-WX
## preparation ## idea
```sh 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.
npm install -g eslint eslint-config-airbnb-typescript eslint-plugin-import eslint-plugin-n eslint-plugin-promise
``` ## 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: { info: {
date: string; date: string;
datestring: string; datestring: string;
legal: string;
}; };
data: { data: {
[key: string]: WxFixData; [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)) { for(const [qnh, fl] of Object.entries(qnhLevelMapping)) {
const temp = Number(hourlyData?.[`temperature_${qnh}hPa`]?.[index]) + 273.15; const temp = Number(hourlyData?.[`temperature_${qnh}hPa`]?.[index]) + 273.15;
const dir = hourlyData?.[`windspeed_${qnh}hPa`]?.[index]; const dir = hourlyData?.[`winddirection_${qnh}hPa`]?.[index];
const speed = hourlyData?.[`winddirection_${qnh}hPa`]?.[index]; const speed = hourlyData?.[`windspeed_${qnh}hPa`]?.[index];
data.levels[String(fl)] = { data.levels[String(fl)] = {
"T(K)": String(temp), "T(K)": String(temp),
@@ -103,6 +104,7 @@ export async function generateData() {
info: { info: {
date: now.toISOString(), date: now.toISOString(),
datestring: `${now.getUTCDate()}${now.getUTCHours()}`, datestring: `${now.getUTCDate()}${now.getUTCHours()}`,
legal: "Weather data by Open-Meteo.com (https://open-meteo.com)"
}, },
data: {} data: {}
} }

View File

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