-
Notifications
You must be signed in to change notification settings - Fork 0
/
ETo.cs
30 lines (25 loc) · 837 Bytes
/
ETo.cs
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
namespace Crop_Profile_Console_App
{
class ETo
{
private double pvalue{get;set;}
private double tmean{get;set;}
private string month{get;set;}
public ETo(string location, string cardinalPoint, string month)
{
string[] locationCoordinates=location.Split(',');
int latitude =(int)decimal.Parse(locationCoordinates[0]);
this.month=month;
pValue pvalue =new pValue(latitude,cardinalPoint,month);
this.pvalue=pvalue.GetPValue();
Temperature temperature=new Temperature();
tmean = temperature.GetAvgTemp(location);
}
public double GetETo()
{
double eto;
eto = (pvalue * ((0.46 * tmean) + 8));
return eto;
}
}
}