Constants.java [src/java/util] Revision: default  Date:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
public class Constants {

  public static DecimalFormat df3 = new DecimalFormat("0.0##");
  public static DecimalFormat df1 = new DecimalFormat("0.#");
  public static DecimalFormat df1_0 = new DecimalFormat("0.0");
  public static DecimalFormat df4_0 = new DecimalFormat("0.0000");

  /*
    Corn:  grams/square meter C to corn bushels per acre:  cgracc value * 0.41652
    Factor:  8.92179 / 0.45 / (56 * 0.85) = 0.41652

    Soybean:  cgracc value * 0.37982 bu/acre
    Factor:  8.92179 / 0.45 / (60 * 0.87) = 0.37982

    Wheat:  cgracc value * 0.38200  bu/acre
    Factor:  8.92179 / 0.45 / (60 * 0.865) = 0.38200

    Oats:  cgracc value * 0.72043 bu/acre
    Factor:  8.92179 / 0.45 / (32 * 0.86) = 0.72043

    Sorghum:  cgracc value * 0.40694 bu/ac
    Factor:  8.92179 / 0.45 / (56 * 0.87) = 0.38200

    Alfalfa Hay:  cgracc value * 0. 0051275 tons/acre 
    Factor:  0.0044609 / 0.87 = 0.0051275

    Corn Silage:  cgracc value * 0. 0118957 tons/acre 
    Factor:  0.0044609 / 0.375 = 0.0118957
   */
  static final Map<String, Double> yieldConv = new HashMap<String, Double>() {
    {
      yieldConv.put("C1", 0.41652);
      yieldConv.put("C3", 0.41652);
      yieldConv.put("C5", 0.41652);
      yieldConv.put("C7", 0.41652);
      yieldConv.put("C9", 0.41652);
      yieldConv.put("C10", 0.41652);
      yieldConv.put("C11", 0.41652);
      yieldConv.put("C12", 0.41652);
      yieldConv.put("C13", 0.41652);
      yieldConv.put("SYBN1", 0.37982);
      yieldConv.put("SYBN2", 0.37982);
      yieldConv.put("SYBN3", 0.37982);
      yieldConv.put("SYBN4", 0.37982);
      yieldConv.put("OAT1", 0.72043);
    }
  };

}