Introduce la medida de tu neumático actual y obtén todas las equivalencias homologadas con diferencia de diámetro y efecto sobre el velocímetro.
| Medida | Diámetro total | Diferencia | Error velocímetro | Valoración |
|---|
Introduce la medida de tu neumático actual y obtén todas las equivalencias homologadas con diferencia de diámetro y efecto sobre el velocímetro.
| Medida | Diámetro total | Diferencia | Error velocímetro | Valoración |
|---|
Calcula la relación de transmisión, longitud de cadena y velocidad real al cambiar la combinación de piñón delantero y corona trasera.
| Parámetro | Original | Nueva config. | Cambio |
|---|
Los velocímetros de fábrica suelen mostrar entre un 3% y 6% más de lo real. Calcula la velocidad real con tus neumáticos actuales.
| Velocímetro indica | Velocidad real | Diferencia | Estado legal (EU) |
|---|
Calcula la potencia estimada tras modificaciones en escape, filtro y otros elementos. Los resultados son orientativos — el dyno real siempre manda.
| # | Modificación | Ganancia | CV acumulados |
|---|
Introduce el número de bastidor (17 caracteres) y obtén fabricante, país, año de fabricación, planta y número de serie. 100% offline, sin enviar datos a ningún servidor.
Escucha cómo suena tu moto con diferentes tipos de escape. Selecciona marca, modelo y tipo de escape y dale al play.
Selecciona dos motos y compara sus especificaciones técnicas lado a lado, incluyendo sus siluetas a escala real.
Introduce tus datos de carnet y descubre exactamente qué motos puedes conducir ahora, qué límites tienes y cuándo puedes acceder al siguiente nivel.
La mayoría de moteros no sabe lo que les cuesta realmente su moto. Introduce tus datos y descubre el coste real por kilómetro incluyendo todos los gastos.
| Concepto | / ano | / mes | / km |
|---|---|---|---|
| ${label} | ${fmt(val)} | ${fmt(val/12)} | ${fmt(val/kmAnio)} |
| TOTAL | ${fmt(totalAnio)} | ${fmt(costePorMes)} | ${fmt(costePorKm)} |
WMI ${wmi} no esta en nuestra base de datos. Pais probable: ${country}.
`; document.getElementById('vinResults').style.display = 'block'; document.getElementById('vinResults').scrollIntoView({behavior:'smooth', block:'start'}); } function showVinError(msg) { const el = document.getElementById('vinError'); el.innerHTML = '(!) ' + msg; el.style.display = 'block'; el.style.background = '#fff0f0'; el.style.border = '1px solid #f0a0a0'; el.style.borderRadius = 'var(--radius)'; el.style.padding = '12px 16px'; } function vinCheckDigit(vin) { const v = {'A':1,'B':2,'C':3,'D':4,'E':5,'F':6,'G':7,'H':8,'J':1,'K':2,'L':3,'M':4, 'N':5,'P':7,'R':9,'S':2,'T':3,'U':4,'V':5,'W':6,'X':7,'Y':8,'Z':9}; const w = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2]; let s = 0; for (let i=0; i<17; i++) { const c = vin[i]; s += (/\d/.test(c) ? parseInt(c) : (v[c]||0)) * w[i]; } const r = s % 11; return (r===10?'X':r.toString()) === vin[8]; } // VIN init: se hace en DOMContentLoaded /* = DOM READY init seguro = */ // CSS barras visualizador const s = document.createElement('style'); s.textContent = '.vbar{width:6px;height:4px;background:var(--border);border-radius:2px;transition:height .1s,background .1s}'; document.head.appendChild(s); // Init comparador try { initComparador(); } catch(e) { console.warn('initComparador:', e); } // Nav: event delegation en el sidebar const sidebar = document.getElementById('tabBar'); if (sidebar) { sidebar.addEventListener('click', function(e) { const tab = e.target.closest('[data-tool]'); if (!tab) return; // Quitar activo de todos document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); document.querySelectorAll('.tool-panel, article.tool-panel').forEach(p => p.classList.remove('active')); // Activar el clickado tab.classList.add('active'); const panel = document.getElementById('tool-' + tab.dataset.tool); if (panel) panel.classList.add('active'); // Scroll en mvil if (window.innerWidth <= 768) { setTimeout(() => { const ca = document.querySelector('.content-area') || document.querySelector('main'); if (ca) ca.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 50); } }); } // Botones de herramientas const bind = (id, fn) => { const el = document.getElementById(id); if (el) el.addEventListener('click', fn); }; bind('btnCalcNeu', calcNeumaticos); bind('btnCalcCad', calcCadena); bind('btnResetCad', resetCadena); bind('btnCalcVel', calcVeloc); bind('btnAddMod', addMod); bind('btnCalcPot', calcPotencia); bind('btnCalcCar', calcCarnet); bind('btnCalcCost', calcCoste); bind('btnDecodeVin', decodeVin); bind('btnPlayToggle', togglePlay); // Primera pestaa activa if (!document.querySelector('.tab.active')) { const first = document.querySelector('[data-tool]'); if (first) first.classList.add('active'); } if (!document.querySelector('.tool-panel.active, article.tool-panel.active')) { const first = document.getElementById('tool-neumaticos'); if (first) first.classList.add('active'); } // Bindings adicionales bind('btnCalcCar2', calcCarnet); bind('btnCalcCost2', calcCoste); // VIN input events const vinInput = document.getElementById('vinInput'); if (vinInput) { vinInput.addEventListener('input', function() { onVinInput(this); }); vinInput.addEventListener('keydown', function(e) { if (e.key === 'Enter') decodeVin(); }); } // Sound selects const soundMarcaSel = document.getElementById('soundMarca'); if (soundMarcaSel) soundMarcaSel.addEventListener('change', updateSoundModelos); const soundModeloSel = document.getElementById('soundModelo'); if (soundModeloSel) soundModeloSel.addEventListener('change', updateSoundEscapes); // Comparador selects ['motoA','motoB'].forEach(id => { const el = document.getElementById(id); if (el) el.addEventListener('change', renderComparador); }); // Volume slider const volSlider = document.getElementById('volSlider'); if (volSlider) volSlider.addEventListener('input', function() { setVolume(this.value); }); // Mods - usar event delegation en el contenedor de modificaciones const modsContainer = document.getElementById('modsContainer'); if (modsContainer) { modsContainer.addEventListener('change', function(e) { if (e.target.classList.contains('modTipo')) updateModPct(e.target); }); } // Tambin delegation en body para mods aadidos dinmicamente document.addEventListener('change', function(e) { if (e.target.classList.contains('modTipo')) updateModPct(e.target); }); document.addEventListener('click', function(e) { // Botn eliminar mod-row if (e.target.matches('.mod-row .btn-secondary') || e.target.textContent === '') { const row = e.target.closest('.mod-row'); if (row) row.remove(); } }); console.log('ForoMotos Herramientas: init OK OK'); // Exponer funciones globalmente para onclick inline y XenForo window.switchTab = switchTab; window.calcNeumaticos = calcNeumaticos; window.calcCadena = calcCadena; window.resetCadena = resetCadena; window.calcVeloc = calcVeloc; window.addMod = addMod; window.calcPotencia = calcPotencia; window.calcCarnet = calcCarnet; window.calcCoste = calcCoste; window.decodeVin = decodeVin; window.onVinInput = onVinInput; window.togglePlay = togglePlay; window.updateSoundModelos = updateSoundModelos; window.updateSoundEscapes = updateSoundEscapes; window.playSound = playSound; window.renderComparador = renderComparador; window.updateModPct = updateModPct; // iframe auto-resize (safe) try { if (window.parent !== window) { var h = document.body.scrollHeight; window.parent.postMessage({type:'fm-resize',height:h},'*'); } } catch(e) {}