base sys done. shift to vs code

This commit is contained in:
Duncan Auld
2025-06-30 05:17:50 +00:00
parent 05f87e04f9
commit 2c49d7cd5c
10 changed files with 292 additions and 0 deletions

65
backend/app/main.py Normal file
View File

@@ -0,0 +1,65 @@
# backend/main.py
from fastapi import FastAPI
from fastapi.responses import JSONResponse
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=[
"http://aegis.sbln.bxl.skynav.cloud:8080"
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/czml/test")
def get_dummy_czml():
czml = [
{
"id": "document",
"name": "Dummy orbit test",
"version": "1.0"
},
{
"id": "sat1",
"name": "TestSat-001",
"availability": "2025-06-29T00:00:00Z/2025-06-29T00:04:00Z",
"position": {
"interpolationAlgorithm": "LAGRANGE",
"interpolationDegree": 5,
"referenceFrame": "INERTIAL",
"epoch": "2025-06-29T00:00:00Z",
"cartesian": [
0, 7000000, 0, 0,
60, 7050000, 20000, 0,
120, 7100000, 40000, 0,
180, 7150000, 60000, 0,
240, 7200000, 80000, 0
]
},
"point": {
"pixelSize": 10,
"color": {
"rgba": [0, 255, 255, 255]
}
},
"label": {
"text": "TestSat-001",
"font": "12pt sans-serif",
"style": "FILL",
"outlineWidth": 2,
"verticalOrigin": "BOTTOM",
"pixelOffset": {
"cartesian2": [0, -20]
}
}
}
]
return JSONResponse(content=czml)