diff options
| author | sam-anthony <samanthony6@protonmail.com> | 2022-03-31 20:27:39 -0230 |
|---|---|---|
| committer | sam-anthony <samanthony6@protonmail.com> | 2022-03-31 20:27:39 -0230 |
| commit | 6634b3ff6bcdffbab38a049460ae6ea3cd68944f (patch) | |
| tree | 4cbcb7829060883afe074854a2ffc82b4ab2e31b /compressor | |
| parent | cc0d171c5cd1057693960b7f63aee29e7f70ee8e (diff) | |
| download | volute-6634b3ff6bcdffbab38a049460ae6ea3cd68944f.zip | |
refactor and compressor map image widget
Diffstat (limited to 'compressor')
| -rw-r--r-- | compressor/compressor.go | 45 | ||||
| -rw-r--r-- | compressor/res/GarrettG25660.jpg | bin | 0 -> 833764 bytes |
2 files changed, 45 insertions, 0 deletions
diff --git a/compressor/compressor.go b/compressor/compressor.go new file mode 100644 index 0000000..a3ac4bf --- /dev/null +++ b/compressor/compressor.go @@ -0,0 +1,45 @@ +package compressor + +import ( + "time" + + "github.com/sam-anthony/volute/mass" + "github.com/sam-anthony/volute/util" +) + +type Compressor struct { + FileName string + // MinX is the distance of the y-axis from left of image in pixels. + MinX int + // MinY is the distance of the x-axis from the top of the image in + //pixels. + MinY int + // MaxX is the distance of the end of the graph from the left of the + // image in pixels. + MaxX int + // MaxY is the distance of the top of the graph from the top of the + // image in pixels. + MaxY int + // MaxFlow is the mass flow rate at MaxX. + MaxFlow mass.FlowRate + // MaxPressureRatio is the pressure ratio at MaxY. + MaxPressureRatio float32 +} + +func GarrettG25660() Compressor { + maxFlow, err := mass.NewFlowRate( + mass.Mass{70, mass.Pound}, + time.Minute, + mass.PoundsPerMinute, + ) + util.Check(err) + return Compressor{ + "compressor/res/GarrettG25660.jpg", + 204, + 1885, + 1665, + 25, + maxFlow, + 4.0, + } +} diff --git a/compressor/res/GarrettG25660.jpg b/compressor/res/GarrettG25660.jpg Binary files differnew file mode 100644 index 0000000..aa8d12a --- /dev/null +++ b/compressor/res/GarrettG25660.jpg |