From 4de4f1021fa4d06318dbbe97c77a8d2826b96115 Mon Sep 17 00:00:00 2001 From: Ryan A Rodriguez Date: Sun, 3 Nov 2024 17:06:13 -0800 Subject: [PATCH] rename quadrotor to simulated quadrotor --- src/lib.rs | 10 +++++----- src/main.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 346eb931..6f920133 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,7 +57,7 @@ pub enum SimulationError { /// let inertia_matrix = [0.0347563, 0.0, 0.0, 0.0, 0.0458929, 0.0, 0.0, 0.0, 0.0977]; /// let quadrotor = Quadrotor::new(time_step, mass, gravity, drag_coefficient, inertia_matrix); /// ``` -pub struct Quadrotor { +pub struct SimulatedQuadrotor { /// Current position of the quadrotor in 3D space pub position: Vector3, /// Current velocity of the quadrotor @@ -84,7 +84,7 @@ pub struct Quadrotor { pub previous_torque: Vector3, } /// Implementation of the Quadrotor struct -impl Quadrotor { +impl SimulatedQuadrotor { /// Creates a new Quadrotor with default parameters /// # Arguments /// * `time_step` - The simulation time step in seconds @@ -1760,7 +1760,7 @@ pub fn update_planner( step: usize, time: f32, simulation_frequency: usize, - quad: &Quadrotor, + quad: &SimulatedQuadrotor, obstacles: &[Obstacle], planner_config: &[PlannerStepConfig], ) -> Result<(), SimulationError> { @@ -1810,7 +1810,7 @@ pub fn update_planner( /// ``` pub fn create_planner( step: &PlannerStepConfig, - quad: &Quadrotor, + quad: &SimulatedQuadrotor, time: f32, obstacles: &[Obstacle], ) -> Result { @@ -2363,7 +2363,7 @@ impl Camera { /// ``` pub fn log_data( rec: &rerun::RecordingStream, - quad: &Quadrotor, + quad: &SimulatedQuadrotor, desired_position: &Vector3, desired_velocity: &Vector3, measured_accel: &Vector3, diff --git a/src/main.rs b/src/main.rs index 3b24d552..925d47eb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ fn main() -> Result<(), SimulationError> { config_str = &args[1]; } let config = config::Config::from_yaml(config_str).expect("Failed to load configuration"); - let mut quad = Quadrotor::new( + let mut quad = SimulatedQuadrotor::new( 1.0 / config.simulation.simulation_frequency as f32, config.quadrotor.mass, config.quadrotor.gravity,