Skip to content

Commit

Permalink
added WQI
Browse files Browse the repository at this point in the history
  • Loading branch information
will2312 committed Mar 11, 2021
1 parent 30cf392 commit 625faf5
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.sf.stormwaterutilityandroid.WaterWay;

public class WQI {
private double CT_temperature_change = 0;
private double CT_turbidity = 0;
private double CT_pH = 0;
private double CT_nitrate = 0;
private double CT_total_phosphate = 0;
private double CT_dissolved_oxygen = 0;

WQI(double CT_temperature_change, double CT_turbidity, double CT_pH, double CT_nitrate, double CT_total_phosphate,
double CT_dissolved_oxygen) {
this.CT_temperature_change = CT_temperature_change;
this.CT_turbidity = CT_turbidity;
this.CT_pH = CT_pH;
this.CT_nitrate = CT_nitrate;
this.CT_total_phosphate = CT_total_phosphate;
this.CT_dissolved_oxygen = CT_dissolved_oxygen;
}

public double calculateWQI() {
double WQIScore = CT_temperature_change * 0.11 + CT_turbidity * 0.09 + CT_pH * 0.12 + CT_nitrate * 0.1 +
CT_total_phosphate * 0.11 + CT_dissolved_oxygen * 0.18;

return WQIScore;
}

public static double getWQI(double tempChange, double turbidity, double pH, double nitrate, double phosphate, double oxygen) {
return tempChange * 0.11 + turbidity * 0.09 + pH * 0.12 + nitrate * 0.1 + phosphate * 0.11 + oxygen * 0.18;
}
}

0 comments on commit 625faf5

Please sign in to comment.