aboutsummaryrefslogtreecommitdiffstats
path: root/compressor.h
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-04-25 21:43:13 -0400
committerSam Anthony <sam@samanthony.xyz>2025-04-25 21:43:13 -0400
commit546e29a6f439146338f320240cab9b3b760eecb7 (patch)
tree7b2954c23f8b49beeeb60f5f12f6a621f52d5b5d /compressor.h
parentca9f301b9467e8fb280fdf11312d168f953c9a84 (diff)
downloadvolute-546e29a6f439146338f320240cab9b3b760eecb7.zip
load compressor map descriptions from toml files
Diffstat (limited to 'compressor.h')
-rw-r--r--compressor.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/compressor.h b/compressor.h
new file mode 100644
index 0000000..3442545
--- /dev/null
+++ b/compressor.h
@@ -0,0 +1,27 @@
+typedef struct {
+ union {
+ MassFlowRate mfr;
+ VolumeFlowRate vfr;
+ } u;
+ enum {
+ MASS_FLOW,
+ VOLUME_FLOW
+ } t;
+} Flow;
+
+typedef struct {
+ int x, y; /* pixel coordinates. */
+ float pr; /* pressure ratio. */
+ Flow flow;
+} Point;
+
+typedef struct {
+ char brand[NAME_MAX+1]; /* e.g. Borgwarner. */
+ char series[NAME_MAX+1]; /* e.g. Airwerks. */
+ char model[NAME_MAX+1]; /* e.g. S200SX-E. */
+ char imgfile[NAME_MAX+1]; /* name of file containing image of the compressor map. */
+ Point origin, ref;
+} Compressor;
+
+
+int load_compressors(Compressor **comps, int *n);