'ISS', 'id' => '25544', 'lat' => 0, 'lon' => 0, 'alt' => 408, 'velocity' => 27600, 'visible' => true], ['name' => 'Hubble', 'id' => '20580', 'lat' => 0, 'lon' => 0, 'alt' => 535, 'velocity' => 25700, 'visible' => false], ['name' => 'GPS IIF-12', 'id' => '40730', 'lat' => 0, 'lon' => 0, 'alt' => 20200, 'velocity' => 13800, 'visible' => false], ['name' => 'GOES-16', 'id' => '41866', 'lat' => 0, 'lon' => 0, 'alt' => 35786, 'velocity' => 11000, 'visible' => false] ]; // Simular movimento dos satélites (em uma aplicação real, usaria dados de TLE e cálculos de órbita) foreach ($satellites as &$satellite) { $time = time(); $satellite['lat'] = 45 * sin($time/300 + $satellite['id']/10000); $satellite['lon'] = fmod(180 + $time/200 + $satellite['id']/5000, 360) - 180; $satellite['visible'] = (abs($satellite['lat']) < 60 && rand(0, 100) > 70); } // Determinar se é uma requisição AJAX para dados atualizados $isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'; if ($isAjax) { header('Content-Type: application/json'); echo json_encode($satellites); exit; } ?>
Monitoramento em tempo real de satélites artificiais