add fits-header to weather_proxy, fixed something

This commit is contained in:
Edward Emelianov
2026-04-24 23:12:29 +03:00
parent 5acd1cd97d
commit 7b2d93299d
5 changed files with 119 additions and 57 deletions

View File

@@ -3,11 +3,14 @@
#include <stdint.h>
#include <time.h>
#define SHM_NAME "/weather_shm"
#define SEM_NAME "/weather_sem"
typedef enum {
WEATHER_GOOD = 0,
WEATHER_BAD = 1,
WEATHER_TERRIBLE = 2,
WEATHER_PROHIBITED = 3,
WEATHER_GOOD = 0, // may start observations
WEATHER_BAD = 1, // cannot start but can continue if want
WEATHER_TERRIBLE = 2, // close & park: wind, precipitation, humidity etc.
WEATHER_PROHIBITED = 3, // force closing & parking; power off equipment, ready to power off computer
} weather_condition_t;
typedef struct {
@@ -19,7 +22,7 @@ typedef struct {
float pressure; // atm. pressure, mmHg: "PRESSURE"
float humidity; // humidity, percents: "HUMIDITY"
int rain; // ==1 when rainy: "PRECIP"
int prohibited; // ==1 if "weather == prohibited" or rain == 1
int prohibited; // ==1 if "weather == prohibited" or got `prohibited` signal -> ready to power off
time_t last_update; // value of "TMEAS"
} weather_data_t;