-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements rocket route tests #40
Changes from 2 commits
c0b4aba
fdb0f7c
4065960
0b79762
dcb54b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,8 +1,17 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
from enum import Enum | ||||||||||||||||||||||||||||||||||||||||||||||||||
from typing import Optional, Tuple, List | ||||||||||||||||||||||||||||||||||||||||||||||||||
from typing import Optional, Tuple, List, Union | ||||||||||||||||||||||||||||||||||||||||||||||||||
from pydantic import BaseModel | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
class Parachute(BaseModel): | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: str | ||||||||||||||||||||||||||||||||||||||||||||||||||
cd_s: float | ||||||||||||||||||||||||||||||||||||||||||||||||||
sampling_rate: int | ||||||||||||||||||||||||||||||||||||||||||||||||||
lag: float | ||||||||||||||||||||||||||||||||||||||||||||||||||
trigger: Union[str, float] | ||||||||||||||||||||||||||||||||||||||||||||||||||
noise: Tuple[float, float, float] | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add field validations and improve documentation The
Here's a suggested implementation: class Parachute(BaseModel):
+ """Represents a parachute aerosurface with deployment characteristics.
+
+ Attributes:
+ name: Identifier for the parachute
+ cd_s: Product of drag coefficient and surface area (m²)
+ sampling_rate: Data sampling rate in Hz
+ lag: Deployment delay in seconds
+ trigger: Deployment condition (altitude in meters or event name)
+ noise: Simulation noise parameters (mean, std, time_correlation)
+ """
name: str
- cd_s: float
- sampling_rate: int
- lag: float
+ cd_s: float = Field(..., gt=0, description="Must be positive")
+ sampling_rate: int = Field(..., gt=0, description="Must be positive")
+ lag: float = Field(..., ge=0, description="Must be non-negative")
trigger: Union[str, float]
noise: Tuple[float, float, float] 📝 Committable suggestion
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Gui-FernandesBR do you agree with that ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GabrielBarberini yes the idea is great, just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. patched here dcb54b8 |
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
class RailButtons(BaseModel): | ||||||||||||||||||||||||||||||||||||||||||||||||||
name: str = "RailButtons" | ||||||||||||||||||||||||||||||||||||||||||||||||||
upper_button_position: float | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost sure the sampling_rate can be a float value