-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflightPlan.py
More file actions
56 lines (53 loc) · 1.88 KB
/
flightPlan.py
File metadata and controls
56 lines (53 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from pydantic import BaseModel
from datetime import datetime
class FlightPlan(BaseModel):
flight_plan: dict
datetime: str
gs_id: str
sat_name: str
model_config = {
"json_schema_extra": {
"examples": [
{
"flight_plan":
{
"name": "commands",
"body": [
{
"name": "repeat-n",
"count": 10,
"body": [
{
"name": "gpio-write",
"pin": 16,
"value": 1
},
{
"name": "wait-sec",
"duration": 1
},
{
"name": "gpio-write",
"pin": 16,
"value": 0
},
{
"name": "wait-sec",
"duration": 1
}
]
}
]
},
"datetime": "2025-01-01T12:12:30+01:00",
"gs_id": "86c8a92b-571a-46cb-b306-e9be71959279",
"sat_name": "DISCO-2"
}
]
}
}
class FlightPlanStatus(BaseModel):
flight_plan_uuid: str
approval_status: bool | None
approver: str | None
approval_date: datetime | None