aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/gas.h
blob: ca38a8dc0080760d1145077bd907b92cc4637787 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: MIT-0 */

#ifndef GAS_H
#define GAS_H

#define PO2_MAX_DEFAULT 1.6
#define END_MAX_DEFAULT 4.01325

extern double PO2_MAX;
extern double END_MAX;

#define MOD_AUTO 0

/* types */
typedef struct gas_t {
    unsigned char o2;
    unsigned char he;
    unsigned char n2;
    double mod;
} gas_t;

/* functions */
gas_t gas_new(unsigned char o2, unsigned char he, double mod);
int gas_equal(const gas_t *g1, const gas_t *g2);
unsigned char gas_o2(const gas_t *gas);
unsigned char gas_he(const gas_t *gas);
unsigned char gas_n2(const gas_t *gas);
double gas_mod(const gas_t *gas);

#endif /* end of include guard: GAS_H */