Skip to content

Commit

Permalink
Add satellites.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
sankichi92 committed Dec 22, 2024
1 parent 66df974 commit 640f4f4
Show file tree
Hide file tree
Showing 2 changed files with 878 additions and 21 deletions.
29 changes: 8 additions & 21 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
import { Map } from "react-map-gl/maplibre";
import { SatelliteMarkers } from "../lib/main";
import { Satellite, SatelliteMarkers } from "../lib/main";

import "maplibre-gl/dist/maplibre-gl.css";
import "../lib/main.css";
import satellitesTxt from "./satellites.txt?raw";

const satellites = [
{
name: "YODAKA",
tle: {
line1:
"1 62295U 98067XB 24356.80692813 .00138458 00000+0 20531-2 0 9992",
line2:
"2 62295 51.6364 105.6293 0012447 6.1035 354.0105 15.54174727 1956",
},
},
{
name: "ONGLAISAT",
tle: {
line1:
"1 62299U 98067XF 24356.80956985 .00137277 00000+0 20793-2 0 9997",
line2:
"2 62299 51.6370 105.6484 0011002 0.4931 359.6068 15.53614663 1919",
},
},
];
const lines = satellitesTxt.trim().split("\n");
const satellites: Satellite[] = [];
for (let i = 0; i < lines.length; i += 3) {
const [name, line1, line2] = lines.slice(i, i + 3);
satellites.push({ name, tle: { line1, line2 } });
}

export default function App() {
return (
Expand Down
Loading

0 comments on commit 640f4f4

Please sign in to comment.