{"id":393,"date":"2025-08-25T04:44:30","date_gmt":"2025-08-25T04:44:30","guid":{"rendered":"https:\/\/airsoftformula.com\/?page_id=393"},"modified":"2025-08-25T19:06:39","modified_gmt":"2025-08-25T19:06:39","slug":"rps-calculator","status":"publish","type":"page","link":"https:\/\/airsoftformula.com\/?page_id=393","title":{"rendered":"RPS Calculator"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>RPS Calculator<\/title>\n  <style>\n    body {\n      background-color: #1a1a1a;\n      color: #00B630;\n      font-family: Arial, sans-serif;\n      padding: 20px;\n    }\nselect {\n  background-color: #000000 !important;\n  color: #00B630 !important;\n}\ninput[type=\"number\"], input[type=\"text\"] {\n  background-color: #000000 !important;\n  color: #00B630 !important;\n}\n\n    label, select, option, input, button {\n      color: #00B630;\n      background-color: #222;\n      border: 1px solid #00B630;\n      padding: 5px;\n      margin: 5px 0;\n    }\n\n    h2 {\n      color: #00B630;\n    }\n\n    button {\n      cursor: pointer;\n    }\n\n    #result {\n      background-color: black;\n      color: #00FF80;\n      padding: 10px;\n      border-radius: 5px;\n      margin-top: 20px;\n      font-weight: bold;\n      white-space: pre-wrap;\n    }\n\n    select, input {\n      width: 200px;\n    }\n\n    pre {\n      background-color: black;\n      color: inherit;\n      margin: 0;\n      font-family: monospace;\n    }\n  <\/style>\n<\/head>\n<body>\n\n\n<!-- Select Mode (RPM or TPA) -->\n<label for=\"mode\">Select Mode:<\/label>\n<select id=\"modeSelect\" onchange=\"toggleMode()\">\n  <option value=\"rpm\">RPM Mode<\/option>\n  <option value=\"tpa\">TPA Mode<\/option>\n<\/select>\n\n<!-- Battery Status Selection -->\n<div>\n  <p>Select Battery Status:<\/p>\n  <label><input type=\"radio\" name=\"batteryStatus\" value=\"normal\" checked> Normal<\/label>\n  <label><input type=\"radio\" name=\"batteryStatus\" value=\"low\"> Low Battery<\/label>\n  <label><input type=\"radio\" name=\"batteryStatus\" value=\"full\"> Fully Charged<\/label>\n<\/div>\n\n<!-- RPM Mode Section -->\n<div id=\"rpmSection\">\n  <label for=\"rpm\">Select Motor RPM:<\/label>\n  <select id=\"rpmSelect\" onchange=\"toggleCustomRPMInput()\">\n    <option value=\"18000\">18K<\/option>\n    <option value=\"25000\">25K<\/option>\n    <option value=\"28000\">28K<\/option>\n    <option value=\"31000\">31K<\/option>\n    <option value=\"33000\">33K<\/option>\n    <option value=\"37000\">37K<\/option>\n    <option value=\"39000\">39K<\/option>\n    <option value=\"48000\">48K<\/option>\n    <option value=\"62000\">62K<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"rpmCustom\" placeholder=\"Enter custom RPM\" style=\"display:none;\">\n\n  <label for=\"ratio\">Select Gear Ratio:<\/label>\n  <select id=\"ratioSelect\" onchange=\"toggleCustomInput('ratioSelect', 'ratioCustom')\">\n    <option value=\"10\">10:1<\/option>\n    <option value=\"12\">12:1<\/option>\n    <option value=\"13\">13:1<\/option>\n    <option value=\"14\">14:1<\/option>\n    <option value=\"16\">16:1<\/option>\n    <option value=\"18\">18:1<\/option>\n    <option value=\"19\">19:1(100:200)<\/option>\n    <option value=\"20\">20:1<\/option>\n    <option value=\"24\">24:1<\/option>\n    <option value=\"26\">26:1<\/option>\n    <option value=\"32\">32:1(100:300)<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"ratioCustom\" placeholder=\"Enter custom ratio\" style=\"display:none;\">\n\n  <label for=\"voltage\">Select Voltage:<\/label>\n  <select id=\"voltageSelect\" onchange=\"toggleCustomInput('voltageSelect', 'voltageCustom')\">\n    <option value=\"14.8\">14.8V<\/option>\n    <option value=\"11.1\">11.1V<\/option>\n    <option value=\"7.4\">7.4V<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"voltageCustom\" placeholder=\"Enter custom voltage\" style=\"display:none;\">\n<\/div>\n\n<!-- TPA Mode Section -->\n<div id=\"tpaSection\" style=\"display: none;\">\n  <label for=\"tpa\">Select Motor TPA:<\/label>\n  <select id=\"tpaSelect\">\n    <option value=\"16000\">32 TPA (16K RPM)<\/option>\n    <option value=\"18000\">28 TPA (18K RPM)<\/option>\n    <option value=\"22000\">22 TPA (22K RPM)<\/option>\n    <option value=\"30000\">16 TPA (30K RPM)<\/option>\n    <option value=\"35000\">15 TPA (35K RPM)<\/option>\n    <option value=\"40000\">14 TPA (40K RPM)<\/option>\n    <option value=\"45000\">13 TPA (45K RPM)<\/option>\n  <\/select>\n\n  <label for=\"tpaRatio\">Select Gear Ratio:<\/label>\n  <select id=\"tpaRatioSelect\" onchange=\"toggleCustomInput('tpaRatioSelect', 'tpaRatioCustom')\">\n    <option value=\"10\">10:1<\/option>\n    <option value=\"12\">12:1<\/option>\n    <option value=\"13\">13:1<\/option>\n    <option value=\"14\">14:1<\/option>\n    <option value=\"16\">16:1<\/option>\n    <option value=\"18\">18:1<\/option>\n    <option value=\"19\">19:1(100:200)<\/option>\n    <option value=\"20\">20:1<\/option>\n    <option value=\"24\">24:1<\/option>\n    <option value=\"26\">26:1<\/option>\n    <option value=\"32\">32:1(100:300)<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"tpaRatioCustom\" placeholder=\"Enter custom ratio\" style=\"display:none;\">\n\n  <label for=\"tpaVoltage\">Select Voltage:<\/label>\n  <select id=\"tpaVoltageSelect\" onchange=\"toggleCustomInput('tpaVoltageSelect', 'tpaVoltageCustom')\">\n    <option value=\"14.8\">14.8V<\/option>\n    <option value=\"11.1\">11.1V<\/option>\n    <option value=\"7.4\">7.4V<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"tpaVoltageCustom\" placeholder=\"Enter custom voltage\" style=\"display:none;\">\n<\/div>\n\n<!-- Short-Stroke Teeth Selection -->\n<div>\n  <label for=\"shortStrokeTeeth\">Short-Stroke Teeth (1.5 RPS increase per tooth):<\/label>\n  <select id=\"shortStrokeTeeth\">\n    <option value=\"0\">0 Teeth<\/option>\n    <option value=\"1\">1 Tooth<\/option>\n    <option value=\"2\">2 Teeth<\/option>\n    <option value=\"3\">3 Teeth<\/option>\n    <option value=\"4\">4 Teeth<\/option>\n    <option value=\"5\">5 Teeth<\/option>\n  <\/select>\n<\/div>\n\n<!-- Spring Power -->\n<div>\n  <label for=\"springPower\">Select Spring Power:<\/label>\n  <select id=\"springPower\" onchange=\"toggleCustomInput('springPower','springCustom')\">\n    <option value=\"90\">M90<\/option>\n    <option value=\"100\">M100<\/option>\n    <option value=\"110\">M110<\/option>\n    <option value=\"120\">M120<\/option>\n    <option value=\"130\">M130<\/option>\n    <option value=\"140\">M140<\/option>\n    <option value=\"150\">M150<\/option>\n    <option value=\"160\">M160<\/option>\n    <option value=\"170\">M170<\/option>\n    <option value=\"custom\">Custom<\/option>\n  <\/select>\n  <input type=\"number\" id=\"springCustom\" placeholder=\"Enter custom spring (M)\" style=\"display:none;\">\n<\/div>\n\n<button onclick=\"calculateRPS()\">Calculate RPS<\/button>\n<p id=\"result\"><\/p>\n\n<script>\nfunction toggleMode() {\n  const mode = document.getElementById('modeSelect').value;\n  document.getElementById('rpmSection').style.display = mode === 'rpm' ? 'block' : 'none';\n  document.getElementById('tpaSection').style.display = mode === 'tpa' ? 'block' : 'none';\n}\n\nfunction toggleCustomInput(selectId, inputId) {\n  const select = document.getElementById(selectId);\n  const customInput = document.getElementById(inputId);\n  customInput.style.display = select.value === 'custom' ? 'inline' : 'none';\n}\n\nfunction toggleCustomRPMInput() {\n  const select = document.getElementById('rpmSelect');\n  const customInput = document.getElementById('rpmCustom');\n  customInput.style.display = select.value === 'custom' ? 'inline' : 'none';\n}\n\nfunction getSelectedValue(selectId, customId) {\n  const select = document.getElementById(selectId);\n  const customInput = document.getElementById(customId);\n  return select.value === 'custom' ? parseFloat(customInput.value) : parseFloat(select.value);\n}\n\nfunction calculateRPS() {\n  const mode = document.getElementById('modeSelect').value;\n  const batteryStatus = document.querySelector('input[name=\"batteryStatus\"]:checked').value;\n  let result;\n\n  let batteryMultiplier = 1;\n  if (batteryStatus === 'low') batteryMultiplier = 0.85;\n  else if (batteryStatus === 'full') batteryMultiplier = 1.15;\n\n  const shortStrokeTeeth = parseInt(document.getElementById('shortStrokeTeeth').value);\n  const springPower = getSelectedValue('springPower','springCustom');\n\n  if (mode === 'rpm') {\n    const rpm = getSelectedValue('rpmSelect', 'rpmCustom');\n    const ratio = getSelectedValue('ratioSelect', 'ratioCustom');\n    const voltage = getSelectedValue('voltageSelect', 'voltageCustom');\n    if (isNaN(rpm) || isNaN(ratio) || isNaN(voltage)) {\n      result = \"Please enter valid numbers for RPM, Ratio, and Voltage.\";\n    } else {\n      result = calculateRPSValues(rpm, ratio, voltage, batteryMultiplier, shortStrokeTeeth, springPower);\n    }\n  } else {\n    const rpm = parseFloat(document.getElementById('tpaSelect').value);\n    const ratio = getSelectedValue('tpaRatioSelect', 'tpaRatioCustom');\n    const voltage = getSelectedValue('tpaVoltageSelect', 'tpaVoltageCustom');\n    if (isNaN(rpm) || isNaN(ratio) || isNaN(voltage)) {\n      result = \"Please enter valid numbers for TPA RPM, Ratio, and Voltage.\";\n    } else {\n      result = calculateRPSValues(rpm, ratio, voltage, batteryMultiplier, shortStrokeTeeth, springPower);\n    }\n  }\n\n  document.getElementById('result').innerHTML = `<pre>${result}<\/pre>`;\n}\n\nfunction calculateRPSValues(rpm, ratio, voltage, batteryMultiplier, shortStrokeTeeth, springPower) {\n  let voltageMultiplier = 1;\n  if (voltage === 7.4) voltageMultiplier = 0.6667;\n  else if (voltage === 14.8) voltageMultiplier = 1.3333;\n\n  const estimatedKv = Math.round(rpm \/ voltage);\n\n  const baseRPS = (rpm \/ ratio) \/ 60 * batteryMultiplier * voltageMultiplier;\n  const shortStrokeBonus = shortStrokeTeeth * 1.5;\n\n  \/\/ Apply spring penalty (stronger spring lowers RPS)\n  let springMultiplier = 1;\n  if (!isNaN(springPower)) {\n    springMultiplier = 1 - ((springPower - 90) * 0.005); \/\/ ~0.5% loss per 1 step above M90\n    if (springMultiplier < 0.5) springMultiplier = 0.5; \/\/ clamp minimum\n  }\n\n  const adjustedRPS = (baseRPS + shortStrokeBonus) * springMultiplier;\n\n  const SSGRange = `${Math.round(adjustedRPS) - 3} - ${Math.round(adjustedRPS) + 3}`;\n  const DSGRange = `${Math.round(adjustedRPS * 2 * 0.95) - 3} - ${Math.round(adjustedRPS * 2 * 0.90) + 3}`;\n  const TSGRange = `${Math.round(adjustedRPS * 3 * 0.85) - 3} - ${Math.round(adjustedRPS * 3 * 0.80) + 3}`;\n\n  return `\nRPM: ${rpm} | Ratio: ${ratio}:1 | Voltage: ${voltage}V | Spring: M${springPower}\nShort-Stroke Teeth: ${shortStrokeTeeth}\nEstimated Kv: ${estimatedKv} RPM\/V\n\nEstimated RPS:\nSSG = ${SSGRange} RPS\nDSG = ${DSGRange} RPS\nTSG = ${TSGRange} RPS\n  `;\n}\n<\/script>\n<\/body>\n<\/html>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RPS Calculator Select Mode: RPM ModeTPA Mode Select Battery Status: Normal Low Battery Fully Charged Select Motor RPM: 18K25K28K31K33K37K39K48K62KCustom Select [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-393","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/pages\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airsoftformula.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=393"}],"version-history":[{"count":11,"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/pages\/393\/revisions"}],"predecessor-version":[{"id":438,"href":"https:\/\/airsoftformula.com\/index.php?rest_route=\/wp\/v2\/pages\/393\/revisions\/438"}],"wp:attachment":[{"href":"https:\/\/airsoftformula.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}