Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Cosmic Explorer Dashboard</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap'); | |
:root { | |
--primary: #6d28d9; | |
--secondary: #10b981; | |
--dark: #1e293b; | |
--light: #f8fafc; | |
} | |
body { | |
font-family: 'Space Grotesk', sans-serif; | |
background-color: #0f172a; | |
color: var(--light); | |
} | |
.gradient-bg { | |
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); | |
} | |
.card-glass { | |
background: rgba(30, 41, 59, 0.5); | |
backdrop-filter: blur(10px); | |
border: 1px solid rgba(255, 255, 255, 0.1); | |
transition: all 0.3s ease; | |
} | |
.card-glass:hover { | |
transform: translateY(-2px); | |
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); | |
} | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
@keyframes pulse { | |
0% { | |
box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.7); | |
} | |
70% { | |
box-shadow: 0 0 0 10px rgba(109, 40, 217, 0); | |
} | |
100% { | |
box-shadow: 0 0 0 0 rgba(109, 40, 217, 0); | |
} | |
} | |
.orbit { | |
position: relative; | |
width: 200px; | |
height: 200px; | |
} | |
.planet { | |
position: absolute; | |
width: 30px; | |
height: 30px; | |
border-radius: 50%; | |
background: var(--secondary); | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} | |
.moon { | |
position: absolute; | |
width: 12px; | |
height: 12px; | |
border-radius: 50%; | |
background: #f8fafc; | |
animation: orbit 8s linear infinite; | |
} | |
@keyframes orbit { | |
from { transform: rotate(0deg) translateX(60px) rotate(0deg); } | |
to { transform: rotate(360deg) translateX(60px) rotate(-360deg); } | |
} | |
.progress-ring { | |
transform: rotate(-90deg); | |
} | |
.progress-ring__circle { | |
transition: stroke-dashoffset 0.5s; | |
} | |
.notification { | |
animation: slideIn 0.5s forwards; | |
} | |
@keyframes slideIn { | |
from { transform: translateX(100%); opacity: 0; } | |
to { transform: translateX(0); opacity: 1; } | |
} | |
.notification.hide { | |
animation: slideOut 0.5s forwards; | |
} | |
@keyframes slideOut { | |
from { transform: translateX(0); opacity: 1; } | |
to { transform: translateX(100%); opacity: 0; } | |
} | |
</style> | |
</head> | |
<body class="min-h-screen gradient-bg"> | |
<div class="container mx-auto px-4 py-8"> | |
<!-- Notification Area --> | |
<div id="notificationArea" class="fixed top-4 right-4 z-50 w-80"></div> | |
<!-- Header --> | |
<header class="flex justify-between items-center mb-10"> | |
<div class="flex items-center space-x-3"> | |
<div class="w-12 h-12 rounded-full bg-purple-600 flex items-center justify-center"> | |
<i class="fas fa-rocket text-white text-xl"></i> | |
</div> | |
<h1 class="text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-emerald-400"> | |
Cosmic Explorer | |
</h1> | |
</div> | |
<div class="flex items-center space-x-4"> | |
<button id="notificationBtn" class="relative p-2 rounded-full hover:bg-slate-700 transition"> | |
<i class="fas fa-bell text-slate-300"></i> | |
<span id="notificationBadge" class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full hidden"></span> | |
</button> | |
<div class="flex items-center space-x-2"> | |
<div class="w-10 h-10 rounded-full bg-slate-600 flex items-center justify-center"> | |
<i class="fas fa-user-astronaut text-white"></i> | |
</div> | |
<span class="font-medium">Explorer</span> | |
</div> | |
</div> | |
</header> | |
<!-- Main Content --> | |
<main class="grid grid-cols-1 lg:grid-cols-3 gap-6"> | |
<!-- Left Sidebar --> | |
<div class="lg:col-span-1 space-y-6"> | |
<!-- Mission Status --> | |
<div class="card-glass rounded-xl p-6"> | |
<h2 class="text-lg font-semibold mb-4 flex items-center"> | |
<i class="fas fa-satellite-dish mr-2 text-purple-400"></i> | |
Mission Status | |
</h2> | |
<div class="space-y-4"> | |
<div class="flex items-center justify-between"> | |
<span class="text-slate-300">Fuel Level</span> | |
<div class="w-24 bg-slate-700 rounded-full h-2"> | |
<div id="fuelLevel" class="bg-emerald-400 h-2 rounded-full" style="width: 85%"></div> | |
</div> | |
</div> | |
<div class="flex items-center justify-between"> | |
<span class="text-slate-300">Oxygen Supply</span> | |
<div class="w-24 bg-slate-700 rounded-full h-2"> | |
<div id="oxygenLevel" class="bg-blue-400 h-2 rounded-full" style="width: 72%"></div> | |
</div> | |
</div> | |
<div class="flex items-center justify-between"> | |
<span class="text-slate-300">Power Output</span> | |
<div class="w-24 bg-slate-700 rounded-full h-2"> | |
<div id="powerLevel" class="bg-purple-400 h-2 rounded-full" style="width: 93%"></div> | |
</div> | |
</div> | |
</div> | |
<button id="launchBtn" class="mt-6 w-full py-2 bg-purple-600 hover:bg-purple-700 rounded-lg font-medium transition flex items-center justify-center space-x-2"> | |
<i class="fas fa-play"></i> | |
<span>Launch Sequence</span> | |
</button> | |
</div> | |
<!-- Recent Discoveries --> | |
<div class="card-glass rounded-xl p-6"> | |
<h2 class="text-lg font-semibold mb-4 flex items-center"> | |
<i class="fas fa-star mr-2 text-yellow-400"></i> | |
Recent Discoveries | |
</h2> | |
<div class="space-y-3"> | |
<div class="discovery-item flex items-start space-x-3 p-2 rounded-lg hover:bg-slate-700 cursor-pointer transition" data-info="Quantum Nebula located in Andromeda sector. Contains high concentrations of exotic matter."> | |
<div class="w-10 h-10 rounded-full bg-slate-700 flex items-center justify-center"> | |
<i class="fas fa-atom text-purple-400"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Quantum Nebula</h3> | |
<p class="text-sm text-slate-400">Located in Andromeda sector</p> | |
</div> | |
</div> | |
<div class="discovery-item flex items-start space-x-3 p-2 rounded-lg hover:bg-slate-700 cursor-pointer transition" data-info="Crystalline Asteroid rich in rare minerals. Preliminary scans show 78% purity of unobtanium."> | |
<div class="w-10 h-10 rounded-full bg-slate-700 flex items-center justify-center"> | |
<i class="fas fa-meteor text-orange-400"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Crystalline Asteroid</h3> | |
<p class="text-sm text-slate-400">Rich in rare minerals</p> | |
</div> | |
</div> | |
<div class="discovery-item flex items-start space-x-3 p-2 rounded-lg hover:bg-slate-700 cursor-pointer transition" data-info="Aqua Planet with 94% surface water coverage. Atmospheric composition suggests potential for microbial life."> | |
<div class="w-10 h-10 rounded-full bg-slate-700 flex items-center justify-center"> | |
<i class="fas fa-water text-blue-400"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Aqua Planet</h3> | |
<p class="text-sm text-slate-400">Potential for life</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Main Dashboard --> | |
<div class="lg:col-span-2 space-y-6"> | |
<!-- Orbit Visualization --> | |
<div class="card-glass rounded-xl p-6"> | |
<div class="flex justify-between items-center mb-6"> | |
<h2 class="text-lg font-semibold flex items-center"> | |
<i class="fas fa-globe-americas mr-2 text-emerald-400"></i> | |
Current Orbit | |
</h2> | |
<div class="flex space-x-2"> | |
<button id="zoomInBtn" class="px-3 py-1 bg-slate-700 hover:bg-slate-600 rounded-lg text-sm transition">Zoom In</button> | |
<button id="zoomOutBtn" class="px-3 py-1 bg-slate-700 hover:bg-slate-600 rounded-lg text-sm transition">Zoom Out</button> | |
</div> | |
</div> | |
<div class="flex flex-col items-center"> | |
<div class="orbit mb-6"> | |
<div class="planet pulse"></div> | |
<div class="moon"></div> | |
</div> | |
<div class="w-full bg-slate-800 rounded-lg p-4"> | |
<div class="flex justify-between text-sm mb-2"> | |
<span>Orbital Velocity</span> | |
<span id="orbitalVelocity" class="font-mono">7.8 km/s</span> | |
</div> | |
<div class="flex justify-between text-sm mb-2"> | |
<span>Altitude</span> | |
<span id="altitude" class="font-mono">402 km</span> | |
</div> | |
<div class="flex justify-between text-sm"> | |
<span>Inclination</span> | |
<span id="inclination" class="font-mono">51.6°</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Telemetry Data --> | |
<div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
<div class="card-glass rounded-xl p-6"> | |
<h2 class="text-lg font-semibold mb-4 flex items-center"> | |
<i class="fas fa-temperature-high mr-2 text-red-400"></i> | |
Thermal Control | |
</h2> | |
<div class="space-y-4"> | |
<div> | |
<div class="flex justify-between text-sm mb-1"> | |
<span>External</span> | |
<span id="externalTemp">-120°C</span> | |
</div> | |
<div class="w-full bg-slate-800 rounded-full h-2"> | |
<div id="externalTempBar" class="bg-blue-400 h-2 rounded-full" style="width: 15%"></div> | |
</div> | |
</div> | |
<div> | |
<div class="flex justify-between text-sm mb-1"> | |
<span>Internal</span> | |
<span id="internalTemp">22°C</span> | |
</div> | |
<div class="w-full bg-slate-800 rounded-full h-2"> | |
<div id="internalTempBar" class="bg-green-400 h-2 rounded-full" style="width: 65%"></div> | |
</div> | |
</div> | |
<div> | |
<div class="flex justify-between text-sm mb-1"> | |
<span>Engine</span> | |
<span id="engineTemp">320°C</span> | |
</div> | |
<div class="w-full bg-slate-800 rounded-full h-2"> | |
<div id="engineTempBar" class="bg-red-400 h-2 rounded-full" style="width: 80%"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="card-glass rounded-xl p-6"> | |
<h2 class="text-lg font-semibold mb-4 flex items-center"> | |
<i class="fas fa-tachometer-alt mr-2 text-purple-400"></i> | |
Navigation Data | |
</h2> | |
<div class="grid grid-cols-2 gap-4"> | |
<div class="bg-slate-800 p-3 rounded-lg"> | |
<div class="text-xs text-slate-400 mb-1">Latitude</div> | |
<div id="latitude" class="font-mono">28.5° N</div> | |
</div> | |
<div class="bg-slate-800 p-3 rounded-lg"> | |
<div class="text-xs text-slate-400 mb-1">Longitude</div> | |
<div id="longitude" class="font-mono">80.6° W</div> | |
</div> | |
<div class="bg-slate-800 p-3 rounded-lg"> | |
<div class="text-xs text-slate-400 mb-1">Speed</div> | |
<div id="speed" class="font-mono">7.66 km/s</div> | |
</div> | |
<div class="bg-slate-800 p-3 rounded-lg"> | |
<div class="text-xs text-slate-400 mb-1">Altitude</div> | |
<div id="navAltitude" class="font-mono">402 km</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Communication Controls --> | |
<div class="card-glass rounded-xl p-6"> | |
<h2 class="text-lg font-semibold mb-4 flex items-center"> | |
<i class="fas fa-broadcast-tower mr-2 text-blue-400"></i> | |
Communication | |
</h2> | |
<div class="flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0"> | |
<div class="flex items-center space-x-3"> | |
<div class="relative"> | |
<div class="w-12 h-12 rounded-full bg-blue-900 flex items-center justify-center"> | |
<i class="fas fa-satellite text-blue-300"></i> | |
</div> | |
<div id="signalStatus" class="absolute -bottom-1 -right-1 w-5 h-5 bg-green-500 rounded-full border-2 border-slate-800"></div> | |
</div> | |
<div> | |
<h3 class="font-medium">Signal Strength</h3> | |
<p id="connectionStatus" class="text-sm text-slate-400">Connected to Deep Space Network</p> | |
</div> | |
</div> | |
<div class="flex space-x-3"> | |
<button id="transmitBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg flex items-center space-x-2 transition"> | |
<i class="fas fa-microphone"></i> | |
<span>Transmit</span> | |
</button> | |
<button id="receiveBtn" class="px-4 py-2 bg-slate-700 hover:bg-slate-600 rounded-lg flex items-center space-x-2 transition"> | |
<i class="fas fa-headphones"></i> | |
<span>Receive</span> | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> | |
<!-- Discovery Modal --> | |
<div id="discoveryModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden"> | |
<div class="card-glass rounded-xl p-6 max-w-md w-full mx-4"> | |
<div class="flex justify-between items-center mb-4"> | |
<h3 id="modalTitle" class="text-xl font-bold"></h3> | |
<button id="closeModalBtn" class="text-slate-400 hover:text-white"> | |
<i class="fas fa-times"></i> | |
</button> | |
</div> | |
<p id="modalContent" class="text-slate-300 mb-4"></p> | |
<button id="scanBtn" class="w-full py-2 bg-purple-600 hover:bg-purple-700 rounded-lg font-medium transition flex items-center justify-center space-x-2"> | |
<i class="fas fa-search"></i> | |
<span>Initiate Deep Scan</span> | |
</button> | |
</div> | |
</div> | |
<!-- Footer --> | |
<footer class="mt-12 pt-6 border-t border-slate-800 text-center text-slate-500 text-sm"> | |
<p>Cosmic Explorer Dashboard v1.0 • Mission Control: Houston</p> | |
<p class="mt-1">© 2023 Space Exploration Technologies</p> | |
</footer> | |
</div> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
// Notification system | |
const notificationBtn = document.getElementById('notificationBtn'); | |
const notificationBadge = document.getElementById('notificationBadge'); | |
const notificationArea = document.getElementById('notificationArea'); | |
let notificationCount = 0; | |
function showNotification(message, type = 'info') { | |
notificationCount++; | |
notificationBadge.classList.remove('hidden'); | |
const colors = { | |
info: 'bg-blue-600', | |
warning: 'bg-yellow-600', | |
danger: 'bg-red-600', | |
success: 'bg-green-600' | |
}; | |
const icon = { | |
info: 'fa-info-circle', | |
warning: 'fa-exclamation-triangle', | |
danger: 'fa-exclamation-circle', | |
success: 'fa-check-circle' | |
}; | |
const notification = document.createElement('div'); | |
notification.className = `notification mb-2 p-3 rounded-lg ${colors[type]} text-white flex items-start`; | |
notification.innerHTML = ` | |
<i class="fas ${icon[type]} mr-2 mt-1"></i> | |
<div> | |
<p class="text-sm">${message}</p> | |
<p class="text-xs opacity-80 mt-1">Just now</p> | |
</div> | |
<button class="ml-auto text-white opacity-70 hover:opacity-100"> | |
<i class="fas fa-times"></i> | |
</button> | |
`; | |
const closeBtn = notification.querySelector('button'); | |
closeBtn.addEventListener('click', () => { | |
notification.classList.add('hide'); | |
setTimeout(() => { | |
notification.remove(); | |
notificationCount--; | |
if (notificationCount === 0) { | |
notificationBadge.classList.add('hidden'); | |
} | |
}, 500); | |
}); | |
notificationArea.appendChild(notification); | |
// Auto-remove after 5 seconds | |
setTimeout(() => { | |
if (notification.parentNode) { | |
notification.classList.add('hide'); | |
setTimeout(() => { | |
notification.remove(); | |
notificationCount--; | |
if (notificationCount === 0) { | |
notificationBadge.classList.add('hidden'); | |
} | |
}, 500); | |
} | |
}, 5000); | |
} | |
// Simulate random notifications | |
setInterval(() => { | |
const messages = [ | |
"New cosmic anomaly detected in sector 7G", | |
"Solar flare activity increasing", | |
"Communication relay established with Mars colony", | |
"Fuel consumption within expected parameters", | |
"Navigation systems recalibrated" | |
]; | |
const types = ['info', 'warning', 'success']; | |
if (Math.random() > 0.7) { | |
showNotification( | |
messages[Math.floor(Math.random() * messages.length)], | |
types[Math.floor(Math.random() * types.length)] | |
); | |
} | |
}, 10000); | |
// Launch sequence button | |
const launchBtn = document.getElementById('launchBtn'); | |
let launchSequence = false; | |
launchBtn.addEventListener('click', function() { | |
if (!launchSequence) { | |
launchSequence = true; | |
this.innerHTML = '<i class="fas fa-spinner fa-spin"></i><span>Launching...</span>'; | |
this.classList.remove('bg-purple-600', 'hover:bg-purple-700'); | |
this.classList.add('bg-red-600', 'hover:bg-red-700'); | |
// Simulate countdown | |
let count = 5; | |
const countdown = setInterval(() => { | |
if (count > 0) { | |
showNotification(`T-${count} seconds to launch`, 'danger'); | |
count--; | |
} else { | |
clearInterval(countdown); | |
showNotification('🚀 Launch successful!', 'success'); | |
this.innerHTML = '<i class="fas fa-check"></i><span>Launch Complete</span>'; | |
// Update mission status | |
updateFuelLevel(-15); | |
updatePowerLevel(-10); | |
// Update orbit data | |
updateOrbitData(); | |
} | |
}, 1000); | |
} | |
}); | |
// Discovery items | |
const discoveryItems = document.querySelectorAll('.discovery-item'); | |
const discoveryModal = document.getElementById('discoveryModal'); | |
const modalTitle = document.getElementById('modalTitle'); | |
const modalContent = document.getElementById('modalContent'); | |
const closeModalBtn = document.getElementById('closeModalBtn'); | |
const scanBtn = document.getElementById('scanBtn'); | |
discoveryItems.forEach(item => { | |
item.addEventListener('click', function() { | |
const title = this.querySelector('h3').textContent; | |
const info = this.getAttribute('data-info'); | |
modalTitle.textContent = title; | |
modalContent.textContent = info; | |
discoveryModal.classList.remove('hidden'); | |
}); | |
}); | |
closeModalBtn.addEventListener('click', function() { | |
discoveryModal.classList.add('hidden'); | |
}); | |
scanBtn.addEventListener('click', function() { | |
showNotification('Deep scan initiated for ' + modalTitle.textContent, 'info'); | |
discoveryModal.classList.add('hidden'); | |
// Simulate scan results after delay | |
setTimeout(() => { | |
showNotification('Scan complete! Data available for analysis.', 'success'); | |
}, 3000); | |
}); | |
// Zoom buttons | |
const zoomInBtn = document.getElementById('zoomInBtn'); | |
const zoomOutBtn = document.getElementById('zoomOutBtn'); | |
const orbit = document.querySelector('.orbit'); | |
let zoomLevel = 1; | |
zoomInBtn.addEventListener('click', function() { | |
if (zoomLevel < 2) { | |
zoomLevel += 0.2; | |
orbit.style.transform = `scale(${zoomLevel})`; | |
} | |
}); | |
zoomOutBtn.addEventListener('click', function() { | |
if (zoomLevel > 0.6) { | |
zoomLevel -= 0.2; | |
orbit.style.transform = `scale(${zoomLevel})`; | |
} | |
}); | |
// Communication buttons | |
const transmitBtn = document.getElementById('transmitBtn'); | |
const receiveBtn = document.getElementById('receiveBtn'); | |
const signalStatus = document.getElementById('signalStatus'); | |
const connectionStatus = document.getElementById('connectionStatus'); | |
transmitBtn.addEventListener('click', function() { | |
showNotification('Transmitting message to Mission Control...', 'info'); | |
signalStatus.classList.remove('bg-green-500'); | |
signalStatus.classList.add('bg-yellow-500'); | |
setTimeout(() => { | |
signalStatus.classList.remove('bg-yellow-500'); | |
signalStatus.classList.add('bg-green-500'); | |
showNotification('Transmission complete. Message received by Mission Control.', 'success'); | |
}, 2000); | |
}); | |
receiveBtn.addEventListener('click', function() { | |
showNotification('Checking for incoming messages...', 'info'); | |
signalStatus.classList.remove('bg-green-500'); | |
signalStatus.classList.add('bg-yellow-500'); | |
setTimeout(() => { | |
signalStatus.classList.remove('bg-yellow-500'); | |
signalStatus.classList.add('bg-green-500'); | |
const messages = [ | |
"Weather systems nominal", | |
"Course correction required in 3 hours", | |
"New mission parameters uploaded", | |
"All systems functioning within parameters" | |
]; | |
showNotification('New message: ' + messages[Math.floor(Math.random() * messages.length)], 'info'); | |
}, 2000); | |
}); | |
// Simulate signal fluctuations | |
setInterval(() => { | |
if (Math.random() > 0.8) { | |
signalStatus.classList.remove('bg-green-500'); | |
signalStatus.classList.add('bg-red-500'); | |
connectionStatus.textContent = "Signal lost - attempting to reconnect"; | |
setTimeout(() => { | |
signalStatus.classList.remove('bg-red-500'); | |
signalStatus.classList.add('bg-green-500'); | |
connectionStatus.textContent = "Connected to Deep Space Network"; | |
showNotification('Signal reestablished', 'success'); | |
}, 3000); | |
} | |
}, 15000); | |
// Mission status functions | |
function updateFuelLevel(change) { | |
const fuelLevel = document.getElementById('fuelLevel'); | |
let current = parseInt(fuelLevel.style.width); | |
current = Math.max(0, Math.min(100, current + change)); | |
fuelLevel.style.width = current + '%'; | |
if (current < 20) { | |
showNotification('Warning: Fuel level critical!', 'danger'); | |
} | |
} | |
function updateOxygenLevel(change) { | |
const oxygenLevel = document.getElementById('oxygenLevel'); | |
let current = parseInt(oxygenLevel.style.width); | |
current = Math.max(0, Math.min(100, current + change)); | |
oxygenLevel.style.width = current + '%'; | |
if (current < 30) { | |
showNotification('Warning: Oxygen supply low!', 'danger'); | |
} | |
} | |
function updatePowerLevel(change) { | |
const powerLevel = document.getElementById('powerLevel'); | |
let current = parseInt(powerLevel.style.width); | |
current = Math.max(0, Math.min(100, current + change)); | |
powerLevel.style.width = current + '%'; | |
if (current < 40) { | |
showNotification('Warning: Power output below optimal levels!', 'warning'); | |
} | |
} | |
// Orbit data functions | |
function updateOrbitData() { | |
const orbitalVelocity = document.getElementById('orbitalVelocity'); | |
const altitude = document.getElementById('altitude'); | |
const inclination = document.getElementById('inclination'); | |
const navAltitude = document.getElementById('navAltitude'); | |
const newVelocity = (7.5 + Math.random() * 0.6).toFixed(2); | |
const newAltitude = Math.floor(380 + Math.random() * 50); | |
const newInclination = (50 + Math.random() * 3).toFixed(1); | |
orbitalVelocity.textContent = newVelocity + ' km/s'; | |
altitude.textContent = newAltitude + ' km'; | |
navAltitude.textContent = newAltitude + ' km'; | |
inclination.textContent = newInclination + '°'; | |
} | |
// Temperature functions | |
function updateTemperatures() { | |
const externalTemp = document.getElementById('externalTemp'); | |
const internalTemp = document.getElementById('internalTemp'); | |
const engineTemp = document.getElementById('engineTemp'); | |
const externalTempBar = document.getElementById('externalTempBar'); | |
const internalTempBar = document.getElementById('internalTempBar'); | |
const engineTempBar = document.getElementById('engineTempBar'); | |
// External temp (-100 to -150°C) | |
const newExternal = Math.floor(-100 - Math.random() * 50); | |
externalTemp.textContent = newExternal + '°C'; | |
externalTempBar.style.width = Math.abs(newExternal) / 1.5 + '%'; | |
// Internal temp (20-25°C) | |
const newInternal = (20 + Math.random() * 5).toFixed(1); | |
internalTemp.textContent = newInternal + '°C'; | |
internalTempBar.style.width = (newInternal * 3) + '%'; | |
// Engine temp (300-350°C) | |
const newEngine = Math.floor(300 + Math.random() * 50); | |
engineTemp.textContent = newEngine + '°C'; | |
engineTempBar.style.width = (newEngine / 4) + '%'; | |
// Check for critical temperatures | |
if (newInternal > 24) { | |
showNotification('Warning: Internal temperature rising!', 'warning'); | |
} | |
if (newEngine > 340) { | |
showNotification('Danger: Engine temperature critical!', 'danger'); | |
} | |
} | |
// Navigation data functions | |
function updateNavigationData() { | |
const latitude = document.getElementById('latitude'); | |
const longitude = document.getElementById('longitude'); | |
const speed = document.getElementById('speed'); | |
const newLatitude = (28 + Math.random() * 1).toFixed(1); | |
const newLongitude = (80 + Math.random() * 1).toFixed(1); | |
const newSpeed = (7.6 + Math.random() * 0.2).toFixed(2); | |
latitude.textContent = newLatitude + '° N'; | |
longitude.textContent = newLongitude + '° W'; | |
speed.textContent = newSpeed + ' km/s'; | |
} | |
// Simulate mission systems | |
setInterval(() => { | |
// Randomly update mission status | |
if (Math.random() > 0.5) { | |
updateFuelLevel(-0.5); | |
} | |
if (Math.random() > 0.6) { | |
updateOxygenLevel(-0.3); | |
} | |
if (Math.random() > 0.7) { | |
updatePowerLevel(-0.2); | |
} | |
// Update orbit data | |
updateOrbitData(); | |
// Update temperatures | |
updateTemperatures(); | |
// Update navigation data | |
updateNavigationData(); | |
}, 3000); | |
// Initial notification | |
setTimeout(() => { | |
showNotification('Welcome back, Commander. All systems nominal.', 'info'); | |
}, 1000); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Freefall/wont-orbit" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |