400 lines
12 KiB
HTML
400 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Lunar Port Buffer Simulator | Jonathan Ryan</title>
|
|
<style>
|
|
:root {
|
|
--bg-deep: #0a0f1c;
|
|
--glass-panel: rgba(255, 255, 255, 0.03);
|
|
--border-glow: rgba(100, 200, 255, 0.15);
|
|
--text-primary: #e0f0ff;
|
|
--accent-sunrise: #ff6b35;
|
|
--data-stream: #00f0ff;
|
|
}
|
|
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
background: var(--bg-deep);
|
|
color: var(--text-primary);
|
|
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
min-height: 100vh;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 2rem;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.sim-container {
|
|
width: 1200px;
|
|
max-width: 100%;
|
|
display: grid;
|
|
grid-template-columns: 1fr 1.5fr 1fr;
|
|
gap: 2rem;
|
|
align-items: start;
|
|
}
|
|
|
|
header {
|
|
grid-column: 1 / -1;
|
|
border-bottom: 1px solid var(--border-glow);
|
|
padding-bottom: 2rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
h1 {
|
|
font-weight: 300;
|
|
letter-spacing: 0.2em;
|
|
text-transform: uppercase;
|
|
font-size: clamp(1.5rem, 4vw, 2.5rem);
|
|
background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-sunrise) 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.subtitle {
|
|
font-size: 0.85rem;
|
|
opacity: 0.7;
|
|
letter-spacing: 0.1em;
|
|
}
|
|
|
|
.panel {
|
|
background: var(--glass-panel);
|
|
backdrop-filter: blur(20px);
|
|
border: 1px solid var(--border-glow);
|
|
border-radius: 12px;
|
|
padding: 2rem;
|
|
position: relative;
|
|
}
|
|
|
|
.panel::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0; left: 0; right: 0; height: 1px;
|
|
background: linear-gradient(90deg, transparent, var(--accent-sunrise), transparent);
|
|
opacity: 0.3;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.15em;
|
|
margin-bottom: 1.5rem;
|
|
color: var(--accent-sunrise);
|
|
}
|
|
|
|
.input-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
font-size: 0.75rem;
|
|
letter-spacing: 0.1em;
|
|
margin-bottom: 0.5rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
input[type="range"] {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 2px;
|
|
appearance: none;
|
|
outline: none;
|
|
}
|
|
|
|
input[type="range"]::-webkit-slider-thumb {
|
|
appearance: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
background: var(--accent-sunrise);
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
box-shadow: 0 0 20px var(--accent-sunrise);
|
|
}
|
|
|
|
.value-display {
|
|
float: right;
|
|
font-family: 'SF Mono', monospace;
|
|
font-size: 0.85rem;
|
|
color: var(--data-stream);
|
|
}
|
|
|
|
.output-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1.5rem;
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.metric-card {
|
|
background: rgba(0, 240, 255, 0.05);
|
|
border: 1px solid rgba(0, 240, 255, 0.2);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.metric-card:hover {
|
|
border-color: var(--data-stream);
|
|
box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
|
|
}
|
|
|
|
.metric-label {
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.15em;
|
|
opacity: 0.7;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.metric-value {
|
|
font-family: 'SF Mono', monospace;
|
|
font-size: 2rem;
|
|
font-weight: 300;
|
|
color: var(--data-stream);
|
|
line-height: 1;
|
|
}
|
|
|
|
.metric-unit {
|
|
font-size: 0.9rem;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.visualization {
|
|
height: 400px;
|
|
background: radial-gradient(circle at 50% 100%, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
|
|
border-radius: 12px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sun-path {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 2px;
|
|
height: 300px;
|
|
background: linear-gradient(to top, var(--accent-sunrise), transparent);
|
|
transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.cargo-node {
|
|
position: absolute;
|
|
width: 16px;
|
|
height: 16px;
|
|
background: var(--data-stream);
|
|
border-radius: 50%;
|
|
box-shadow: 0 0 30px var(--data-stream);
|
|
transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.formula-ref {
|
|
margin-top: 3rem;
|
|
font-size: 0.7rem;
|
|
opacity: 0.5;
|
|
font-family: 'SF Mono', monospace;
|
|
text-align: center;
|
|
}
|
|
|
|
.nav-link {
|
|
position: fixed;
|
|
top: 2rem;
|
|
right: 2rem;
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
font-size: 0.8rem;
|
|
letter-spacing: 0.1em;
|
|
opacity: 0.6;
|
|
transition: opacity 0.3s;
|
|
}
|
|
|
|
.nav-link:hover { opacity: 1; }
|
|
|
|
@media (max-width: 1024px) {
|
|
.sim-container {
|
|
grid-template-columns: 1fr;
|
|
grid-template-rows: auto auto auto;
|
|
}
|
|
}
|
|
</style>
|
|
<script defer src="https://analytics.4ort.xyz/script.js" data-website-id="d3ed927c-888a-4a6c-ae5f-0b1c613ddf5b"></script>
|
|
</head>
|
|
<body>
|
|
<a href="/index.html" class="nav-link">◄ PORTAL</a>
|
|
|
|
<div class="sim-container">
|
|
<header>
|
|
<h1>Lunar Port<br>Buffer Simulator</h1>
|
|
<div class="subtitle">DMAIC Phase: CONTROL | Anchor: Solar Elevation 5°</div>
|
|
</header>
|
|
|
|
<section class="panel">
|
|
<h2>Input Matrix</h2>
|
|
|
|
<div class="input-group">
|
|
<label>CARGO MASS <span class="value-display" id="disp-mass">45,000 kg</span></label>
|
|
<input type="range" id="mass" min="1000" max="150000" step="1000" value="45000">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label>SOLAR ELEVATION <span class="value-display" id="disp-elev">12.4°</span></label>
|
|
<input type="range" id="elevation" min="5" max="90" step="0.1" value="12.4">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label>ATMOSPHERIC DRAG COEFF <span class="value-display" id="disp-drag">0.00014</span></label>
|
|
<input type="range" id="drag" min="0.00001" max="0.001" step="0.00001" value="0.00014">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label>PORT TRAFFIC DENSITY <span class="value-display" id="disp-traffic">23 nodes</span></label>
|
|
<input type="range" id="traffic" min="1" max="100" step="1" value="23">
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
<label>RELEASE PRECISION <span class="value-display" id="disp-precision">0.003°</span></label>
|
|
<input type="range" id="precision" min="0.001" max="0.1" step="0.001" value="0.003">
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<h2>Visualization</h2>
|
|
<div class="visualization" id="viz-canvas">
|
|
<div class="sun-path" id="sun-beam"></div>
|
|
<div class="cargo-node" id="cargo-marker"></div>
|
|
</div>
|
|
<div class="formula-ref">
|
|
Grounded in: lunar-gravity = 1.62 m/s² | CNT composite thermal coeff = 0.5 ppm/K
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<h2>Control Outputs</h2>
|
|
|
|
<div class="output-grid">
|
|
<div class="metric-card">
|
|
<div class="metric-label">Optimal Release Window</div>
|
|
<div class="metric-value" id="out-window">0</div>
|
|
<div class="metric-unit">seconds</div>
|
|
</div>
|
|
|
|
<div class="metric-card">
|
|
<div class="metric-label">Thermal Stress Margin</div>
|
|
<div class="metric-value" id="out-thermal">0</div>
|
|
<div class="metric-unit">percent</div>
|
|
</div>
|
|
|
|
<div class="metric-card">
|
|
<div class="metric-label">Collision Risk Probability</div>
|
|
<div class="metric-value" id="out-risk">0</div>
|
|
<div class="metric-unit">%</div>
|
|
</div>
|
|
|
|
<div class="metric-card">
|
|
<div class="metric-label">Launch Viability</div>
|
|
<div class="metric-value" id="out-viable" style="color: var(--accent-sunrise)">STANDBY</div>
|
|
<div class="metric-unit">status</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script>
|
|
const CONSTANTS = {
|
|
GRAV_LUNAR_MS2: 1.62,
|
|
MAX_TEMP_K: 1800,
|
|
AMBIENT_BASE_K: 100
|
|
};
|
|
|
|
const inputs = {
|
|
mass: document.getElementById('mass'),
|
|
elevation: document.getElementById('elevation'),
|
|
drag: document.getElementById('drag'),
|
|
traffic: document.getElementById('traffic'),
|
|
precision: document.getElementById('precision')
|
|
};
|
|
|
|
const displays = {
|
|
mass: document.getElementById('disp-mass'),
|
|
elevation: document.getElementById('disp-elev'),
|
|
drag: document.getElementById('disp-drag'),
|
|
traffic: document.getElementById('disp-traffic'),
|
|
precision: document.getElementById('disp-precision')
|
|
};
|
|
|
|
const outputs = {
|
|
window: document.getElementById('out-window'),
|
|
thermal: document.getElementById('out-thermal'),
|
|
risk: document.getElementById('out-risk'),
|
|
viable: document.getElementById('out-viable')
|
|
};
|
|
|
|
const viz = {
|
|
sunBeam: document.getElementById('sun-beam'),
|
|
cargoNode: document.getElementById('cargo-marker')
|
|
};
|
|
|
|
function formatNumber(n, decimals = 2) {
|
|
return n.toLocaleString('en-US', { minimumFractionDigits: decimals, maximumFractionDigits: decimals });
|
|
}
|
|
|
|
function compute() {
|
|
const mass_kg = parseFloat(inputs.mass.value);
|
|
const elev_deg = parseFloat(inputs.elevation.value);
|
|
const drag_coef = parseFloat(inputs.drag.value);
|
|
const traffic_nodes = parseInt(inputs.traffic.value);
|
|
const precision_deg = parseFloat(inputs.precision.value);
|
|
|
|
// Update displays
|
|
displays.mass.textContent = `${formatNumber(mass_kg)} kg`;
|
|
displays.elevation.textContent = `${elev_deg.toFixed(1)}°`;
|
|
displays.drag.textContent = drag_coef.toExponential(2);
|
|
displays.traffic.textContent = `${traffic_nodes} nodes`;
|
|
displays.precision.textContent = `${precision_deg.toFixed(3)}°`;
|
|
|
|
// Formula 1: Optimal Release Window
|
|
// sqrt(2 * mass * g_lunar) / sqrt(drag) * sin(elevation_rad)
|
|
const elev_rad = elev_deg * Math.PI / 180;
|
|
const window_sec = (Math.sqrt(2 * mass_kg * CONSTANTS.GRAV_LUNAR_MS2) / Math.sqrt(drag_coef)) * Math.sin(elev_rad);
|
|
|
|
// Formula 2: Thermal Stress Margin
|
|
// (max_temp - ambient) / max_temp * 100
|
|
// Ambient scales with elevation: base + 10 * sin(elev)
|
|
const ambient_K = CONSTANTS.AMBIENT_BASE_K + 100 * Math.sin(elev_rad);
|
|
const thermal_pct = ((CONSTANTS.MAX_TEMP_K - ambient_K) / CONSTANTS.MAX_TEMP_K) * 100;
|
|
|
|
// Formula 3: Collision Risk Probability
|
|
// exp(-1 * (precision / 0.001) * traffic)
|
|
const risk_prob = Math.exp(-1 * (precision_deg / 0.001) * traffic_nodes) * 100;
|
|
|
|
// Viability check
|
|
const viable = (window_sec > 0 && thermal_pct > 15 && risk_prob < 5);
|
|
|
|
// Render outputs
|
|
outputs.window.textContent = formatNumber(window_sec, 1);
|
|
outputs.thermal.textContent = formatNumber(thermal_pct, 1);
|
|
outputs.risk.textContent = formatNumber(risk_prob, 4);
|
|
outputs.viable.textContent = viable ? "GO" : "HOLD";
|
|
outputs.viable.style.color = viable ? "#00f0ff" : "#ff6b35";
|
|
|
|
// Update visualization
|
|
viz.sunBeam.style.height = `${elev_deg * 3}px`;
|
|
viz.cargoNode.style.bottom = `${elev_deg * 3}px`;
|
|
viz.cargoNode.style.left = `${50 + (window_sec / 100)}%`;
|
|
}
|
|
|
|
Object.values(inputs).forEach(input => {
|
|
input.addEventListener('input', compute);
|
|
});
|
|
|
|
// Initial computation
|
|
compute();
|
|
</script>
|
|
</body>
|
|
</html> |