-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
app/src/main/java/com/sf/stormwaterutilityandroid/WQI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
package com.sf.stormwaterutilityandroid; | ||
|
||
public class WQI { | ||
private double QHEI_substrate_size; | ||
private double QHEI_smothering; | ||
private double QHEI_silting; | ||
private double QHEI_rootwads; | ||
private double QHEI_overhanging_veg; | ||
private double QHEI_oxbowsblack_waters; | ||
private double QHEI_downed_treeslogs; | ||
private double QHEI_shallows; | ||
private double QHEI_water_plants; | ||
private double QHEI_deep_pools; | ||
private double QHEI_logswoody_debris; | ||
private double QHEI_boulders; | ||
private double QHEI_undercut_banks; | ||
private double QHEI_sinuosity; | ||
private double QHEI_natural; | ||
private double QHEI_riparian_width; | ||
private double QHEI_land_use; | ||
private double QHEI_bank_erosion; | ||
private double QHEI_stream_shading; | ||
private double QHEI_deepest_pool; | ||
private double QHEI_velocity; | ||
private double QHEI_rifflerun_depth; | ||
private double QHEI_rifflerun_substrate; | ||
|
||
//constructor | ||
WQI(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; | ||
} | ||
|
||
WQI() | ||
{ | ||
QHEI_substrate_size = 0; | ||
QHEI_smothering = 0; | ||
QHEI_silting = 0; | ||
QHEI_rootwads = 0; | ||
QHEI_overhanging_veg = 0; | ||
QHEI_oxbowsblack_waters = 0; | ||
QHEI_downed_treeslogs = 0; | ||
QHEI_shallows = 0; | ||
QHEI_water_plants = 0; | ||
QHEI_deep_pools = 0; | ||
QHEI_logswoody_debris = 0; | ||
QHEI_boulders = 0; | ||
QHEI_undercut_banks = 0; | ||
QHEI_sinuosity = 0; | ||
QHEI_natural = 0; | ||
QHEI_riparian_width = 0; | ||
QHEI_land_use = 0; | ||
QHEI_bank_erosion = 0; | ||
QHEI_stream_shading = 0; | ||
QHEI_deepest_pool = 0; | ||
QHEI_velocity = 0; | ||
QHEI_rifflerun_depth = 0; | ||
QHEI_rifflerun_substrate = 0; | ||
} | ||
|
||
public double calculate_WQI() { | ||
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_WQI(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; | ||
} | ||
|
||
} |