Difference between revisions of "Robot Speed Calculator"

(Created page with "<script type="text/javascript"> // <![CDATA[ $("input:enabled").change(function() { calcValues(); }); function calcValues () { var...")
(Tag: 2017 source edit)
 
m (Replaced content with "{{SpeedCalcTemplate}} <br /> Category:Wheeled Robots Category:Tracked Robots Category:Vectoring Robots Category:Programmable Robots Category:Mechanica...")
(Tags: Replaced, Visual edit)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<script type="text/javascript">
+
{{SpeedCalcTemplate}}
// <![CDATA[
 
    $("input:enabled").change(function() {
 
            calcValues();
 
        });
 
  
        function calcValues () {
 
            var rpm = $("input[name='rpm']").val();
 
            var ratio = $("input[name='ratio']").val();
 
            var cir = $("input[name='diameter']").val() * Math.PI;
 
  
            var ipm = rpm * ratio * cir;
 
            var fpm = ipm / 12.0;
 
            var mph = fpm * 60 / 5280;
 
            var mpm = fpm * 0.3048;
 
            var kph = mpm * 60 / 1000;
 
  
            $("input[name='circ']").val(cir.toFixed(2));
+
<br />
            $("input[name='speedIPM']").val(ipm.toFixed(2));
+
[[Category:Wheeled Robots]]
            $("input[name='speedFPM']").val(fpm.toFixed(2));
+
[[Category:Tracked Robots]]
            $("input[name='speedMPH']").val(mph.toFixed(2));
+
[[Category:Vectoring Robots]]
            $("input[name='speedMPM']").val(mpm.toFixed(2));
+
[[Category:Programmable Robots]]
            $("input[name='speedKPH']").val(kph.toFixed(2));
+
[[Category:Mechanical Engineering]]
        }
 
 
 
        $(function() {
 
            calcValues();
 
        });
 
    // ]]>
 
    </script>
 

Latest revision as of 13:43, 24 May 2021