-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tristram Gräbener <[email protected]>
- Loading branch information
Showing
15 changed files
with
295 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 11 additions & 8 deletions
19
editoast/editoast_schemas/src/rolling_stock/towed_rolling_stock.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
use super::RollingResistancePerWeight; | ||
use editoast_common::units::*; | ||
use editoast_common::units; | ||
use editoast_common::units::quantities::{ | ||
Acceleration, Deceleration, Length, Mass, Ratio, Velocity, | ||
}; | ||
|
||
#[derive(Debug, Clone, PartialEq, serde::Deserialize, serde::Serialize)] | ||
pub struct TowedRollingStock { | ||
pub name: String, | ||
pub label: String, | ||
pub railjson_version: String, | ||
#[serde(with = "kilogram")] | ||
#[serde(with = "units::kilogram")] | ||
pub mass: Mass, | ||
#[serde(with = "meter")] | ||
#[serde(with = "units::meter")] | ||
pub length: Length, | ||
#[serde(with = "meter_per_second_squared")] | ||
#[serde(with = "units::meter_per_second_squared")] | ||
pub comfort_acceleration: Acceleration, | ||
#[serde(with = "meter_per_second_squared")] | ||
#[serde(with = "units::meter_per_second_squared")] | ||
pub startup_acceleration: Acceleration, | ||
#[serde(with = "basis_point")] | ||
#[serde(with = "units::basis_point")] | ||
pub inertia_coefficient: Ratio, | ||
pub rolling_resistance: RollingResistancePerWeight, | ||
/// The constant gamma braking coefficient used when NOT circulating | ||
/// under ETCS/ERTMS signaling system | ||
#[serde(with = "meter_per_second_squared")] | ||
#[serde(with = "units::meter_per_second_squared")] | ||
pub const_gamma: Deceleration, | ||
#[serde(default, with = "meter_per_second::option")] | ||
#[serde(default, with = "units::meter_per_second::option")] | ||
pub max_speed: Option<Velocity>, | ||
} |
Oops, something went wrong.