-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyPsychro.m
executable file
·124 lines (101 loc) · 1.64 KB
/
MyPsychro.m
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#import "MyPsychro.h"
#import <stdio.h>
@implementation MyPsychro
-(void) print1
{
printf( "%4.2f\n", drybulbtemp);
}
-(void) print2
{
printf( "%4.2f\n", dewpointtemp);
//printf( "%4.2f\n", relhumidity);
}
-(void) setDryBulbTemp: (double) t
{
drybulbtemp = t;
}
-(void) setFlag: (int) f setPressure: (double) p andWetBulbTemp: (double) w
{
flag = f;
pressure = p;
wetbulbtemp = w;
}
-(void) setFlag: (int) f setPressure: (double) p andDewPointTemp: (double) d
{
flag = f;
pressure = p;
dewpointtemp = d;
}
-(void) setFlag: (int) f setPressure: (double) p andRelHumidity: (double) r
{
flag = f;
pressure = p;
relhumidity = r;
}
-(void) setFlag: (int) f setAltitude: (double) a andWetBulbTemp: (double) w
{
flag = f;
altitude = a;
wetbulbtemp = w;
}
-(void) setFlag: (int) f setAltitude: (double) a andDewPointTemp: (double) d
{
flag = f;
altitude = a;
dewpointtemp = d;
}
-(void) setFlag: (int) f setAltitude: (double) a andRelHumidity: (double) r
{
flag = f;
altitude = a;
relhumidity = r;
}
-(int) flag
{
return flag;
}
-(double) drybulbtemp
{
return drybulbtemp;
}
-(double) wetbulbtemp
{
return wetbulbtemp;
}
-(double) dewpointtemp
{
return dewpointtemp;
}
-(double) relhumidity
{
return relhumidity;
}
-(double) pressure
{
return pressure;
}
-(double) altitude
{
return altitude;
}
-(double) humratio
{
return humratio;
}
-(double) specvol
{
return specvol;
}
-(double) degreeofsat
{
return degreeofsat;
}
-(double) enthalpy
{
return enthalpy;
}
-(double) vappress
{
return vappress;
}
@end