l>Track Calculator// multiplication determinants used to convert one unit of measure up to an additional where: F=foot, I=inch, K=kilometer, L=mile, M=meter, Y=yard// all factors are based upon 1 foot = .3048 meters// to transform from one unit to another, multiply the "from" value by the factor displayed in the adhering to table:// TO transform to meter to KILOMETERS to INCHES to FEET come YARDS come MILES// from meter = 1/1000 12/.3048 1/.3048 1/(3*.3048) 1/(5280*.3048)// from KILOMETERS 1000 = 12000/.3048 1000/.3048 1000/3*.3048) 1000/(5280*.3048)// indigenous INCHES .3048/12 .3048/12000 = 1/12 1/36 1/(12*5280)// indigenous FEET .3048 .3048/1000 12 = 1/3 1/5280// from YARDS 3*.3048 (3*.3048)/1000 36 3 = 1/1760// from mile 5280*.3048 (5280*.3048)/1000 12*5280 5280 1760 =//// create translation factors - every intermediate calculations space made in metersvar xbasis = .3048 * 1; // define simple foot-to-meter relationshipvar xF2M = xbasis * 1; // from feet come metersvar xI2M = xbasis / 12; // native inches come metersvar xK2M = 1000 * 1; // indigenous kilometers to metersvar xL2K = ( 5280 * .3048 ) / 1000; // from miles to kilometersvar xL2M = 5280 * xbasis; // from mile to metersvar xM2K = 1 / 1000; // from meter to kilometersvar xM2L = 1 / (5280 * xbasis ); // from meters to milesvar xY2M = 3 * xbasis; // native yards come metersvar inchesPerMeter = 12 * ( 1 / .3048 );var metersPerInch = 1 / inchesPerMeter;var kilosPerMile = metersPerInch * 12 * 5280 / 1000;var milesPerKilo = 1 / kilosPerMile;var error = false;var laneDistK = new Array(8);var laneDistL = new Array(8);var laneDistM = new Array(8);var laneLenM = brand-new Array(8);var lanePaceM = new Array(8);var laneTime = new Array(8);var lapCount = 0;var lapsCalc = new Array(8);// track size defaults: 400 meters in lane 1var trackSizeM = 400 * 1;var smork = 1 * 1;var refLane = 1 * 1;// lane width defaults: 42 inchesvar laneWidthM = 42 * xI2M;// curb default: novar curb = "N";// create work arraysvar zhours = new Array(8);var zminutes = brand-new Array(8);var zseconds = brand-new Array(8);var ztime = new Array(8);var ztotalsecs = new Array(8);// -----------------------------------------------------------// calculation LANE LENGTHS IN METERS// gather and edit input worths -- only print one error in ~ a time to stop confusion// -----------------------------------------------------------function calcLaneLengths(track) trackSizeM = document.track.trackSize.value * 1;smork = (document.track.smork.options.value);refLane = (document.track.refLane.options.value);laneWidthM = document.track.laneWidth.value * 1;wmork = (document.track.wmork.options.value);curb = document.track.curb.options.value;// ---------- process track sizeif ( smork == "F" ) trackSizeM = trackSizeM * xF2M; // transform feet come meters rather if ( smork == "Y" ) trackSizeM = trackSizeM * xY2M; // transform yards to metersif ( trackSizeM = 501 ) if ( ! confirm ( "Warning: Track dimension is much more than 500 meters (547 yeard). Proceed?" ) ) error = true;return; // ---------- procedure lane widthif ( wmork == "I" ) laneWidthM = laneWidthM * xI2M; // transform inches come metersif ( laneWidthM = 1.5 ) if ( ! check ( "Warning: Lane broad is an ext than 1.5 meters (59 inches). Proceed?" ) ) error = true;return;// ---------- establish size of roadway 1if ( refLane >= 2 ) trackSizeM = trackSizeM - ( ( refLane - 1 ) * ( 2 * laneWidthM * Math.PI ) );// ---------- calculate size of Lanes 2-8laneLenM<1> = trackSizeM;for ( var ns = 2; i = 60 ) // add up minuteswtotalsecs -= 60;wmins += 1;while ( wtotalsecs >= .50 ) // add up secondswtotalsecs -= 1;wsecs += 1;minphrase = 100 + wmins + "x";secphrase = 100 + wsecs + "x";ztime = minphrase.substring(1,3) + ":" + secphrase.substring(1,3);}// -----------------------------------------------------------// calculate TIME phrases FROM total SECONDS -- IN tenths OF SECOND// -----------------------------------------------------------function calcTime10(track) for ( var i = 1; ns = 60 ) // include up minuteswtotalsecs -= 60;wmins += 1;while ( wtotalsecs >= 1 ) // include up secondswtotalsecs -= 1;wsecs += 1;while ( wtotalsecs >= .05 ) // include up 10ths of a secondwtotalsecs -= .1;wtens += 1;minphrase = 100 + wmins + "x";secphrase = 100 + wsecs + "x";tenphrase = 100 + wtens + "X";ztime = minphrase.substring(1,3) + ":" + secphrase.substring(1,3) + "." + tenphrase.substring(2,3);}// -----------------------------------------------------------// A - calculate LAPS based upon DISTANCE// -----------------------------------------------------------function calcA(track) {document.track.alaps1.value = "";document.track.alaps2.value = "";document.track.alaps3.value = "";document.track.alaps4.value = "";document.track.alaps5.value = "";document.track.alaps6.value = "";document.track.alaps7.value = "";document.track.alaps8.value = "";calcLaneLengths(track); if ( error ) return zdist = document.track.adist.value * 1;zmork = (document.track.amork.options.value);if ( zmork == "K" ) zdist = zdist * xK2M; // transform kilometers to meters else zdist = zdist * xL2M; // transform miles to metersif ( zdist = 21 ) alert ( "Error: Minutes must be native 2 come 20 -- please reenter." );return;if ( zs = 60 ) alert ( "Error: Seconds should be from 0 to 59.99 -- you re welcome reenter." );return;if ( zmork == "L" ) zsecsperM = ( ( zm * 60) + zs ) / xL2M; else zsecsperM = ( ( zm * 60 ) + zs ) / xK2M;for ( var i = 1; i = 11 ) alert ( "Error: Minutes must be indigenous 0 come 10 -- please reenter." );return;if ( zs = 60 ) alert ( "Error: Seconds must be from 0 to 59.99 -- please reenter." );return;zlapsecs = ( zm * 60) + zs;for ( var ns = 1; ns = 11 ) alert ( "Error: Minutes have to be from 0 come 10 -- please reenter." );return;if ( zs = 60 ) alert ( "Error: Seconds must be from 0 come 59.99 -- you re welcome reenter." );return;zlap1secs = ( ( zm * 60 ) + zs ) * ( laneLenM<1> / laneLenM );for ( var ns = 1; i
 .tags a { color: #fff; background: #909295; padding: 3px 10px; border-radius: 10px; font-size: 13px; line-height: 30px; white-space: nowrap; } .tags a:hover { background: #818182; } Home Contact - Advertising Copyright © 2022 rewildtv.com #footer {font-size: 14px;background: #ffffff;padding: 10px;text-align: center;} #footer a {color: #2c2b2b;margin-right: 10px;}