Results 1 to 1 of 1
  1. #1
    1946:2006:2066
    Reputation: FireDog46's Avatar
    Join Date
    Jan 2004
    Posts
    1,455

    ... and if we just ... Mountain Bike Pressure Temperature Calculator V4.0

    <!--
    Code:
    -->
    <!--INIT--mtbPressureTemperatureCalculator-->
    <script language="JavaScript">
    function mrdyFormatPercent ( mrdyPressureTemperatureObject )
    {
       var mrdyTempObjectOne = 1000 * mrdyPressureTemperatureObject;
       var mrdyTempObjectTwo = parseInt ( mrdyTempObjectOne , 10 );
       var mrdyTempObjectThree = mrdyTempObjectTwo / 10;
       var mrdyTempRemainderByTen = mrdyTempObjectTwo;
       mrdyTempRemainderByTen %= 10;
       if ( mrdyTempRemainderByTen == 0 ) 
       {
          if ( mrdyTempObjectThree > 0 )
          {
             return ( "+" + mrdyTempObjectThree + ".0%" );
          }
          else
          {
             return ( mrdyTempObjectThree + ".0%" );
          }
       } 
       if ( mrdyTempObjectThree > 0 )
       {
          return ( "+" + mrdyTempObjectThree + "%" );
       }
       else
       {
          return ( mrdyTempObjectThree + "%" );
       }
    }
    function mrdyFormatOneDecimalPlaces ( mrdyPressureTemperatureObject )
    {
       var mrdyTempObjectOne = 10 * mrdyPressureTemperatureObject;
       var mrdyTempObjectTwo = parseInt ( mrdyTempObjectOne , 10 );
       var mrdyTempObjectThree = mrdyTempObjectTwo / 10;
       var mrdyTempRemainderByTen = mrdyTempObjectTwo;
    
       mrdyTempRemainderByTen %= 10;
       if ( mrdyTempRemainderByTen == 0 ) 
       {
          return ( mrdyTempObjectThree + ".0" ); 
       } 
       return ( mrdyTempObjectThree );
    }
    function mrdyRadiansToDegrees ( mrdyRadians )
    {
       return ( ( 180 / Math.PI ) * mrdyRadians ); 	
    }
    function mrdyDegreesToRadians ( mrdyDegrees )
    {
       return ( ( Math.PI / 180 ) * mrdyDegrees ); 	
    }
    function mrdyFahrenheitToCentigrade ( mrdyDegrees )
    {
       return ( ( 5 / 9 ) * ( mrdyDegrees - 32 ) ); 	
    }
    function mrdyCentigradeToFahrenheit ( mrdyDegrees )
    {
       return ( ( ( 9 / 5 ) * mrdyDegrees ) - 32 ); 	
    }
    function mrdyCentigradeToKelvin ( mrdyDegrees )
    {
       return ( mrdyDegrees + 273.15 ); 	
    }
    function mrdyResetPressureTemperature ( mrdyPressureTemperatureForm )
    {
       mrdyPressureTemperatureForm.mrdyInputPressure.value = "200";
       mrdyPressureTemperatureForm.mrdyInputTemperatureOne.value = "-5";
       mrdyPressureTemperatureForm.mrdyInputTemperatureTwo.value = "22";
       mrdyPressureTemperatureForm.mrdyTemperatureScale.options.selectedIndex = "0";
       mrdyResetOutputParameters ( mrdyPressureTemperatureForm );
    
    }
    function mrdyResetOutputParameters ( mrdyPressureTemperatureForm )
    {
       mrdyPressureTemperatureForm.mrdyOutputTemperatureOne.value = "";
       mrdyPressureTemperatureForm.mrdyOutputTemperatureTwo.value = "";
       mrdyPressureTemperatureForm.mrdyOutputPressure.value = "";
       mrdyPressureTemperatureForm.mrdyOutputDeviation.value = "";
    
    }
    function mrdyFindPressureTemperature ( mrdyPressureTemperatureForm )
    {
       var mrdyTempInputPressure = 1 * mrdyPressureTemperatureForm.mrdyInputPressure.value;
       var mrdyTempInputTemperatureOne = 1 * mrdyPressureTemperatureForm.mrdyInputTemperatureOne.value;
       var mrdyTempInputTemperatureTwo = 1 * mrdyPressureTemperatureForm.mrdyInputTemperatureTwo.value;
       var mrdyTempInputCentigradeOne;
       var mrdyTempInputCentigradeTwo;
       var mrdyTempInputKelvinOne;
       var mrdyTempInputKelvinTwo;
       var mrdyTempOutputPressure;
       var mrdyTempOutputDeviation;
    
       mrdyResetOutputParameters ( mrdyPressureTemperatureForm );
    
       if ( mrdyPressureTemperatureForm.mrdyTemperatureScale.options.value == "C" )
       {
          mrdyTempInputCentigradeOne = mrdyTempInputTemperatureOne;
          mrdyTempInputCentigradeTwo = mrdyTempInputTemperatureTwo;
       }
       else
       {
          mrdyTempInputCentigradeOne = mrdyFahrenheitToCentigrade ( mrdyTempInputTemperatureOne );
          mrdyTempInputCentigradeTwo = mrdyFahrenheitToCentigrade ( mrdyTempInputTemperatureTwo );
       }
    
       mrdyTempInputKelvinOne = mrdyCentigradeToKelvin ( mrdyTempInputCentigradeOne );
       mrdyTempInputKelvinTwo = mrdyCentigradeToKelvin ( mrdyTempInputCentigradeTwo );
    
       mrdyTempOutputPressure = mrdyTempInputPressure * mrdyTempInputKelvinTwo /mrdyTempInputKelvinOne;
    
       mrdyTempOutputDeviation = -1 * ( ( mrdyTempInputPressure - mrdyTempOutputPressure ) / mrdyTempInputPressure );
    
       mrdyPressureTemperatureForm.mrdyOutputTemperatureOne.value = parseInt ( mrdyTempInputKelvinOne );
       mrdyPressureTemperatureForm.mrdyOutputTemperatureTwo.value = parseInt ( mrdyTempInputKelvinTwo );
    
       mrdyPressureTemperatureForm.mrdyOutputPressure.value = parseInt ( mrdyTempOutputPressure );
       mrdyPressureTemperatureForm.mrdyOutputDeviation.value = mrdyFormatPercent ( mrdyTempOutputDeviation );
    
    }
    </script>
    <form name="mrdyPressureTemperatureCalculator">
    
    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    </head>
    
    <center>
    <table border="4" width="768" cellpadding="3" cellspacing="3" bgcolor="cyan" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080">
       <tr>
          <td valign="middle" align="center" width="100%">
             <table border="0" cellpadding="3" cellspacing="3" width="100%">
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center"><font size="4" face="Times New Roman"><b>Mountain Bike Pressure Temperature Calculator</b></font></td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" width="100%" align="center" rowspan="1">
                      <table border="3" width="100%" cellpadding="3" cellspacing="3" bgcolor="#C0C0C0" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080">
                         <tr>
                            <td width="100%" align="center" valign="middle" colspan="4" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Input Parameters</b></font></td>
                         </tr>
                         <tr>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Riding Pressure</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Riding Temperature</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Pump Temperature</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Temperature Scale</b></font></td>
                         </tr>
                         <tr>
                            <td width="25%" align="center" valign="middle"><input type="text" tabindex="1" name="mrdyInputPressure" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold" value="200"></td>
                            <td width="25%" align="center" valign="middle"><input type="text" tabindex="2" name="mrdyInputTemperatureOne" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold" value="-5"></td>
                            <td width="25%" align="center" valign="middle"><input type="text" tabindex="2" name="mrdyInputTemperatureTwo" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold" value="22"></td>
                            <td width="25%" align="center" valign="middle"><select size="1" name="mrdyTemperatureScale" style="font-family: Courier New; font-size: 10pt; font-weight: bold">
                                  <option selected value="C">Centigrade</option>
                                  <option value="F">Fahrenheit</option>
                               </select></td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" width="100%" align="center" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080">
                      <table border="3" width="100%" cellpadding="3" cellspacing="3" bgcolor="#C0C0C0" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080">
                         <tr>
                            <td width="100%" align="center" valign="middle" colspan="4" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Output Parameters</b></font></td>
                         </tr>
                         <tr>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Riding Degrees Kelvin</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Pump Degrees Kelvin</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Pump Pressure</b></font></td>
                            <td width="25%" align="center" valign="middle" colspan="1" bordercolor="#808080" bordercolorlight="#808080" bordercolordark="#808080"><font face="Courier New" size="2"><b>Deviation</b></font></td>
                         </tr>
                         <tr>
                            <td width="25%" align="center"><input type="text" readonly tabindex="-1" name="mrdyOutputTemperatureOne" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold"></td>
                            <td width="25%" align="center"><input type="text" readonly tabindex="-1" name="mrdyOutputTemperatureTwo" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold"></td>
                            <td width="25%" align="center"><input type="text" readonly tabindex="-1" name="mrdyOutputPressure" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold"></td>
                            <td width="25%" align="center"><input type="text" readonly tabindex="-1" name="mrdyOutputDeviation" size="6" style="font-family: Courier New; font-size: 10pt; font-weight: bold"></td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td width="100%" align="left" valign="middle">
                      <p><font face="Times New Roman" size="3"><b>Just A Little Simple Tool:</b>&nbsp;Illustrating how pressure varies with temperature. Provided your air shock seals are well maintained and the shock is not leaking, shock air pressure is directly proportional to changes in temperature. The formula is P1/P2=T1/T2 where pressure is any one of the standard units and temperature is in degrees Kelvin. Transposing gives P2=(P1*T2)/T1.</font></p>
                   </td>
                </tr>
                <tr>
                   <td width="100%" align="left" valign="middle">
                      <p><font face="Times New Roman" size="3"><b>Usage:</b>&nbsp;Record for future reference all current pressure settings. The riding and pump temperatures must be the same, i.e. determine pressure settings during a ride. Use the calculator to compensate for extreme differences in riding and pump temperatures. Enter your riding pressure, riding temperature, pump temperature (typically room temperature) and the calculator will find the pump pressure required to give you the desired riding pressure for the given riding temperature. Clicking Submit reveals that you need to pump to <b>220psi @ 22c</b> for a riding pressure of <b>200psi @ -5c</b>.</font></p>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" width="100%" align="center" rowspan="1">
                      <table border="0" width="100%" cellpadding="1" cellspacing="1">
                         <tr>
                            <td width="32%"><font face="Courier New" size="3"></font></td>
                            <td width="13%"><font face="Courier New" size="3"><b><input type="button" name="mrdyClickResetPressureTemperature" value="Reset" onclick="mrdyResetPressureTemperature(form)"></b></font></td>
                            <td width="10%"><font face="Courier New" size="3"></font></td>
                            <td width="13%"><font face="Courier New" size="3"><b><input type="button" name="mrdyClickFindPressureTemperature" value="Submit" onclick="mrdyFindPressureTemperature(form)"></b></font></td>
                            <td width="32%"><font face="Courier New" size="3"></font></td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" align="center" width="100%" colspan="2">
                      <table border="0" width="100%" cellspacing="2" cellpadding="2">
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="4"><b>Roll Your Own</b></font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">From The Menu Bar: View -&gt; Source</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Within your text editor: Save As &quot;mtbPressureTemperatureCalculator.htm&quot;</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Search for &quot;INIT--mtbPressureTemperatureCalculator&quot;</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Delete everthing above this line.</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Search for &quot;FINI--mtbPressureTemperatureCalculator&quot;</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Delete everthing below this line.</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3">Save again.</font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3"><b>voila</b></font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3"><b>your own calculator</b></font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="2">( if this, or any alternative method, fails, message-via-email me to receive a copy of the original )</font></td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" align="center" width="100%" colspan="1">
                      <table border="0" width="78%" cellspacing="2" cellpadding="2">
                         <tr>
                            <td width="100%" valign="middle" align="center">
                               <pre>
    <font face="Courier New" size="2">
    Mountain Bike Pressure Temperature Calculator V4.0
    
    Copyright (C) 2004 Michael R Young
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty
    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU General Public License for more details.
    
    To receive a copy of the GNU General Public License
    write to the
    Free Software Foundation Inc.
    59 Temple Place Suite 330
    Boston MA 02111-1307
    USA
    </font>
    </pre>
                            </td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                      <hr>
                   </td>
                </tr>
                <tr>
                   <td valign="middle" align="center" width="100%" colspan="2">
                      <table border="0" width="100%" cellspacing="2" cellpadding="2">
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3"><b>This page is best viewed in Microsoft Internet Explorer Version 6.0 or higher.</b></font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3"><b>If you respond to this post, remove the [QUOTE]'d data.</b></font></td>
                         </tr>
                         <tr>
                            <td valign="middle" align="center" width="100%"><font face="Times New Roman" size="3"><b>Otherwise the thread will become cluttered with multiple calculators.</b></font></td>
                         </tr>
                      </table>
                   </td>
                </tr>
                <tr>
                   <td width="100%" colspan="1" valign="middle" align="center">
                      <hr>
                      <hr>
                   </td>
                </tr>
             </table>
          </td>
       </tr>
    </table>
    </center>
    </form>
    <!--FINI--mtbPressureTemperatureCalculator-->
    <!--
    -->
    Last edited by mrdy; 03-06-2004 at 08:51 AM.

Similar Threads

  1. Replies: 30
    Last Post: 09-06-2004, 03:56 PM
  2. Mountain Bike Gear Ratio Calculator V4.0
    By FireDog46 in forum Drivetrain - shifters, derailleurs, cranks
    Replies: 0
    Last Post: 02-29-2004, 10:57 AM
  3. Mountain Bike Gear Ratio Calculator V4.0
    By FireDog46 in forum Canadian Bikes
    Replies: 0
    Last Post: 02-29-2004, 10:27 AM
  4. Commuter bike options
    By Clipper in forum General Discussion
    Replies: 18
    Last Post: 02-16-2004, 11:40 AM
  5. Indiana DNR starts to open State Parks!
    By JmZ in forum Trail Building and Advocacy
    Replies: 1
    Last Post: 01-30-2004, 09:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •