Skip to content

Commit

Permalink
Merge pull request #7 from EPICSGroup/Evan
Browse files Browse the repository at this point in the history
Evan
  • Loading branch information
will2312 authored Mar 11, 2021
2 parents 42a967f + 625faf5 commit ed466d7
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 0 deletions.
82 changes: 82 additions & 0 deletions app/src/main/java/com/sf/stormwaterutilityandroid/HEI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package com.sf.stormwaterutilityandroid;

public class HEI {
//by default, all values are set to be 0
private double QHEI_substrate_size = 0;
private double QHEI_smothering = 0;
private double QHEI_silting = 0;
private double QHEI_rootwads = 0;
private double QHEI_overhanging_veg = 0;
private double QHEI_oxbowsblack_waters = 0;
private double QHEI_downed_treeslogs = 0;
private double QHEI_shallows = 0;
private double QHEI_water_plants = 0;
private double QHEI_deep_pools = 0;
private double QHEI_logswoody_debris = 0;
private double QHEI_boulders = 0;
private double QHEI_undercut_banks = 0;
private double QHEI_sinuosity = 0;
private double QHEI_natural = 0;
private double QHEI_riparian_width = 0;
private double QHEI_land_use = 0;
private double QHEI_bank_erosion = 0;
private double QHEI_stream_shading = 0;
private double QHEI_deepest_pool = 0;
private double QHEI_velocity = 0;
private double QHEI_rifflerun_depth = 0;
private double QHEI_rifflerun_substrate = 0;

//constructor
HEI(double QHEI_substrate_size, double QHEI_smothering, double QHEI_silting, double QHEI_rootwads, double QHEI_overhanging_veg,
double QHEI_oxbowsblack_waters, double QHEI_downed_treeslogs, double QHEI_shallows, double QHEI_water_plants, double QHEI_logswoody_debris,
double QHEI_boulders, double QHEI_undercut_banks, double QHEI_sinuosity, double QHEI_natural, double QHEI_riparian_width,
double QHEI_land_use, double QHEI_bank_erosion, double QHEI_stream_shading, double QHEI_deepest_pool, double QHEI_velocity,
double QHEI_rifflerun_depth, double QHEI_rifflerun_substrate, double QHEI_deep_pools) {

this.QHEI_substrate_size = QHEI_substrate_size;
this.QHEI_smothering = QHEI_smothering;
this.QHEI_silting = QHEI_silting;
this.QHEI_rootwads = QHEI_rootwads;
this.QHEI_overhanging_veg = QHEI_overhanging_veg;
this.QHEI_oxbowsblack_waters = QHEI_oxbowsblack_waters;
this.QHEI_downed_treeslogs = QHEI_downed_treeslogs;
this.QHEI_shallows = QHEI_shallows;
this.QHEI_water_plants = QHEI_water_plants;
this.QHEI_logswoody_debris = QHEI_logswoody_debris;
this.QHEI_boulders = QHEI_boulders;
this.QHEI_undercut_banks = QHEI_undercut_banks;
this.QHEI_sinuosity = QHEI_sinuosity;
this.QHEI_natural = QHEI_natural;
this.QHEI_riparian_width = QHEI_riparian_width;
this.QHEI_land_use = QHEI_land_use;
this.QHEI_bank_erosion = QHEI_bank_erosion;
this.QHEI_stream_shading = QHEI_stream_shading;
this.QHEI_deepest_pool = QHEI_deepest_pool;
this.QHEI_velocity = QHEI_velocity;
this.QHEI_rifflerun_depth = QHEI_rifflerun_depth;
this.QHEI_rifflerun_substrate = QHEI_rifflerun_substrate;
this.QHEI_deep_pools = QHEI_deep_pools;
}

public double calculate_HEI() {
return QHEI_substrate_size + QHEI_smothering + QHEI_silting + QHEI_rootwads + QHEI_overhanging_veg +
QHEI_oxbowsblack_waters + QHEI_downed_treeslogs + QHEI_shallows + QHEI_water_plants + QHEI_deep_pools +
QHEI_logswoody_debris + QHEI_boulders + QHEI_undercut_banks + 2 * (QHEI_sinuosity + QHEI_natural) +
QHEI_riparian_width + QHEI_land_use + QHEI_bank_erosion + QHEI_stream_shading + QHEI_deepest_pool +
QHEI_velocity + QHEI_rifflerun_depth + QHEI_rifflerun_substrate;
}

public static double get_HEI(double QHEI_substrate_size, double QHEI_smothering, double QHEI_silting, double QHEI_rootwads, double QHEI_overhanging_veg,
double QHEI_oxbowsblack_waters, double QHEI_downed_treeslogs, double QHEI_shallows, double QHEI_water_plants, double QHEI_logswoody_debris,
double QHEI_boulders, double QHEI_undercut_banks, double QHEI_sinuosity, double QHEI_natural, double QHEI_riparian_width,
double QHEI_land_use, double QHEI_bank_erosion, double QHEI_stream_shading, double QHEI_deepest_pool, double QHEI_velocity,
double QHEI_rifflerun_depth, double QHEI_rifflerun_substrate, double QHEI_deep_pools)
{
return QHEI_substrate_size + QHEI_smothering + QHEI_silting + QHEI_rootwads + QHEI_overhanging_veg +
QHEI_oxbowsblack_waters + QHEI_downed_treeslogs + QHEI_shallows + QHEI_water_plants + QHEI_deep_pools +
QHEI_logswoody_debris + QHEI_boulders + QHEI_undercut_banks + 2 * (QHEI_sinuosity + QHEI_natural) +
QHEI_riparian_width + QHEI_land_use + QHEI_bank_erosion + QHEI_stream_shading + QHEI_deepest_pool +
QHEI_velocity + QHEI_rifflerun_depth + QHEI_rifflerun_substrate;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.sf.stormwaterutilityandroid.WaterWay;

public class PTI {
private double BM_intolerant = 0;
private double BM_moderately_tolerant = 0;
private double BM_fairly_tolerant = 0;
private double BM_very_tolerant = 0;

PTI(double BM_intolerant, double BM_moderately_tolerant, double BM_fairly_tolerant, double BM_very_tolerant) {
this.BM_intolerant = BM_intolerant;
this.BM_moderately_tolerant = BM_moderately_tolerant;
this.BM_fairly_tolerant = BM_fairly_tolerant;
this.BM_very_tolerant = BM_very_tolerant;
}

public void setBM_intolerant(double value) {
BM_intolerant = value;
}

public void setBM_moderately_tolerant(double value) {
BM_moderately_tolerant = value;
}

public void setBM_fairly_tolerant(double value) {
BM_fairly_tolerant = value;
}

public void setBM_very_tolerant(double value) {
BM_very_tolerant = value;
}

public double calculatePTI() {
return 4.0 * BM_intolerant + 3.0 * BM_moderately_tolerant + 2.0 * BM_fairly_tolerant + 1.0 * BM_very_tolerant;
}

public static double getPTI(double intolerant, double moderate, double fairly, double very) {
return 4.0 * intolerant + 3.0 * moderate + 2.0 * fairly + 1.0 * very;
}
}
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 ed466d7

Please sign in to comment.