suboptimumg.track.models#

pydantic model suboptimumg.track.models.ArcData[source]#

Bases: BaseModel

Data model for arc geometry. Stores parameters needed to render an arc segment of a track.

Fields:
field center: Tuple[float, float] [Required]#

(x, y) coordinates of the arc’s center in meters

field width: float [Required]#

Width of the arc ellipse (2 * radius) in meters

field height: float [Required]#

Height of the arc ellipse (2 * radius) in meters

field angle: float [Required]#

Rotation angle of the arc ellipse in degrees

field theta1: float [Required]#

Starting angle of the arc in degrees (sorted, theta1 < theta2)

field theta2: float [Required]#

Ending angle of the arc in degrees (sorted, theta1 < theta2)

field theta1_original: float [Required]#

Original starting angle before sorting (used to detect reversal)

field theta2_original: float [Required]#

Original ending angle before sorting (used to detect reversal)

field n_points: int [Required]#

Number of interpolation points for NewArc (for smooth rendering)

pydantic model suboptimumg.track.models.ContinuousTrackData[source]#

Bases: BaseModel

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field dx: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of distance steps

field radius: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of radius of curvature values

field cumulative_dist: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of cumulative distances along the track

field x_m: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of x coordinates in meters

field y_m: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of y coordinates in meters

field distance_step: float [Required]#

Length of each step in meters

field sample_dist: float [Required]#

Distance to sample for Menger curvature calculation

field tck: Any [Required]#

B-spline representation (tuple from scipy)

field seed_idx: ndarray[tuple[Any, ...], dtype[int32]] [Required]#

Array of simulation seed indices

pydantic model suboptimumg.track.models.CoordinateListInput[source]#

Bases: BaseModel

Strongly-typed class defining a Track based on GPS coordinates.

Fields:
field longitudes: List[float] [Required]#

A list of longitude coordinates

field latitudes: List[float] [Required]#

A list of latitude coordinates, must match longitudes length

field distance_step: float [Required]#

The length dx to be used to quantize the track

field sample_dist: float = 1.0#

Distance to sample before/after a point for Menger curvature calculation

pydantic model suboptimumg.track.models.CornerListInput[source]#

Bases: BaseModel

Strongly-typed class defining a Track based on corners.

Fields:
Validators:
field corners: List[Annotated[List]] [Required]#

A list of corners, each specified as [radius (m), length (decimeters)]

Validated by:
field shorten: float [Required]#

A ratio to scale each corner’s length by. (1.0 = no change)

field distance_step: float [Required]#

The length dx to be used to quantize the track

field clean_corners: bool [Required]#

Whether or not to apply experimental modifications to tight corners

field ideal_rotation_angle: float [Required]#

The ideal angle to rotate the track by, so that it fits into a plot nicely

validator wrap_single_corner  »  corners[source]#
pydantic model suboptimumg.track.models.DiscreteTrackData[source]#

Bases: BaseModel

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field dx: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of distance steps

field radius: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of radius of curvature values

field cumulative_dist: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of cumulative distances along the track

field x_m: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of x coordinates in meters

field y_m: ndarray[tuple[Any, ...], dtype[float64]] [Required]#

Array of y coordinates in meters

field distance_step: float [Required]#

Length of each step in meters

field original_corners: List[List] [Required]#

Original corner specifications

field arcs: List[ArcData] [Required]#

Arc geometry data for each corner

field seed_idx: ndarray[tuple[Any, ...], dtype[int32]] [Required]#

Array of simulation seed indices