mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
fix: Add direct ISS position endpoint for globe tracking
- Add /sstv/iss-position endpoint that calculates ISS position directly - Update JS to use new endpoint instead of /satellite/position - Returns lat, lon, altitude, and optionally elevation/azimuth from observer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,20 +180,11 @@ const SSTV = (function() {
|
||||
const storedLon = localStorage.getItem('observerLon') || -0.1278;
|
||||
|
||||
try {
|
||||
const response = await fetch('/satellite/position', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
latitude: parseFloat(storedLat),
|
||||
longitude: parseFloat(storedLon),
|
||||
satellites: ['ISS']
|
||||
})
|
||||
});
|
||||
|
||||
const response = await fetch(`/sstv/iss-position?latitude=${storedLat}&longitude=${storedLon}`);
|
||||
const data = await response.json();
|
||||
|
||||
if (data.status === 'success' && data.positions?.length > 0) {
|
||||
issPosition = data.positions[0];
|
||||
if (data.status === 'ok') {
|
||||
issPosition = data;
|
||||
updateIssDisplay();
|
||||
renderGlobe();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user