Skip to content

Commit

Permalink
improves models visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Oct 25, 2023
1 parent 70320e2 commit a44fc9a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions lib/models/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class Env(BaseModel, frozen=True):
latitude: float = 0
longitude: float = 0
elevation: Optional[int] = 1400

#Opional parameters
atmospheric_model_type: Optional[str] = 'standard_atmosphere'
atmospheric_model_file: Optional[str] = 'GFS'
date: Optional[datetime.datetime] = datetime.datetime.today() + datetime.timedelta(days=1)
2 changes: 1 addition & 1 deletion lib/models/parachute.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
class Parachute(BaseModel, frozen=True):
name: "List[str]" = ["Main","Drogue"]
cd_s: "List[float]" = [10, 1]
sampling_rate: "List[int]" = [105, 105]
lag: "List[float]" = [1.5, 1.5]
sampling_rate: "List[int]" = [105, 105]
noise: "List[Tuple[float, float, float]]" = [(0, 8.3, 0.5), (0, 8.3, 0.5)]
triggers: "List[str]" = ["lambda p, h, y: y[5] < 0 and h < 800", "lambda p, h, y: y[5] < 0"]

Expand Down
21 changes: 12 additions & 9 deletions lib/models/rocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ class RocketOptions(str, Enum):
custom: str = "Custom"

class Rocket(BaseModel, frozen=True):
#Required parameters
rail_buttons: RailButtons = RailButtons()
motor: Motor = Motor()
nose: NoseCone = NoseCone()
fins: Fins = Fins()
tail: Tail = Tail()
parachutes: Parachute = Parachute()
inertia: "Tuple[float, float, float]" = (6.321, 6.321, 0.0346)
center_of_mass_without_motor: int = 0
radius: float = 0.0632
mass: float = 16.235
inertia: "Tuple[float, float, float]" = (6.321, 6.321, 0.0346)
motor_position: float = -1.255
#TBD: powerOffDrag an powerOnDrag need to be the id of previously uploaded .csv files and a list of "default" files must be provided in the api docs
power_off_drag: "Tuple[Tuple[float, float]]" = (
(0.01,0.333865758),
Expand All @@ -36,13 +45,7 @@ class Rocket(BaseModel, frozen=True):
(0.08,0.405617853),
(0.09,0.403724114)
)
center_of_mass_without_motor: int = 0

#Optional parameters
#TBD: a list of possible tailToNose values must be provided in the api docs
coordinate_system_orientation: Optional[str] = "tail_to_nose"
motor_position: float = -1.255
rail_buttons: RailButtons = RailButtons()
motor: Motor = Motor()
nose: NoseCone = NoseCone()
fins: Fins = Fins()
tail: Tail = Tail()
parachutes: Parachute = Parachute()

0 comments on commit a44fc9a

Please sign in to comment.