JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
physics_config.hpp
Go to the documentation of this file.
1// Copyright (c) JSim contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the LGPLv3 license file in the root directory of this project.
4
5#pragma once
6
9
10namespace frcsim {
11
15struct PhysicsConfig {
17 double fixed_dt_s{0.01};
18
20 Vector3 gravity_mps2{0.0, 0.0, -9.81};
21
23 double linear_damping_per_s{0.0};
24 double angular_damping_per_s{0.0};
25
32
35
37 bool enable_joint_constraints{true};
38
40 bool enable_aerodynamics{false};
41
43 double default_drag_coefficient{0.47};
44
47
49 double air_density_kgpm3{1.225};
50
52 double magnus_coefficient{1.0e-4};
53
55 double ground_height_m{0.0};
56
59
62
64 double baumgarte_beta{0.2};
65
68 double baumgarte_slop_m{0.005};
69};
70
71} // namespace frcsim
Definition vector.hpp:13
@ kSemiImplicitEuler
Velocity-first (symplectic) Euler integration.
Definition rigid_body.hpp:24
Global runtime settings for PhysicsWorld dynamics and optional features.
Definition physics_world.hpp:32
enum frcsim::PhysicsConfig::IntegrationMethod kSemiImplicitEuler
IntegrationMethod
Definition physics_config.hpp:27
@ kExplicitEuler
Definition physics_config.hpp:29
@ kRK2
Definition physics_config.hpp:30
double default_drag_reference_area_m2
Default drag reference area in square meters.
Definition physics_world.hpp:92
double magnus_coefficient
Magnus lift scaling coefficient.
Definition physics_world.hpp:110
double rolling_friction_per_s
Definition physics_config.hpp:58
bool enable_aerodynamics
Enables aerodynamic drag and Magnus lift forces.
Definition physics_world.hpp:71
double fixed_dt_s
Fixed timestep in seconds used by PhysicsWorld::step.
Definition physics_world.hpp:41
IntegrationMethod integration_method
Integration scheme used for rigid body translational/rotational updates.
Definition physics_world.hpp:48
double ground_height_m
Definition physics_config.hpp:55
bool enable_collision_detection
Enables broad collision/contact processing.
Definition physics_world.hpp:56
double angular_damping_per_s
Angular damping coefficient in 1/s.
Definition physics_world.hpp:131
double baumgarte_slop_m
Definition physics_config.hpp:68
double linear_damping_per_s
Linear damping coefficient in 1/s.
Definition physics_world.hpp:124
double baumgarte_beta
Definition physics_config.hpp:64
Vector3 gravity_mps2
Gravity acceleration vector in meters per second squared.
Definition physics_world.hpp:117
double air_density_kgpm3
Ambient air density in kilograms per cubic meter.
Definition physics_world.hpp:95
double min_bounce_speed_mps
Definition physics_config.hpp:61
bool enable_joint_constraints
Enables joint/constraint solving for rigid assemblies.
Definition physics_world.hpp:63
double default_drag_coefficient
Default dimensionless drag coefficient (Cd).
Definition physics_world.hpp:85