Implement basic saved point editor

This commit is contained in:
ThePetrovich 2025-07-02 15:32:46 +08:00
parent bb390d50dc
commit 0f79cefdac
12 changed files with 414 additions and 41 deletions

View file

@ -3,7 +3,7 @@ import type { LatLngExpression } from "leaflet";
import L from "leaflet";
import { getCsrfToken } from "./auth";
import type { PredictionStage, RawPrediction, Prediction } from "./types";
import type { PredictionStage, RawPrediction, Prediction, Point } from "./types";
import { PredictionStore, RawPredictionStore, writeLocalStorage } from "./stores";
function getLatestDataset() {
@ -90,10 +90,10 @@ export const getForecast = async (
};
export function parsePrediction(prediction: PredictionStage[]): Prediction {
const flight_path: [number, number, number][] = [];
const launch: { latlng: LatLngExpression; datetime: Date } = {} as any;
const burst: { latlng: LatLngExpression; datetime: Date } = {} as any;
const landing: { latlng: LatLngExpression; datetime: Date } = {} as any;
const flight_path: LatLngExpression[] = [];
const launch: Point = {} as any;
const burst: Point = {} as any;
const landing: Point = {} as any;
const ascent = prediction[0].trajectory;
const descent = prediction[1].trajectory;