Created
April 12, 2018 23:55
-
-
Save mattswann/30cbe3b9bc1cd746ad103759a2819117 to your computer and use it in GitHub Desktop.
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
$ = jQuery, jQuery(function(){ | |
$(document).ready(function() { | |
console.log( "ready!" ); | |
}); | |
$('#calculate_form').submit(function(e){ | |
e.preventDefault(); | |
var calcInput = { }; | |
$.each($('#calculate_form').serializeArray(), function (){ | |
calcInput[this.name] = this.value; | |
}); | |
//Send values as email to admin | |
var ajaxscript = { ajax_url : 'https://kelly.test/wp-admin/admin-ajax.php' } | |
var data = calcInput; | |
$.ajax({ | |
url : ajaxscript.ajax_url, | |
data : calcInput, | |
method : 'POST', | |
success : function( response ){ console.log(response) | |
}, | |
error : function(error){ console.log(error) | |
} | |
}) | |
// The Maths | |
if (calcInput["fuel_cons"] === ""){ | |
var fuel_cons = parseInt(calcInput["tractor_hp"]) / 5; | |
} else { | |
var fuel_cons = parseInt(calcInput["fuel_cons"]) | |
}; | |
var farm_size = parseInt(calcInput["crop_H_sown_wheat"]) + parseInt(calcInput["crop_H_sown_barley"]) + parseInt(calcInput["crop_H_sown_peas"]) + parseInt(calcInput["crop_H_sown_maize"]); | |
var kelly_modelChainLength = {6: 17, 30: 28.9, 40: 37.3, 45: 39.9, 46: 42, 62: 52.8, 80: 73.5}; | |
var chainPricePerM = {CL2: 150, CL1: 567.75, R300: 482.25, W36: 330, SD49: 535.5, StdPrickle: 131.25}; | |
var currencies = {AUD: 1, EURO: 0.67, GBP: 0.58, NZD: 1.1, USD: 0.75, ZAR: 10.8}; | |
var exchangeRate = parseFloat(currencies[calcInput["currency"]]); | |
if (calcInput["custom_exchange"] > 0) { | |
exchangeRate = parseFloat(calcInput["custom_exchange"]); | |
} else { | |
exchangeRate = parseFloat(currencies[calcInput["currency"]]); | |
}; | |
var tool_replacement = kelly_modelChainLength[calcInput["kelly_model"]] * chainPricePerM[calcInput["chain"]]; | |
var soil_factor = [{soil: "clay", load: 1.2, abrasion: 1.1},{soil: "loam", load: 1, abrasion: 1}, {soil: "sand", load: 1.1, abrasion: 1.3}]; | |
for (var i = 0; i < soil_factor.length; i++) { | |
if (soil_factor[i]["soil"] == calcInput["soil"]){ | |
var abrasion = soil_factor[i]["abrasion"]; | |
var soil_load = soil_factor[i]["load"]; | |
}; | |
}; | |
var speed_effect = {8: 0.9, 9: 0.95, 10: 1, 11: 1.05, 12: 1.1, 13: 1.15, 14: 1.2, 15: 1.25, 16: 1.3}; | |
var wear_life = {CL2: 400, CL1: 2000, R300: 1500, W36: 2000, SD49: 1500, StdPrickle: 1500}; | |
var load_weight = {CL2: 1.8, CL1: 1, R300: 0.9, W36: 0.8, SD49: 0.5, StdPrickle: 0.3}; | |
var width_factor = {6: 6, 30: 9, 40: 12, 45: 13, 46: 14.2, 62: 18.5, 80: 24.5} | |
var wear_factor = abrasion * soil_load * speed_effect[calcInput["speed"]]; | |
if (calcInput["productive"] < 0){ | |
productive = 85; | |
} else { | |
productive = calcInput["productive"] | |
}; | |
var productive_factor = ((width_factor[calcInput["kelly_model"]] / 1000) * calcInput["speed"]) * productive; | |
var longevity_factor = (wear_life[calcInput["chain"]] / wear_factor); | |
var longevity = longevity_factor * productive_factor; | |
var longevity_rounded = Math.round(longevity/1000)*1000; | |
var fuelPerHa = fuel_cons * calcInput["fuel"] / productive_factor; | |
var labour_cost_ph = calcInput["labour"] / productive_factor; | |
var kelly_cost_ph = (tool_replacement / longevity_rounded ) + parseInt(fuelPerHa) + parseInt(labour_cost_ph); | |
var cost_kelly_pass = kelly_cost_ph * farm_size; | |
var total_sown = parseInt(calcInput["crop_H_sown_wheat"]) + parseInt(calcInput["crop_H_sown_barley"]) + parseInt(calcInput["crop_H_sown_peas"]) + parseInt(calcInput["crop_H_sown_maize"]); | |
var total_passes = parseInt(calcInput["fall_pass_wheat"]) + parseInt(calcInput["fall_pass_barley"]) + parseInt(calcInput["fall_pass_peas"]) + parseInt(calcInput["fall_pass_maize"]) + parseInt(calcInput["spring_pass_wheat"]) + parseInt(calcInput["spring_pass_barley"]) + parseInt(calcInput["spring_pass_peas"]) + parseInt(calcInput["spring_pass_maize"]); | |
var kelly_ha_per_crop = total_sown; | |
var lifespan = longevity_factor / (kelly_ha_per_crop / productive_factor) | |
var load_factor = (17 * load_weight[calcInput["chain"]] * parseInt(soil_load) * speed_effect[calcInput["speed"]]); | |
var working_width = {6: 6, 9: 30, 12: 40, 13: 45, 14.2: 46, 18.5: 62, 24.5: 90}; | |
var calc_width = parseInt(calcInput["tractor_hp"]) / load_factor; | |
var maxKey = -1; | |
for (var key in working_width) { | |
if (maxKey < 0 || key < calc_width){ | |
maxKey = Math.max(maxKey, key); | |
} | |
}; | |
var planter_prod = ((calcInput["planter"] * 5280) / 43560) * calcInput["planter_speed"]; | |
var inc_planter_prod = ((calcInput["planter"] * 5280) / 43560) * calcInput["increase"]; | |
var new_prod = planter_prod + inc_planter_prod; | |
var to_keep_up = (10000 * new_prod) / (1000 * calcInput["speed"]) | |
var to_keep_up_rounded = Math.round(to_keep_up/10)*10; | |
var maxKeep = -1; | |
for (var key in working_width) { | |
if (maxKeep < 0 || key < to_keep_up_rounded){ | |
maxKeep = Math.max(maxKeep, key); | |
} | |
}; | |
//planter | |
planter_result = ((calcInput["planter"] * 5280) / 43560) * calcInput["planter_speed"]; | |
var planter_result = planter_result.toFixed(1); | |
planter_increase_result = ((calcInput["planter"] * 5280) / 43560) * calcInput["increase"]; | |
var planter_increase_result = planter_increase_result.toFixed(1); | |
planter_imporve_result = parseInt(planter_result) + parseInt(planter_increase_result); | |
var planter_imporve_result = planter_imporve_result.toFixed(1); | |
date1 = calcInput["start_planting"].split('-'); | |
date2 = calcInput["start_harvest"].split('-'); | |
date1 = new Date(date1[0], date1[1], date1[2]); | |
date2 = new Date(date2[0], date2[1], date2[2]); | |
date1_unixtime = parseInt(date1.getTime() / 1000); | |
date2_unixtime = parseInt(date2.getTime() / 1000); | |
var timeDifference = date2_unixtime - date1_unixtime; | |
var timeDifferenceInHours = timeDifference / 60 / 60; | |
var growing_result = timeDifferenceInHours / 24; | |
var growing_result = growing_result.toFixed(1); | |
var increase_growing_result = calcInput["enter_field"] / growing_result * 100; | |
var increase_growing_result = increase_growing_result.toFixed(1); | |
var increase_production_result = 0.5 * calcInput["improvement"]; | |
//Sprayer | |
var glypho_cost = calcInput["glypho"] * calcInput["glypho_rate"] + 12.5; | |
var glypho_cost_d = accounting.formatMoney(glypho_cost); | |
var cost_one_pass = glypho_cost * farm_size; | |
var cost_one_pass_d = accounting.formatMoney(cost_one_pass); | |
var cost_kelly_pass = parseInt(kelly_cost_ph) * farm_size; | |
var cost_kelly_pass_d = accounting.formatMoney(cost_kelly_pass * exchangeRate); | |
var weed_kill_sub = parseInt(cost_one_pass) - parseInt(cost_kelly_pass); | |
var weed_kill_sub_d = accounting.formatMoney(weed_kill_sub * exchangeRate); | |
//Tool wear | |
var tool_type = calcInput["chain"]; | |
var tool_ha_yr = farm_size; | |
var tool_life = longevity_rounded; | |
var tool_rep_yrs = lifespan; | |
var tool_rep_cost = tool_replacement; | |
var tool_rep_cost_d = accounting.formatMoney(tool_rep_cost); | |
var tool_cost_pa = tool_replacement / lifespan; | |
var tool_cost_pa_d = accounting.formatMoney(tool_cost_pa); | |
//Yield Data | |
var calc_increase = calcInput["enter_field"] / growing_result; | |
var calc_increase_adj = (calc_increase * 100).toFixed(1); | |
var std_increase = calcInput["improvement"] * 0.5; | |
var std_increase = std_increase.toFixed(1); | |
var rev_yield_wheat = (calcInput["yield_wheat"] * (0.5 * (std_increase / 100) + 1 )) + (calcInput["yield_wheat"] * calc_increase); | |
var rev_yield_wheat = rev_yield_wheat.toFixed(2) | |
var rev_yield_barley = (calcInput["yield_barley"] * (0.5 * (std_increase / 100) + 1 )) + (calcInput["yield_barley"] * calc_increase); | |
var rev_yield_barley = rev_yield_barley.toFixed(2) | |
var rev_yield_peas = (calcInput["yield_peas"] * (0.5 * (std_increase / 100) + 1 )) + (calcInput["yield_peas"] * calc_increase); | |
var rev_yield_peas = rev_yield_peas.toFixed(2) | |
var rev_yield_maize = (calcInput["yield_maize"] * (0.5 * (std_increase / 100) + 1 )) + (calcInput["yield_maize"] * calc_increase); | |
var rev_yield_maize = rev_yield_maize.toFixed(2) | |
var inc_yield_wheat = (rev_yield_wheat - calcInput["yield_wheat"]) * calcInput["commodity_price_wheat"] / 1000; | |
var inc_yield_wheat_d = accounting.formatMoney(inc_yield_wheat.toFixed(2)); | |
var inc_yield_barley = (rev_yield_barley - calcInput["yield_barley"]) * calcInput["commodity_price_barley"] / 1000; | |
var inc_yield_barley_d = accounting.formatMoney(inc_yield_barley.toFixed(2)); | |
var inc_yield_peas = (rev_yield_peas - calcInput["yield_peas"]) * calcInput["commodity_price_peas"] / 1000; | |
var inc_yield_peas_d = accounting.formatMoney(inc_yield_peas.toFixed(2)); | |
var inc_yield_maize = (rev_yield_maize - calcInput["yield_maize"]) * calcInput["commodity_price_maize"] / 1000; | |
var inc_yield_maize_d = accounting.formatMoney(inc_yield_maize.toFixed(2)); | |
var gross_val_wheat = inc_yield_wheat * calcInput["crop_H_sown_wheat"]; | |
var gross_val_wheat_d = accounting.formatMoney(gross_val_wheat); | |
var gross_val_barley = inc_yield_barley * calcInput["crop_H_sown_barley"]; | |
var gross_val_barley_d = accounting.formatMoney(gross_val_barley); | |
var gross_val_peas = inc_yield_peas * calcInput["crop_H_sown_peas"]; | |
var gross_val_peas_d = accounting.formatMoney(gross_val_peas); | |
var gross_val_maize = inc_yield_maize * calcInput["crop_H_sown_maize"]; | |
var gross_val_maize_d = accounting.formatMoney(gross_val_maize); | |
var sum_of = parseInt(gross_val_wheat) + parseInt(gross_val_barley) + parseInt(gross_val_peas) + parseInt(gross_val_maize); | |
var sum_of_d = accounting.formatMoney(sum_of); | |
//model specs | |
var mod = calcInput["kelly_model"]; | |
var hp_reco = (17 * load_weight[calcInput["chain"]] * parseInt(soil_load) * speed_effect[calcInput["speed"]]) * width_factor[calcInput["kelly_model"]]; | |
var kelly_prod = productive_factor; | |
var fuel_cost_ph = fuel_cons * calcInput["fuel"] / productive_factor; | |
var fuel_cost_ph = accounting.formatMoney(fuel_cost_ph); | |
var labour_cost_ph = accounting.formatMoney(labour_cost_ph); | |
var total_cost_ph = kelly_cost_ph; | |
var total_cost_ph = accounting.formatMoney(total_cost_ph); | |
var farm_size = farm_size; | |
var area_worked = kelly_ha_per_crop; | |
var total_mach_cost = kelly_cost_ph * kelly_ha_per_crop; | |
var total_mach_cost = accounting.formatMoney(total_mach_cost * exchangeRate); | |
//Recomandations | |
var rec_model = parseInt(calcInput["tractor_hp"]); | |
var could_manage = working_width[maxKey]; | |
var effective_w = working_width[maxKey]; | |
var ahead_mod = working_width[maxKeep]; | |
return $("#planter_result").html(planter_result), | |
$("#planter_increase_result").html(planter_increase_result + "%"), | |
$("#planter_imporve_result").html(planter_imporve_result), | |
$("#growing_result").html(growing_result), | |
$("#increase_growing_result").html(increase_growing_result + "%"), | |
$("#increase_production_result").html(increase_production_result + "%"), | |
$("#glypho_cost").html(glypho_cost_d), | |
$("#cost_one_pass").html(cost_one_pass_d), | |
$("#cost_kelly_pass").html(cost_kelly_pass_d), | |
$("#weed_kill_sub").html(weed_kill_sub_d), | |
$("#tool_type").html(tool_type), | |
$("#tool_ha_yr").html(tool_ha_yr), | |
$("#tool_life").html(tool_life), | |
$("#tool_rep_yrs").html(tool_rep_yrs), | |
$("#tool_rep_cost").html(tool_rep_cost_d), | |
$("#tool_cost_pa").html(tool_cost_pa_d), | |
$("#calc_increase").html(calc_increase_adj + "%"), | |
$("#std_increase").html(std_increase + "%"), | |
$("#yield_wheat").html(yield_wheat), | |
$("#yield_barley").html(yield_barley), | |
$("#yield_peas").html(yield_peas), | |
$("#yield_maize").html(yield_maize), | |
$("#rev_yield_wheat").html(rev_yield_wheat), | |
$("#rev_yield_barley").html(rev_yield_barley), | |
$("#rev_yield_peas").html(rev_yield_peas), | |
$("#rev_yield_maize").html(rev_yield_maize), | |
$("#inc_yield_wheat").html(inc_yield_wheat_d), | |
$("#inc_yield_barley").html(inc_yield_barley_d), | |
$("#inc_yield_peas").html(inc_yield_peas_d), | |
$("#inc_yield_maize").html(inc_yield_maize_d), | |
$("#gross_val_wheat").html(gross_val_wheat_d), | |
$("#gross_val_barley").html(gross_val_barley_d), | |
$("#gross_val_peas").html(gross_val_peas_d), | |
$("#gross_val_maize").html(gross_val_maize_d), | |
$("#sum_of").html(sum_of_d), | |
$("#mod").html(mod), | |
$("#hp_reco").html(hp_reco), | |
$("#kelly_prod").html(kelly_prod), | |
$("#fuel_cost_ph").html(fuel_cost_ph), | |
$("#labour_cost_ph").html(labour_cost_ph), | |
$("#total_cost_ph").html(total_cost_ph), | |
$("#farm_size").html(farm_size), | |
$("#area_worked").html(area_worked), | |
$("#total_mach_cost").html(total_mach_cost), | |
$("#rec_model").html(rec_model), | |
$("#could_manage").html(could_manage), | |
$("#effective_w").html(effective_w), | |
$("#ahead_mod").html(ahead_mod), | |
$(".email_results").html('<h2>Results</h2><div class="planter"><h3>Planter</h3><span id="planter_result">' + planter_result + '</span><p>Increase in Planter productivity <span id="planter_increase_result"> Ha per hour' + planter_increase_result + '</span> </p><p>Improved planter productivity result <span id="planter_imporve_result"> ' + planter_imporve_result + '</span> Ha per hour</p><p>Growing season -Days between planting and harvest <span id="growing_result"> ' + growing_result + '</span> Days</p><p>Percentage increase in growing season by accessing fields sooner <span id="increase_growing_result"> %' + increase_growing_result + '</span> </p><p>Percentage increase in production through stand / germination and establishment improvement <span id="increase_production_result"> %' + increase_production_result + '</span> </p> </div><div class="sprayer"><h3>Sprayer</h3><p>Glyphosate cost per Ha - applied <span id="glypho_cost">' + glypho_cost + '</span></p><p>Cost of one spray pass over full crop area <span id="cost_one_pass">' + cost_one_pass + '</span></p><p>Cost of Kelly for one full pass <span id="cost_kelly_pass">' + cost_kelly_pass + '</span></p><p>Benefit of one weed kill substitution <span id="weed_kill_sub">' + weed_kill_sub + '</span></p></div><div class="tool_wear"><h3>Tool Wear</h3><p>Tool type <span id="tool_type">' + tool_type + '</span> </p><p>Total Ha worked each year <span id="tool_ha_yr" >' + tool_ha_yr + '</span> </p><p>Expected life of the tool in Ha <span id="tool_life">' + tool_life + '</span> </p><p>Number of years in your program before tool replacement <span id="tool_rep_yrs">' + tool_rep_yrs + '</span> </p><p>Price of a replacement set of tools <span id="tool_rep_cost">' + tool_rep_cost + '</span> </p><p>Cost of tool wear per annum <span id="tool_cost_pa">' + tool_cost_pa + '</span> </p></div><div class="yield_data"><h3>Yield Data</h3><p>Calculated increase in growing season <span id="calc_increase">' + calc_increase + '</span> </p><p>Assumption : 1% increase in growing season = 1% increase in production</p><p>Stand increase <span id="std_increase">' + std_increase + '</span></p><p>Assumption : 1% increase in stand establishment = 0.5% increase in production</p><table class="yield_table"> <tr><td></td><th>Wheat</th><th>Barley</th><th>Peas</th><th>Maize</th></tr><tr><td>Standard yield kg/ha</td><td><span id="yield_wheat">' + yield_wheat + '</span></td><td><span id="yield_barley">' + yield_barley + '</span></td><td><span id="yield_peas">' + yield_peas + '</span></td><td><span id="yield_maize">' + yield_maize + '</span></td></tr><tr><td>Revised yield kg/ha</td><td><span id="rev_yield_wheat">' + rev_yield_wheat + '</span></td><td><span id="rev_yield_barley">' + rev_yield_barley + '</span></td><td><span id="rev_yield_peas">' + rev_yield_peas + '</span></td><td><span id="rev_yield_maize">' + rev_yield_maize + '</span></td></tr><tr><td>Value of increased yield per ha</td><td><span id="inc_yield_wheat">' + inc_yield_wheat_d + '</span></td><td><span id="inc_yield_barley">' + inc_yield_barley_d + '</span></td><td><span id="inc_yield_peas">' + inc_yield_peas_d + '</span></td><td><span id="inc_yield_maize">' + inc_yield_maize_d + '</span></td></tr><tr><td>Value of increased yield per ha</td><td><span id="gross_val_wheat">' + gross_val_wheat + '</span></td><td><span id="gross_val_barley">' + gross_val_barley + '</span></td><td><span id="gross_val_peas">' + gross_val_peas + '</span></td><td><span id="gross_val_maize">' + gross_val_maize + '</span></td></tr><tr><td>Sum of improvement in income</td><td><span id="sum_of">' + sum_of + '</span></td><td><span id=""></span></td><td><span id=""></span></td><td><span id=""></span></td></tr></table></div><div class="model_specs"><h3>Selected Model Specifications </h3><p>Model <span id="mod">' + mod + '</span> </p><p>Horsepower Recommended <span id="hp_reco">' + hp_reco + '</span> Hp</p><p>Productivity for the Kelly <span id="kelly_prod">' + kelly_prod + '</span> Ha per hour </p><p>Fuel costs per Ha <span id="fuel_cost_ph">' + fuel_cost_ph + '</span> </p><p>Labour costs per Ha <span id="labour_cost_ph">' + labour_cost_ph + '</span> </p><p>Working cost of Kelly including labour and fuel and wear, per Ha <span id="total_cost_ph">' + total_cost_ph + '</span> </p><p>Farm size <span id="farm_size">' + farm_size + '</span> Ha</p><p>Area worked with the Kelly each year <span id="area_worked">' + area_worked + '</span> </p><p>Total machinery cost per year. Cost per Ha x Ha worked <span id="total_mach_cost">' + total_mach_cost + '</span> <p></div><div class="recomendations"><h3>Recomendations</h3><p>Which model can I pull with my tractor ?</p><p>Your existing Tractor HP: <span id="rec_model">' + rec_model + '</span></p><p>Based upon your tractor, soil type and disc selection you could manage a model: <span id="could_manage">' + could_manage + '</span> with an effective width of: width <span id="effective_w">' + effective_w + '</span> </p><p>To stay ahead of your planter you will need a model <span id="ahead_mod">' + ahead_mod + '</span></p> </div>'), | |
$(".sec-1").hide(500).removeClass("active"), $(".sec-2").show(500).addClass("active"), !1 | |
}); | |
$(".calc_again").click(function() { | |
$(".sec-2").hide(500).removeClass("active"), $(".sec-1").show(500).addClass("active") | |
}); | |
}); |
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
<div class="sec-1 active"> | |
<h3>Please enter your name and email to use the form to calculate the results</h3> | |
<form name="send_email" class="calculate_form" id="calculate_form" method="post" enctype="multipart/form-data"> | |
<input type="hidden" name="action" value="send_email"/> | |
<p><input type="text" required name="name" placeholder="Your Name"></p> | |
<p><input type="email" required name="email" placeholder="Your Email"></p> | |
<!-- <p>Imperial or Metric Result? <select name="imp_or_met" > | |
<option value="Metric">Metric</option> | |
<option value="Imperial">Imperial</option> | |
</select> </p> --> | |
<p>Currency Adjustment <select name="currency"> | |
<option value="AUD">AUD</option> | |
<option value="USD">USD</option> | |
<option value="GBP">GBP</option> | |
<option value="EURO">EURO</option> | |
<option value="NZD">NZD</option> | |
<option value="ZAR">ZAR</option> | |
</select></p> | |
<p>Custom Exchange Rate <input type="number" name="custom_exchange" value="0"></p> | |
<p class="input">Tractor HP available <input type="number" name="tractor_hp" value="200"></p> | |
<p>Model Kelly you are considering <select name="kelly_model" > | |
<option value="6">6</option> | |
<option value="30">30</option> | |
<option value="40">40</option> | |
<option value="45">45</option> | |
<option value="46">46</option> | |
<option value="62">62</option> | |
<option value="80">80</option> | |
</select></p> | |
<p>Chain / Disc type <select name="chain"> | |
<option value="CL2">CL2</option> | |
<option value="CL1">CL1</option> | |
<option value="R300">R300</option> | |
<option value="W36">W36</option> | |
<option value="SD49">SD49</option> | |
<option value="StdPrickle">Std Prickle</option> | |
</select></p> | |
<p>Speed of operation in km/h <input type="number" name="speed" value="14"></p> | |
<p>Soil type <select name="soil"> | |
<option value="clay">clay</option> | |
<option value="loam">loam</option> | |
<option value="sand">sand</option> | |
</select></p> | |
<p>Labour cost / hr<input class="dollar" type="number" name="labour" value="20"></p> | |
<p>Productive efficiency as a %<input class="percent"type="number" name="productive" value="50"></p> | |
<p>Fuel price / litre<input class="dollar" type="number" name="fuel" value="1.2"></p> | |
<p>Fuel consumption litres per hour, leave default or enter your own figure.<input type="number" name="fuel_cons" value=""></p> | |
<p>L/hr default calculated from your tractor hp using the formula 5hp/hr/litre</p> | |
<div style="overflow-x:auto;"> | |
<table class="crop_table"> | |
<tr> | |
<th class="row_title">Crop type</th> | |
<td class="table ">Wheat</td> | |
<td class="table ">Barley</td> | |
<td class="table ">Peas</td> | |
<td class="table ">Maize</td> | |
</tr> | |
<tr> | |
<th class="row_title">Crop Hectares sown</th> | |
<td class="table "><input type="number" name="crop_H_sown_wheat" value="200"></td> | |
<td class="table "><input type="number" name="crop_H_sown_barley" value="200"></td> | |
<td class="table "><input type="number" name="crop_H_sown_peas" value="200"></td> | |
<td class="table "><input type="number" name="crop_H_sown_maize" value="200"></td> | |
</tr> | |
<tr> | |
<th class="row_title">Fall passes</th> | |
<td class="table "> <input type="number" name="fall_pass_wheat" value="0"> </td> | |
<td class="table "> <input type="number" name="fall_pass_barley" value="0"> </td> | |
<td class="table "> <input type="number" name="fall_pass_peas" value="0"> </td> | |
<td class="table "> <input type="number" name="fall_pass_maize" value="0"> </td> | |
</tr> | |
<tr> | |
<th class="row_title">Spring passes</th> | |
<td class="table "> <input type="number" name="spring_pass_wheat" value="1"> </td> | |
<td class="table "> <input type="number" name="spring_pass_barley" value="1"> </td> | |
<td class="table "> <input type="number" name="spring_pass_peas" value="1"> </td> | |
<td class="table "> <input type="number" name="spring_pass_maize" value="1"> </td> | |
</tr> | |
<tr> | |
<th class="row_title">Average yield in Kg / Ha</th> | |
<td class="table "> <input type="number" name="yield_wheat" value="2000"> </td> | |
<td class="table "> <input type="number" name="yield_barley" value="2000"> </td> | |
<td class="table "> <input type="number" name="yield_peas" value="1000"> </td> | |
<td class="table "> <input type="number" name="yield_maize" value="5000"> </td> | |
</tr> | |
<tr> | |
<th class="row_title">Commodity price per MT</th> | |
<td class="table "> <input class="dollar" min="0.00" max="9999999.00" step="0.10" type="number" name="commodity_price_wheat" value="250"> </td> | |
<td class="table "> <input class="dollar" min="0.00" max="9999999.00" step="0.10" type="number" name="commodity_price_barley" value="180"> </td> | |
<td class="table "> <input class="dollar" min="0.00" max="9999999.00" step="0.10" type="number" name="commodity_price_peas" value="300"> </td> | |
<td class="table "> <input class="dollar" min="0.00" max="9999999.00" step="0.10" type="number" name="commodity_price_maize" value="220"> </td> | |
</tr> | |
</table> | |
</div> | |
<p>% improvement in plant establishment using Kelly <input class="percent" type="number" name="improvement" value="5"></p> | |
<p>Planter width in Metres <input type="number" name="planter" value="12"> </p> | |
<p>Normal planter operating speed km/h <input type="number" name="planter_speed" value="8"> </p> | |
<p>Expected increase in planter speed <input type="number" name="increase" value="1.6"> </p> | |
<p>Expect at least 1.6 km/h planting speed increase</p> | |
<p>Average start of planting date <input type="date" name="start_planting" value="2018-05-10"></p> | |
<p>Average start of harvest date <input type="date" name="start_harvest" value="2018-10-01"></p> | |
<p>Expected number of days you can enter the field earlier than usual by using Kelly <input type="number" name="enter_field" value="5" max="14" min="1"></p> | |
<p>Glyphosate cost per litre <input class="dollar" min="0.00" max="9999999.00" step="0.10" type="number" name="glypho" value="20"> </p> | |
<p>Glyphosate application rate per ha. <input type="number" name="glypho_rate" value="1.5"> </p> | |
<p>Expected weed kill % from herbicide <input class="percent" type="number" name="weed_kill" value="95"> </p> | |
<p><input id="calc" type="submit" name="calculate" value="CALCULATE!" class="buttons slp_ui_button"></p> | |
</form> | |
</div> | |
<div class="sec-2"> | |
<h2>Results</h2> | |
<div class="planter"> | |
<h3>Planter</h3> | |
<span id="planter_result"> </span> | |
<p>Increase in Planter productivity <span id="planter_increase_result"> Ha per hour</span> </p> | |
<p>Improved planter productivity result <span id="planter_imporve_result"> </span> Ha per hour</p> | |
<p>Growing season -Days between planting and harvest <span id="growing_result"> </span> Days</p> | |
<p>Percentage increase in growing season by accessing fields sooner <span id="increase_growing_result"> %</span> </p> | |
<p>Percentage increase in production through stand / germination and establishment improvement <span id="increase_production_result"> %</span> </p> | |
</div> | |
<div class="sprayer"> | |
<h3>Sprayer</h3> | |
<p>Glyphosate cost per Ha - applied <span id="glypho_cost"></span> </p> | |
<p>Cost of one spray pass over full crop area <span id="cost_one_pass"></span> </p> | |
<p>Cost of Kelly for one full pass <span id="cost_kelly_pass"></span> </p> | |
<p>Benefit of one weed kill substitution <span id="weed_kill_sub"></span> </p> | |
</div> | |
<div class="tool_wear"> | |
<h3>Tool Wear</h3> | |
<p>Tool type <span id="tool_type"></span> </p> | |
<p>Total Ha worked each year <span id="tool_ha_yr" ></span> </p> | |
<p>Expected life of the tool in Ha <span id="tool_life"></span> </p> | |
<p>Number of years in your program before tool replacement <span id="tool_rep_yrs"></span> </p> | |
<p>Price of a replacement set of tools <span id="tool_rep_cost" ></span> </p> | |
<p>Cost of tool wear per annum <span id="tool_cost_pa" ></span> </p> | |
</div> | |
<div class="yield_data"> | |
<h3>Yield Data</h3> | |
<p>Calculated increase in growing season <span id="calc_increase"></span> </p> | |
<p>Assumption : 1% increase in growing season = 1% increase in production</p> | |
<p>Stand increase <span id="std_increase"></span></p> | |
<p>Assumption : 1% increase in stand establishment = 0.5% increase in production</p> | |
<table class="yield_table"> | |
<tr> | |
<td></td> | |
<th>Wheat</th> | |
<th>Barley</th> | |
<th>Peas</th> | |
<th>Maize</th> | |
</tr> | |
<tr> | |
<td>Standard yield kg/ha</td> | |
<td><span id="yield_wheat"></span></td> | |
<td><span id="yield_barley"></span></td> | |
<td><span id="yield_peas"></span></td> | |
<td><span id="yield_maize"></span></td> | |
</tr> | |
<tr> | |
<td>Revised yield kg/ha</td> | |
<td><span id="rev_yield_wheat"></span></td> | |
<td><span id="rev_yield_barley"></span></td> | |
<td><span id="rev_yield_peas"></span></td> | |
<td><span id="rev_yield_maize"></span></td> | |
</tr> | |
<tr> | |
<td>Value of increased yield per ha</td> | |
<td><span id="inc_yield_wheat"></span></td> | |
<td><span id="inc_yield_barley"></span></td> | |
<td><span id="inc_yield_peas"></span></td> | |
<td><span id="inc_yield_maize"></span></td> | |
</tr> | |
<tr> | |
<td>Value of increased yield per ha</td> | |
<td><span id="gross_val_wheat"></span></td> | |
<td><span id="gross_val_barley"></span></td> | |
<td><span id="gross_val_peas"></span></td> | |
<td><span id="gross_val_maize"></span></td> | |
</tr> | |
<tr> | |
<td>Sum of improvement in income</td> | |
<td><span id="sum_of"></span></td> | |
<td><span id=""></span></td> | |
<td><span id=""></span></td> | |
<td><span id=""></span></td> | |
</tr> | |
</table> | |
</div> | |
<div class="model_specs"> | |
<h3>Selected Model Specifications </h3> | |
<p>Model <span id="mod"></span> </p> | |
<p>Horsepower Recommended <span id="hp_reco"></span> Hp</p> | |
<p>Productivity for the Kelly <span id="kelly_prod"></span> Ha per hour </p> | |
<p>Fuel costs per Ha <span id="fuel_cost_ph"></span> </p> | |
<p>Labour costs per Ha <span id="labour_cost_ph"></span> </p> | |
<p>Working cost of Kelly including labour and fuel and wear, per Ha <span id="total_cost_ph"></span> </p> | |
<p>Farm size <span id="farm_size"></span> Ha</p> | |
<p>Area worked with the Kelly each year <span id="area_worked"></span> </p> | |
<p>Total machinery cost per year. Cost per Ha x Ha worked <span id="total_mach_cost"></span> <p> | |
</div> | |
<div class="recomendations"> | |
<h3>Recomendations</h3> | |
<p>Which model can I pull with my tractor ?</p> | |
<p>Your existing Tractor HP: <span id="rec_model"></span></p> | |
<p>Based upon your tractor, soil type and disc selection you could manage a model: <span id="could_manage"></span> with an effective width of: <span id="effective_w"></span> </p> | |
<p>To stay ahead of your planter you will need a model <span id="ahead_mod"></span></p> | |
</div> | |
<div class="email_results" style="display: none;"> </div> | |
<p class="slp_ui_button" > <a href="javascript:void(0)" class="calc_again">CALCULATE AGAIN</a></p> | |
<p class="slp_ui_button" > <button type="button" class="sendit">SEND ME A COPY</button></p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment