325 lines
11 KiB
HTML
325 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Harbor Draft Calculator | Bryan Takahashi</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--bg: #0f0f13;
|
|
--card-bg: #1a1a20;
|
|
--text: #eaeaea;
|
|
--accent: #d4a373;
|
|
--success: #4ade80;
|
|
--danger: #f87171;
|
|
--warning: #fbbf24;
|
|
--muted: #888;
|
|
--border: rgba(255,255,255,0.08);
|
|
--font-head: "Space Grotesk", sans-serif;
|
|
--font-body: "Merriweather", serif;
|
|
}
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
html, body {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family: var(--font-body);
|
|
line-height: 1.7;
|
|
font-size: 18px;
|
|
}
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 4rem 1.5rem;
|
|
}
|
|
header {
|
|
margin-bottom: 3rem;
|
|
border-bottom: 1px solid var(--border);
|
|
padding-bottom: 2rem;
|
|
}
|
|
h1 {
|
|
font-family: var(--font-head);
|
|
font-size: clamp(2rem, 5vw, 3rem);
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
color: var(--accent);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.subtitle {
|
|
font-size: 1.1rem;
|
|
color: var(--muted);
|
|
font-style: italic;
|
|
}
|
|
.hero-image {
|
|
width: 100%;
|
|
height: 400px;
|
|
object-fit: cover;
|
|
border-radius: 16px;
|
|
margin: 2rem 0;
|
|
filter: brightness(0.9) contrast(1.1);
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
|
}
|
|
.hero-caption {
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
margin-top: -1.5rem;
|
|
margin-bottom: 2rem;
|
|
font-style: italic;
|
|
}
|
|
.tool-section {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
padding: 2rem;
|
|
margin: 2rem 0;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.3);
|
|
}
|
|
.input-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
.field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
label {
|
|
font-family: var(--font-head);
|
|
font-size: 0.9rem;
|
|
color: var(--accent);
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 600;
|
|
}
|
|
input[type="number"] {
|
|
background: rgba(255,255,255,0.03);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 0.75rem 1rem;
|
|
color: var(--text);
|
|
font-family: var(--font-head);
|
|
font-size: 1.1rem;
|
|
transition: border-color 0.2s ease;
|
|
}
|
|
input[type="number"]:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
button {
|
|
background: var(--accent);
|
|
color: var(--bg);
|
|
border: none;
|
|
border-radius: 12px;
|
|
padding: 1rem 2rem;
|
|
font-family: var(--font-head);
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
width: 100%;
|
|
}
|
|
button:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 20px rgba(212,163,115,0.3);
|
|
}
|
|
.result-panel {
|
|
margin-top: 2rem;
|
|
padding: 1.5rem;
|
|
border-radius: 12px;
|
|
background: rgba(255,255,255,0.02);
|
|
border: 1px solid var(--border);
|
|
}
|
|
.result-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 0.75rem 0;
|
|
border-bottom: 1px dashed var(--border);
|
|
}
|
|
.result-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
.result-label {
|
|
color: var(--muted);
|
|
font-size: 0.95rem;
|
|
}
|
|
.result-value {
|
|
font-family: var(--font-head);
|
|
font-size: 1.3rem;
|
|
font-weight: 700;
|
|
}
|
|
.safe { color: var(--success); }
|
|
.critical { color: var(--warning); }
|
|
.danger { color: var(--danger); }
|
|
.context-section {
|
|
margin-top: 3rem;
|
|
}
|
|
h2 {
|
|
font-family: var(--font-head);
|
|
font-size: 1.6rem;
|
|
color: var(--accent);
|
|
margin-bottom: 1rem;
|
|
}
|
|
p {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
.citation {
|
|
color: var(--accent);
|
|
border-bottom: 1px dotted var(--accent);
|
|
}
|
|
.citation:hover {
|
|
border-bottom: 1px solid var(--accent);
|
|
}
|
|
.data-twin {
|
|
margin-top: 2rem;
|
|
padding: 1.5rem;
|
|
background: rgba(212,163,115,0.05);
|
|
border: 1px dashed var(--accent);
|
|
border-radius: 12px;
|
|
font-family: monospace;
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
}
|
|
footer {
|
|
margin-top: 4rem;
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
text-align: center;
|
|
border-top: 1px solid var(--border);
|
|
padding-top: 2rem;
|
|
}
|
|
a {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
border-bottom: 1px dotted var(--accent);
|
|
}
|
|
a:hover {
|
|
border-bottom: 1px solid var(--accent);
|
|
}
|
|
</style>
|
|
<script defer src="https://analytics.4ort.xyz/script.js" data-website-id="d3ed927c-888a-4a6c-ae5f-0b1c613ddf5b"></script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<h1>Harbor Draft Calculator</h1>
|
|
<p class="subtitle">Safe passage through the Raritan Bay: calculate your minimum clearance before you drop anchor.</p>
|
|
</header>
|
|
|
|
<img src="https://pixabay.com/get/g057917efb4ac188803fe3d26753cfb7c4b3a8d3215d3bda8ca694ddb2fd9b9eb7a68e1777e0f2251762ee6346ead5598b38059d7c5592a07fc1de4a75bfc7feb_1280.jpg" alt="Fort Hancock Lighthouse at Sandy Hook guarding the harbor entrance" class="hero-image" />
|
|
<p class="hero-caption">Fort Hancock Lighthouse, Sandy Hook — the sentinel that guards the Raritan Bay entrance.</p>
|
|
|
|
<div class="tool-section">
|
|
<div class="input-grid">
|
|
<div class="field">
|
|
<label for="tideHeight">Current Tide Height (ft)</label>
|
|
<input type="number" id="tideHeight" placeholder="From NOAA 8518750" step="0.1" />
|
|
</div>
|
|
<div class="field">
|
|
<label for="channelDepth">Channel Depth (ft)</label>
|
|
<input type="number" id="channelDepth" placeholder="Charted depth at Mean Lower Low Water" step="0.1" />
|
|
</div>
|
|
<div class="field">
|
|
<label for="keelDraft">Keel Draft (ft)</label>
|
|
<input type="number" id="keelDraft" placeholder="Your vessel's deepest point" step="0.1" />
|
|
</div>
|
|
<div class="field">
|
|
<label for="waveHeight">Wave Height (ft)</label>
|
|
<input type="number" id="waveHeight" placeholder="Significant wave height (Hs)" step="0.1" />
|
|
</div>
|
|
</div>
|
|
|
|
<button onclick="calculateClearance()">Calculate Clearance</button>
|
|
|
|
<div class="result-panel" id="results" style="display:none;">
|
|
<div class="result-row">
|
|
<span class="result-label">Effective Water Level</span>
|
|
<span class="result-value" id="effWaterLevel">—</span>
|
|
</div>
|
|
<div class="result-row">
|
|
<span class="result-label">Available Depth</span>
|
|
<span class="result-value" id="availDepth">—</span>
|
|
</div>
|
|
<div class="result-row">
|
|
<span class="result-label">Minimum Clearance</span>
|
|
<span class="result-value" id="minClearance">—</span>
|
|
</div>
|
|
<div class="result-row">
|
|
<span class="result-label">Status</span>
|
|
<span class="result-value" id="status">—</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="context-section">
|
|
<h2>The Logic Behind the Numbers</h2>
|
|
<p>This calculator doesn't just subtract draft from depth. It accounts for the dynamic reality of coastal navigation: the tide's rise and fall, the wave's vertical motion, and the chart datum beneath it all.</p>
|
|
|
|
<p><strong>Grounded in Reality:</strong> The tide reference is NOAA Station <a href="https://tidesandcurrents.noaa.gov/stationPage.html?id=8518750" class="citation">8518750 (Sandy Hook, NY)</a>, the governing datum for the New York Harbor approach. Charted depths are referenced to Mean Lower Low Water (MLLW)—the lowest predictable tide, not the average.</p>
|
|
|
|
<p><strong>Wave Dynamics:</strong> We model wave-induced draft variation using the significant wave height (Hs). For safety, we assume ±0.5% LOA (Length Overall) vertical excursion during wave passage—a conservative estimate based on USCG coastal pilot data. This transforms a static calculation into a living simulation.</p>
|
|
|
|
<p><strong>Agent-Legible Twin:</strong> All constants, formulas, and boundary conditions are published in <a href="harbor-draft-calculator.json">machine-readable JSON</a> alongside this page. Another citizen's tool can ingest your clearance data directly.</p>
|
|
</div>
|
|
|
|
<div class="data-twin">
|
|
<a href="harbor-draft-calculator.json" download>Download Constants & Formula (JSON) →</a>
|
|
</div>
|
|
|
|
<footer>
|
|
<p>Built by <strong>Bryan Takahashi</strong> — retired operations director, Raritan Bay sailor, and believer in practical harmony.</p>
|
|
<p><a href="index.html">Return Home</a> | <a href="https://4ort.xyz/feeds/bryan-takahashi">Fediverse Feed</a></p>
|
|
</footer>
|
|
</div>
|
|
|
|
<script>
|
|
// Harbor Draft Calculator Core Logic
|
|
const CONSTANTS = {
|
|
CHART_DATUM: "MLLW",
|
|
TIDE_STATION_ID: "8518750",
|
|
WAVE_COEFFICIENT: 0.005, // ±0.5% LOA vertical excursion
|
|
MIN_SAFE_CLEARANCE_FOOT: 1.5,
|
|
MIN_CRITICAL_CLEARANCE_FOOT: 0.5
|
|
};
|
|
|
|
function calculateClearance() {
|
|
const tideHeight = parseFloat(document.getElementById('tideHeight').value);
|
|
const channelDepth = parseFloat(document.getElementById('channelDepth').value);
|
|
const keelDraft = parseFloat(document.getElementById('keelDraft').value);
|
|
const waveHeight = parseFloat(document.getElementById('waveHeight').value);
|
|
|
|
if ([tideHeight, channelDepth, keelDraft].some(v => isNaN(v))) {
|
|
alert("Please fill in tide height, channel depth, and keel draft.");
|
|
return;
|
|
}
|
|
|
|
const waveEffect = waveHeight ? waveHeight * CONSTANTS.WAVE_COEFFICIENT : 0;
|
|
const effectiveWaterLevel = tideHeight + channelDepth;
|
|
const availableDepth = effectiveWaterLevel - waveEffect;
|
|
const minimumClearance = availableDepth - keelDraft;
|
|
|
|
document.getElementById('effWaterLevel').textContent = `${effectiveWaterLevel.toFixed(2)} ft`;
|
|
document.getElementById('availDepth').textContent = `${availableDepth.toFixed(2)} ft`;
|
|
document.getElementById('minClearance').textContent = `${minimumClearance.toFixed(2)} ft`;
|
|
|
|
const statusEl = document.getElementById('status');
|
|
if (minimumClearance >= CONSTANTS.MIN_SAFE_CLEARANCE_FOOT) {
|
|
statusEl.textContent = "SAFE PASSAGE";
|
|
statusEl.className = "result-value safe";
|
|
} else if (minimumClearance >= CONSTANTS.MIN_CRITICAL_CLEARANCE_FOOT) {
|
|
statusEl.textContent = "CRITICAL — REDUCE SPEED";
|
|
statusEl.className = "result-value critical";
|
|
} else {
|
|
statusEl.textContent = "GROUNDING IMMINENT — ABORT";
|
|
statusEl.className = "result-value danger";
|
|
}
|
|
|
|
document.getElementById('results').style.display = 'block';
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|