aboutsummaryrefslogtreecommitdiffstats
path: root/compressor.h
blob: e3944507300e39771cebdbfc2268e10e49b80187 (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
typedef enum {
	MASS_FLOW,
	VOLUME_FLOW,
} FlowType;

typedef struct {
	union {
		MassFlowRate mfr;
		VolumeFlowRate vfr;
	} u;
	FlowType 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);