Esempio n. 1
0
  @Override
  public SeachemDosage[] calculateDosage() {
    double volume = this.parameters[0].getValue();
    double current = this.parameters[1].getValue();
    double desired = this.parameters[2].getValue();

    double doseB = (desired - current) * (volume * 0.250000);
    double doseA = doseB / Constants.CapmL;
    doseA = MathUtils.round(doseA * 10) / 10;
    doseB = MathUtils.round(doseB * 10) / 10;

    return new SeachemDosage[] {new SeachemDosage("Caps", doseA), new SeachemDosage("mL", doseB)};
  }
Esempio n. 2
0
  @Override
  public SeachemDosage[] calculateDosage() {
    double volume = this.parameters[0].getValue();
    double current = this.parameters[1].getValue();
    double desired = this.parameters[2].getValue();

    double doseB = (desired - current) * 3.500000 * (volume / 10);
    double doseA = doseB / 7;
    doseA = MathUtils.round(doseA * 10) / 10;
    doseB = MathUtils.round(doseB * 10) / 10;

    return new SeachemDosage[] {
      new SeachemDosage("Tspns", doseA), new SeachemDosage("Grams", doseB)
    };
  }