From bd4ed9487aea2a25d2f3a6b1f8baeb8fe184db1f Mon Sep 17 00:00:00 2001 From: Nino Tarantino Date: Fri, 11 Sep 2026 15:55:55 -0500 Subject: [PATCH] Move everything to the CML namespace There's several types/functions in CML with "CML" in their name. These should be dropped in a future commit. --- .../include/mass_body_detach_impulsive.hh | 6 ++ .../src/mass_body_detach_impulsive.cc | 6 +- .../include/accumulated_absolute_deltas.hh | 6 ++ .../src/accumulated_absolute_deltas.cc | 6 +- .../include/scalar_integrable_object.hh | 6 ++ .../src/scalar_integrable_object.cc | 5 ++ ...estartable_vector3_1st_order_integrator.hh | 6 ++ .../include/vector3_integrable_object.hh | 6 ++ .../src/vector3_integrable_object.cc | 5 ++ .../dynamic_mass/include/dynamic_mass_body.hh | 6 ++ .../dynamic_mass_body_interpolation.hh | 6 ++ .../dynamic_mass_body_nominal_properties.hh | 6 ++ .../include/dynamic_mass_body_properties.hh | 6 ++ .../include/dynamic_mass_group.hh | 6 ++ .../include/dynamic_mass_string.hh | 6 ++ .../dynamic_mass/src/dynamic_mass_body.cc | 6 +- .../src/dynamic_mass_body_interpolation.cc | 6 +- .../src/dynamic_mass_body_properties.cc | 6 +- .../dynamic_mass/src/dynamic_mass_group.cc | 6 +- .../dynamic_mass/src/dynamic_mass_string.cc | 6 +- .../mass_body_composite_dispersions.hh | 8 +- .../include/mass_body_dispersed_init.hh | 8 +- .../include/mass_properties_dispersions.hh | 6 ++ .../src/mass_body_composite_dispersions.cc | 6 +- .../src/mass_body_dispersed_init.cc | 5 ++ .../src/mass_properties_dispersions.cc | 6 +- .../mass_body_distribute_comp_to_core.hh | 6 ++ .../src/mass_body_distribute_comp_to_core.cc | 6 +- .../include/mass_derivative_dynamics.hh | 8 +- .../src/mass_derivative_dynamics.cc | 5 ++ .../include/atmos_relative_state.hh | 7 ++ .../src/atmos_relative_state.cc | 6 +- .../SIM_nan_verif/atmos_rel_state_test.hh | 6 ++ .../include/earth_moon_rotating_frame.hh | 6 ++ .../src/earth_moon_rotating_frame.cc | 6 +- .../extended_planetary_derived_state.hh | 6 ++ .../include/point_to_point.hh | 6 ++ .../include/range_safety_data.hh | 6 ++ .../include/topo_container.hh | 6 ++ .../include/velocity_set.hh | 6 ++ .../src/extended_planetary_derived_state.cc | 6 +- .../src/point_to_point.cc | 6 +- .../src/topo_container.cc | 6 +- .../src/velocity_set.cc | 6 +- .../include/orb_elem_subset.hh | 8 +- .../orb_elem_subset/src/orb_elem_subset.cc | 6 +- .../include/ephem_based_pointing_ref_frame.hh | 6 ++ .../include/pointing_ref_frame.hh | 6 ++ .../src/pointing_ref_frame.cc | 6 +- .../range/data/include/range_default_data.hh | 6 ++ .../range/data/src/range_default_data.cc | 5 ++ .../range/include/pfix_reference_point.hh | 6 ++ .../range/include/range_computation.hh | 6 ++ .../include/range_from_pfix_reference.hh | 8 +- .../range/include/range_to_pfix_reference.hh | 8 +- .../range/src/pfix_reference_point.cc | 6 +- .../range/src/range_computation.cc | 6 +- .../range/src/range_from_pfix_reference.cc | 5 ++ .../range/src/range_to_pfix_reference.cc | 5 ++ .../include/lvlh_separation_state.hh | 8 +- .../include/separation_state.hh | 6 ++ .../src/lvlh_separation_state.cc | 5 ++ .../separation_state/src/separation_state.cc | 5 ++ .../include/simple_planet_rel_state.hh | 6 ++ .../src/simple_planet_rel_state.cc | 6 +- .../include/correlated_state_dispersion.hh | 5 ++ .../src/correlated_state_dispersion.cc | 6 +- .../include/test_class.hh | 6 ++ .../include/monte_carlo_state_dispersion.hh | 6 ++ .../include/state_initialize.hh | 6 ++ .../state_initialize_with_propagation.hh | 6 ++ .../src/monte_carlo_state_dispersion.cc | 6 +- .../state_initialize/src/state_initialize.cc | 6 +- .../src/state_initialize_with_propagation.cc | 6 +- .../include/TR_parameter_ref_frame.hh | 6 ++ .../include/TR_state_param.hh | 6 ++ .../include/TR_state_parameter_set.hh | 6 ++ .../include/TR_state_parameters.hh | 6 ++ .../include/TR_state_parameters_alt.hh | 6 ++ .../src/TR_parameter_ref_frame.cc | 6 +- .../src/TR_state_param.cc | 6 +- .../src/TR_state_parameters.cc | 6 +- .../src/TR_state_parameters_alt.cc | 6 +- .../contact/include/contact_state_override.hh | 6 ++ .../contact/src/contact_state_override.cc | 6 +- .../twist_sway/include/twist_sway.hh | 6 ++ .../twist_sway/src/twist_sway.cc | 6 +- .../include/apsides_predictor.hh | 6 ++ .../src/apsides_predictor.cc | 6 +- .../impact_point/include/impact_point.hh | 8 +- .../impact_point/src/impact_point.cc | 6 +- .../environment/EGM2008/include/egm_2008.hh | 6 ++ models/environment/EGM2008/src/egm_2008.cc | 6 +- .../environment/EGM2008/src/egm_2008_data.cc | 5 ++ .../atmos_exec/include/atmosphere_exec.hh | 9 ++- .../include/atmosphere_exec_atmos_base.hh | 6 ++ .../include/atmosphere_exec_drwp.hh | 6 ++ .../include/atmosphere_exec_gram.hh | 6 ++ .../include/atmosphere_exec_interface.hh | 6 ++ .../atmos_exec/include/atmosphere_exec_out.hh | 6 ++ .../include/atmosphere_exec_simple_winds.hh | 6 ++ .../atmos_exec/include/atmosphere_exec_std.hh | 6 ++ .../atmos/atmos_exec/src/atmosphere_exec.cc | 5 ++ .../atmos_exec/src/atmosphere_exec_drwp.cc | 6 +- .../atmos_exec/src/atmosphere_exec_gram.cc | 5 ++ .../src/atmosphere_exec_interface.cc | 6 +- .../src/atmosphere_exec_simple_winds.cc | 6 +- .../atmos_exec/src/atmosphere_exec_std.cc | 6 +- .../DRWP_atmos/include/lookup_winds.hh | 6 ++ .../DRWP_atmos/src/lookup_winds.cc | 6 +- .../include/simple_lookup_wind.hh | 6 ++ .../src/simple_lookup_wind.cc | 6 +- .../std_atmos_1976/include/std_atmos_1976.hh | 6 ++ .../std_atmos_1976/src/std_atmos_1976.cc | 5 +- .../std_atmos_1976/src/std_atmos_1976_dd.cc | 5 ++ .../std_atmos_1976/src/std_atmos_formula.h | 7 +- .../include/first_order_hold.hh | 6 ++ .../first_order_hold/src/first_order_hold.cc | 6 +- models/environment/atmos/gust/include/gust.hh | 6 ++ models/environment/atmos/gust/src/gust.cc | 6 +- .../include/lagged_atmos_payload_data.hh | 6 ++ .../include/lagged_atmos_wind.hh | 6 ++ .../src/lagged_atmos_wind.cc | 5 ++ .../include/eclipse_calculator.hh | 6 ++ .../src/eclipse_calculator.cc | 6 +- .../include/planet_planet_state.hh | 6 ++ .../src/planet_planet_state.cc | 5 ++ ...herical_harmonics_fast_gravity_controls.hh | 6 ++ ...herical_harmonics_fast_gravity_controls.cc | 6 +- .../include/gravity_fidelity_manager.hh | 8 +- .../src/gravity_fidelity_manager.cc | 6 +- .../data/include/GRGM900C_lunar_gravity.hh | 6 ++ .../data/src/GRGM900C_lunar_gravity.cc | 5 ++ .../include/piston_thruster.hh | 6 ++ .../include/piston_thruster_group.hh | 6 ++ .../piston_thruster/src/piston_thruster.cc | 6 +- .../src/piston_thruster_group.cc | 6 +- .../verif/include/sample_group.hh | 6 ++ .../include/Example_RcsAdvanced.hh | 6 ++ .../rcs_generic/include/rcs_build_trail.hh | 6 ++ .../rcs_generic/include/rcs_generic.hh | 6 ++ .../rcs_generic/include/rcs_group.hh | 6 ++ .../effectors/rcs_generic/include/rcs_jet.hh | 6 ++ .../rcs_generic/include/rcs_prop_pod.hh | 6 ++ .../include/rcs_scale_factor_interface.hh | 6 ++ .../rcs_generic/src/Example_RcsAdvanced.cc | 5 ++ .../rcs_generic/src/rcs_build_trail.cc | 6 +- .../effectors/rcs_generic/src/rcs_generic.cc | 6 +- .../effectors/rcs_generic/src/rcs_group.cc | 6 +- .../fhw/effectors/rcs_generic/src/rcs_jet.cc | 6 +- .../effectors/rcs_generic/src/rcs_prop_pod.cc | 6 +- .../verif/data/include/rcs_test_multigroup.hh | 6 ++ .../verif/data/src/rcs_test_multigroup.cc | 5 ++ .../include/rocket_motor_basic.hh | 6 ++ .../include/rocket_motor_dispersions.hh | 6 ++ .../include/rocket_motor_multi_nozzle.hh | 6 ++ .../include/rocket_motor_nozzle.hh | 6 ++ .../include/rocket_motor_table_thrust.hh | 6 ++ .../rocket_motors/src/rocket_motor_basic.cc | 5 ++ .../src/rocket_motor_dispersions.cc | 6 +- .../src/rocket_motor_multi_nozzle.cc | 6 +- .../rocket_motors/src/rocket_motor_nozzle.cc | 6 +- .../src/rocket_motor_table_thrust.cc | 5 ++ .../include/mass_body_detach_with_springs.hh | 12 ++- .../springs/include/simple_spring_group.hh | 6 ++ .../include/simple_spring_individual.hh | 6 ++ .../springs/src/simple_spring_group.cc | 6 +- .../springs/src/simple_spring_individual.cc | 6 +- .../fhw/effectors/vent/include/simple_vent.hh | 6 ++ models/fhw/effectors/vent/include/vent.hh | 6 ++ models/fhw/effectors/vent/include/vent_set.hh | 6 ++ models/fhw/effectors/vent/src/simple_vent.cc | 6 +- models/fhw/effectors/vent/src/vent.cc | 6 +- models/fhw/effectors/vent/src/vent_set.cc | 5 ++ .../aero/include/aero_coefficients.hh | 6 ++ .../aero/include/aero_environment.hh | 6 ++ .../aero/include/aero_executive_base.hh | 6 ++ .../aero/include/aero_executive_simple.hh | 6 ++ .../aero_executive_simple_lift_drag.hh | 6 ++ .../aero/include/aero_executive_table.hh | 6 ++ .../aero/include/aero_interface_base.hh | 6 ++ .../include/aero_interface_base_extended.hh | 6 ++ .../aero/include/aero_interface_output.hh | 6 ++ .../aero/include/aero_interface_simple.hh | 6 ++ .../aero_interface_simple_lift_drag.hh | 6 ++ .../aero/include/aero_interface_table.hh | 6 ++ .../aero/include/aero_table_set.hh | 6 ++ .../aero/include/aero_table_set_base.hh | 6 ++ .../aero/src/aero_executive_simple.cc | 6 +- .../src/aero_executive_simple_lift_drag.cc | 6 +- .../aero/src/aero_executive_table.cc | 6 +- .../aero/src/aero_executive_table_disperse.cc | 5 ++ .../aero/src/aero_interface_base.cc | 5 ++ .../aero/src/aero_interface_simple.cc | 6 +- .../src/aero_interface_simple_lift_drag.cc | 5 ++ .../aero/src/aero_interface_table.cc | 5 ++ .../aero/src/aero_table_set_base.cc | 6 +- .../SIM_Test_table/include/example_tables.hh | 6 ++ .../subsonic_wake/include/subsonic_wake.hh | 6 ++ .../subsonic_wake/include/wake_bodies.hh | 6 ++ .../subsonic_wake/include/wake_effects.hh | 6 ++ .../subsonic_wake/include/wake_params.hh | 6 ++ .../subsonic_wake/src/prf_model.cc | 6 +- .../subsonic_wake/src/reverse_flow.cc | 6 +- .../subsonic_wake/src/subsonic_wake.cc | 6 +- .../subsonic_wake/src/wake_bodies.cc | 6 +- .../subsonic_wake/src/wake_effects_base.cc | 6 +- .../unit_test/models/include/unit_test.hh | 8 +- .../tools/unit_test/models/src/unit_test.cc | 6 +- .../models/tests/test_unit_framework.cc | 10 +-- .../bin_counter/include/bin_counter.hh | 6 ++ .../bin_counter/include/proximity_counter.hh | 6 ++ .../bin_counter/include/target_counter.hh | 6 ++ .../utilities/bin_counter/src/bin_counter.cc | 5 ++ .../bin_counter/src/proximity_counter.cc | 5 ++ .../bin_counter/src/target_counter.cc | 6 +- .../buffers/include/simple_ring_buffer.hh | 6 ++ .../buffers/include/tagged_ring_buffer.hh | 6 ++ .../SIM_simple_ring_buffer/sample_class.hh | 6 ++ .../SIM_tagged_ring_buffer/sample_class.hh | 6 ++ .../cml_message/include/cml_message.hh | 6 ++ .../utilities/cml_message/src/cml_message.cc | 5 ++ .../cml_message/test/cml_message_test.cc | 50 ++++++------- .../verif/SIM_verif/include/sample_model.hh | 6 ++ .../color_string/include/color_string.hh | 6 ++ .../constraint_check/include/constraint.hh | 6 ++ .../include/constraint_enum.hh | 6 ++ .../include/constraint_set.hh | 6 ++ .../include/constraint_test.hh | 6 ++ .../include/constraint_test_templates.hh | 6 ++ .../constraint_test_timed_templates.hh | 6 ++ .../include/interval_constraint.hh | 6 ++ .../include/threshold_constraint.hh | 6 ++ .../include/valset_constraint.hh | 6 ++ .../constraint_check/src/constraint.cc | 6 +- .../constraint_check/src/constraint_set.cc | 6 +- .../constraint_check/src/constraint_test.cc | 6 +- .../src/constraint_test_templates.cc | 5 ++ .../src/constraint_test_timed_templates.cc | 5 ++ .../verif/SIM_verif/test_constraint_set.hh | 6 ++ .../convert_string/include/convert_string.hh | 6 ++ .../include/convert_double_to_words.hh | 6 ++ .../src/convert_double_to_uint_words.cc | 6 +- .../fault_arch/include/sSensorFaults.hh | 6 ++ .../utilities/fault_arch/src/sSensorFaults.cc | 5 ++ .../fault_management/include/fault.hh | 6 ++ .../fault_management/include/fault_bias.hh | 6 ++ .../include/fault_function.hh | 6 ++ .../include/fault_function_parameter.hh | 6 ++ .../fault_management/include/fault_manager.hh | 6 ++ .../include/fault_overwrite.hh | 6 ++ .../include/fault_random_walk.hh | 6 ++ .../fault_management/include/fault_scale.hh | 6 ++ .../fault_management/include/fault_stale.hh | 6 ++ .../include/fault_white_noise.hh | 6 ++ .../include/independent_variable.hh | 6 ++ .../fault_management/include/rand_number.hh | 6 ++ .../fault_management/include/trigger.hh | 6 ++ .../fault_management/include/trigger_group.hh | 6 ++ .../include/untyped_variable.hh | 6 ++ .../utilities/fault_management/src/fault.cc | 6 +- .../fault_management/src/fault_function.cc | 6 +- .../src/fault_function_parameter.cc | 6 +- .../fault_management/src/fault_manager.cc | 6 +- .../fault_management/src/fault_overwrite.cc | 5 ++ .../src/independent_variable.cc | 6 +- .../fault_management/src/rand_number.cc | 6 +- .../fault_management/src/trigger_group.cc | 5 ++ .../include/ellipsoid_intersection.hh | 6 ++ .../math_utils/include/math_utils.hh | 6 ++ .../math_utils/include/math_utils_private.hh | 6 ++ .../math_utils/include/quadratic_solver.hh | 6 ++ .../math_utils/include/std_array_ops.hh | 5 ++ models/utilities/math_utils/src/math_utils.cc | 6 +- .../math_utils/src/quadratic_solver.cc | 5 ++ .../include/polygon_enclosure.hh | 6 ++ .../include/polygon_enclosure_sphere.hh | 6 ++ .../include/sim_speed_monitor.hh | 6 ++ .../subscriptions/include/subscriptions.hh | 6 ++ .../subscriptions/src/subscriptions.cc | 5 ++ .../verif/SIM_unit_subs/test_class.hh | 6 ++ .../include/abstract_table_lookup.hh | 6 ++ .../include/generic_multi_input_table.hh | 6 ++ .../include/generic_single_input_table.hh | 6 ++ .../quaternion_spherical_interpolator.hh | 6 ++ .../include/simple_table_lookup.hh | 6 ++ .../include/single_input_table_for_angles.hh | 6 ++ .../single_input_table_for_quaternions.hh | 6 ++ .../single_input_table_var_with_deriv.hh | 6 ++ .../include/table_independent_variable.hh | 6 ++ .../include/table_lookup__transpose_data.hh | 6 ++ .../include/table_lookup_set.hh | 6 ++ .../include/table_type_defs.hh | 6 ++ .../src/abstract_table_lookup.cc | 6 +- .../src/generic_multi_input_table.cc | 6 +- .../src/generic_single_input_table.cc | 5 ++ .../src/quaternion_spherical_interpolator.cc | 6 +- .../src/simple_table_lookup.cc | 6 +- .../src/single_input_table_for_angles.cc | 5 ++ .../src/single_input_table_for_quaternions.cc | 5 ++ .../src/single_input_table_var_with_deriv.cc | 6 +- .../src/table_independent_variable.cc | 5 ++ .../src/table_lookup__transpose_data.cc | 6 +- .../table_interp_cpp/src/table_lookup_set.cc | 6 +- .../test/table_independent_variable_test.cc | 74 +++++++++---------- .../include/test_model.hh | 6 ++ .../include/test_model.hh | 6 ++ .../trick_logging/include/trick_logging.hh | 6 ++ .../xml_helper/include/xml_helper.hh | 6 ++ models/utilities/xml_helper/src/xml_helper.cc | 5 ++ .../verif/SIM_verif/include/test.hh | 6 ++ .../include/commandable_action.hh | 6 ++ .../include/commandable_action_set.hh | 6 ++ .../src/commandable_action.cc | 5 ++ .../src/commandable_action_set.cc | 5 ++ .../verif/SIM_verif/include/sample_set.hh | 6 ++ .../compound_events/include/compound_event.hh | 10 ++- .../include/compound_event_manager.hh | 6 ++ .../compound_event_python_interface.hh | 6 ++ .../compound_events/include/event_trigger.hh | 7 +- .../include/event_trigger_set.hh | 6 ++ .../compound_events/src/compound_event.cc | 6 +- .../src/compound_event_manager.cc | 6 +- .../src/compound_event_python_interface.cc | 5 ++ .../compound_events/src/event_trigger.cc | 6 +- .../compound_events/src/event_trigger_set.cc | 6 +- .../include/sample_sim_data.hh | 6 ++ .../include/verif_events_manager.hh | 6 ++ .../include/sample_sim_data.hh | 6 ++ .../include/verif_events_manager.hh | 6 ++ .../SIM_verif_trigger_test1/input_config.cc | 5 ++ .../include/sample_sim_data.hh | 6 ++ .../include/verif_events_manager.hh | 6 ++ .../include/dummy_vehicle_launcher.hh | 6 ++ .../src/dummy_vehicle_launcher.cc | 5 ++ .../events_manager/include/event_action.hh | 6 ++ .../include/event_action_base.hh | 6 ++ .../include/event_variable_assignment.hh | 6 ++ .../include/vehicle_events_manager.hh | 6 ++ .../include/watch_values_base.hh | 6 ++ .../include/watch_values_base_core.hh | 6 ++ .../include/watch_values_base_multi.hh | 6 ++ .../include/watch_values_delay.hh | 12 ++- .../include/watch_values_flipflop.hh | 6 ++ .../include/watch_values_set.hh | 6 ++ .../include/watch_values_specific.hh | 16 ++-- .../include/watch_values_specific__jeod.hh | 6 ++ .../src/vehicle_events_manager.cc | 6 +- .../src/watch_values_base_core.cc | 6 +- .../src/watch_values_flipflop.cc | 6 +- .../events_manager/src/watch_values_set.cc | 6 +- .../include/verif_vehicle_events_manager.hh | 6 ++ ...rif_vehicle_events_manager_with_actions.hh | 6 ++ utility/mocks/cml/cml_message_mock.cc | 6 +- utility/mocks/cml/cml_message_mock.hh | 4 +- 355 files changed, 2049 insertions(+), 199 deletions(-) diff --git a/models/dynamics/actions/mass_body_detach_impulsive/include/mass_body_detach_impulsive.hh b/models/dynamics/actions/mass_body_detach_impulsive/include/mass_body_detach_impulsive.hh index 3e6e40cd..7cd8102f 100644 --- a/models/dynamics/actions/mass_body_detach_impulsive/include/mass_body_detach_impulsive.hh +++ b/models/dynamics/actions/mass_body_detach_impulsive/include/mass_body_detach_impulsive.hh @@ -29,6 +29,8 @@ class DynManager; class MassPoint; } +namespace cml { + // Causes the subject body to detach from its parent with a specified impulse. class MassBodyDetachImpulsive : public jeod::BodyAction { // Member data @@ -74,4 +76,8 @@ class MassBodyDetachImpulsive : public jeod::BodyAction { const std::string & mass_point_name); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/actions/mass_body_detach_impulsive/src/mass_body_detach_impulsive.cc b/models/dynamics/actions/mass_body_detach_impulsive/src/mass_body_detach_impulsive.cc index 9fcb35c2..1de52c87 100644 --- a/models/dynamics/actions/mass_body_detach_impulsive/src/mass_body_detach_impulsive.cc +++ b/models/dynamics/actions/mass_body_detach_impulsive/src/mass_body_detach_impulsive.cc @@ -28,6 +28,8 @@ Library dependencies: #include +namespace cml { + /******************************************************************************* Function: MassBodyDetachImpulsive::initialize Purpose: (Initialize a MassBodyDetach) @@ -290,4 +292,6 @@ MassBodyDetachImpulsive::apply_impulse( jeod::DynBody & dyn_body, root_body->set_attitude_rate( new_rate, root_body->composite_body); root_body->propagate_state(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/integration/accumulated_absolute_deltas/include/accumulated_absolute_deltas.hh b/models/dynamics/integration/accumulated_absolute_deltas/include/accumulated_absolute_deltas.hh index 0f7295bd..946240e7 100644 --- a/models/dynamics/integration/accumulated_absolute_deltas/include/accumulated_absolute_deltas.hh +++ b/models/dynamics/integration/accumulated_absolute_deltas/include/accumulated_absolute_deltas.hh @@ -34,6 +34,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + class AccumulatedAbsoluteDeltas : public SubscriptionBase { protected: @@ -58,4 +60,8 @@ class AccumulatedAbsoluteDeltas : public SubscriptionBase protected: void activate() override; }; + + +} // namespace cml + #endif diff --git a/models/dynamics/integration/accumulated_absolute_deltas/src/accumulated_absolute_deltas.cc b/models/dynamics/integration/accumulated_absolute_deltas/src/accumulated_absolute_deltas.cc index 085e607c..209c9d52 100644 --- a/models/dynamics/integration/accumulated_absolute_deltas/src/accumulated_absolute_deltas.cc +++ b/models/dynamics/integration/accumulated_absolute_deltas/src/accumulated_absolute_deltas.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -110,4 +112,6 @@ AccumulatedAbsoluteDeltas::update() accumulated_deltas[ii] += std::abs( variable[ii] - old_variable[ii]); old_variable[ii] = variable[ii]; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/integration/scalar_integrable_object/include/scalar_integrable_object.hh b/models/dynamics/integration/scalar_integrable_object/include/scalar_integrable_object.hh index 1b961857..032bd25c 100644 --- a/models/dynamics/integration/scalar_integrable_object/include/scalar_integrable_object.hh +++ b/models/dynamics/integration/scalar_integrable_object/include/scalar_integrable_object.hh @@ -12,6 +12,8 @@ Library Dependency: #include "jeod/models/utils/integration/include/restartable_state_integrator.hh" #include "er7_utils/integration/core/include/integrable_object.hh" +namespace cml { + // These objects will automatically update the value of the variable you // connect it to. @@ -48,4 +50,8 @@ private: double &value; /* (--) Input value to be integrated. */ double &derivative; /* (--) Time derivative of the value to be integrated. */ }; + + +} // namespace cml + #endif diff --git a/models/dynamics/integration/scalar_integrable_object/src/scalar_integrable_object.cc b/models/dynamics/integration/scalar_integrable_object/src/scalar_integrable_object.cc index 7fa7b878..245b295e 100644 --- a/models/dynamics/integration/scalar_integrable_object/src/scalar_integrable_object.cc +++ b/models/dynamics/integration/scalar_integrable_object/src/scalar_integrable_object.cc @@ -12,6 +12,8 @@ #include "er7_utils/integration/core/include/integrator_constructor.hh" #include "er7_utils/integration/core/include/integrator_result.hh" +namespace cml { + /******************************************************************************* Constructor *******************************************************************************/ @@ -74,3 +76,6 @@ er7_utils::IntegratorResult ScalarIntegrableObject::integrate( { return integrator.integrate(dyn_dt, target_stage, &derivative, &value); } + + +} // namespace cml diff --git a/models/dynamics/integration/vector3_integrable_object/include/restartable_vector3_1st_order_integrator.hh b/models/dynamics/integration/vector3_integrable_object/include/restartable_vector3_1st_order_integrator.hh index ff541b11..b1bc8294 100644 --- a/models/dynamics/integration/vector3_integrable_object/include/restartable_vector3_1st_order_integrator.hh +++ b/models/dynamics/integration/vector3_integrable_object/include/restartable_vector3_1st_order_integrator.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "jeod/models/utils/memory/include/jeod_alloc.hh" #include "jeod/models/utils/integration/include/restartable_state_integrator_templates.hh" +namespace cml { + class RestartableVector3FirstOrderODEIntegrator : public jeod::SimpleCheckpointable { public: @@ -138,4 +140,8 @@ Purpose:(Restore the integrator on restart.) */ jeod::RestartableFirstOrderODEIntegrator<3> integrator_manager; //!< trick_io(**) }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/integration/vector3_integrable_object/include/vector3_integrable_object.hh b/models/dynamics/integration/vector3_integrable_object/include/vector3_integrable_object.hh index d57a0be5..1fdce320 100644 --- a/models/dynamics/integration/vector3_integrable_object/include/vector3_integrable_object.hh +++ b/models/dynamics/integration/vector3_integrable_object/include/vector3_integrable_object.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "restartable_vector3_1st_order_integrator.hh" +namespace cml { + class Vector3IntegrableObject : public SubscriptionBase, public er7_utils::IntegrableObject @@ -76,4 +78,8 @@ class Vector3IntegrableObject : public SubscriptionBase, RestartableVector3FirstOrderODEIntegrator integrator; //!< trick_units(--) #endif }; + + +} // namespace cml + #endif diff --git a/models/dynamics/integration/vector3_integrable_object/src/vector3_integrable_object.cc b/models/dynamics/integration/vector3_integrable_object/src/vector3_integrable_object.cc index f56877de..70d15c17 100644 --- a/models/dynamics/integration/vector3_integrable_object/src/vector3_integrable_object.cc +++ b/models/dynamics/integration/vector3_integrable_object/src/vector3_integrable_object.cc @@ -33,6 +33,8 @@ LIBRARY DEPENDENCIES: #include "../include/vector3_integrable_object.hh" +namespace cml { + /***************************************************************************** empty @@ -282,3 +284,6 @@ Vector3IntegrableObject::integrate ( { return integrator.integrate (dyn_dt, target_stage, deriv_ptr, variable); } + + +} // namespace cml diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body.hh index f6dabfc3..73c87b78 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body.hh @@ -46,6 +46,8 @@ PROGRAMMERS: #include "dynamic_mass_body_properties.hh" #include "dynamic_mass_body_nominal_properties.hh" +namespace cml { + // Inherit directly from JEOD Mass Body class DynamicMassBody : public jeod::MassBody { @@ -98,4 +100,8 @@ class DynamicMassBody : public jeod::MassBody }; + + +} // namespace cml + #endif diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_interpolation.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_interpolation.hh index db6a5ba3..7ba581b2 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_interpolation.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_interpolation.hh @@ -46,6 +46,8 @@ PROGRAMMERS: #include "jeod/models/dynamics/mass/include/mass_properties.hh" #include "cml/models/utilities/table_interp_cpp/include/table_lookup_set.hh" +namespace cml { + class DynamicMassBodyInterpolation { public: @@ -186,4 +188,8 @@ private: flag to indicate whether method initialize() has been called. */ }; + + +} // namespace cml + #endif diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_nominal_properties.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_nominal_properties.hh index 3205d97f..c33bc393 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_nominal_properties.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_nominal_properties.hh @@ -44,6 +44,8 @@ PROGRAMMERS: #include "jeod/models/dynamics/mass/include/mass_properties.hh" +namespace cml { + // NOTE - this class does not inherit from jeod::MassProperties because of the // extraneous capabilities that jeod::MassPoint (parent to jeod::MassProperties) // provides that this class will never need. A cleaner interface is to just @@ -67,4 +69,8 @@ public: }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_properties.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_properties.hh index 6ce12235..8424ee4d 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_properties.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_properties.hh @@ -43,6 +43,8 @@ PROGRAMMERS: #include "dynamic_mass_body_interpolation.hh" +namespace cml { + /***************************************************************************** DynamicMassBodyPropertiesInterface Purpose:( This is the typical interface that external models will use to @@ -106,4 +108,8 @@ public: void disperse_mass_properties(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_group.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_group.hh index 156f78d1..e54b1568 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_group.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_group.hh @@ -57,6 +57,8 @@ namespace jeod { class MassBody; } +namespace cml { + class DynamicMassGroup : public SubscriptionBase { public: // Inputs: @@ -133,4 +135,8 @@ class DynamicMassGroup : public SubscriptionBase { void add_mass_to_group_internal( DynamicMassBody *mass, bool send_err_msg); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_string.hh b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_string.hh index fa788a06..aa5e7c2b 100644 --- a/models/dynamics/mass/dynamic_mass/include/dynamic_mass_string.hh +++ b/models/dynamics/mass/dynamic_mass/include/dynamic_mass_string.hh @@ -30,6 +30,8 @@ PROGRAMMERS: #include #include +namespace cml { + class DynamicMassString : public DynamicMassBodyPropertiesInterface { public: @@ -82,4 +84,8 @@ public: void set_string_in_group() {string_in_group = true;} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body.cc b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body.cc index 8c2a95fb..06166e15 100644 --- a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body.cc +++ b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body.cc @@ -37,6 +37,8 @@ #include "../include/dynamic_mass_body_properties.hh" #include "../include/dynamic_mass_body_interpolation.hh" +namespace cml { + /******************************************************************************** Method: DynamicMassBody Purpose: (Constructor) @@ -393,4 +395,6 @@ DynamicMassBody::revert_dry_mass_config() dynamic_properties.consumable_mass = dry_mass_revert__consumable_mass; dry_mass_revert__available = false; update_mass_internal(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_interpolation.cc b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_interpolation.cc index 5d21780b..5330c87e 100644 --- a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_interpolation.cc +++ b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_interpolation.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/dynamic_mass_body_interpolation.hh" +namespace cml { + /******************************************************************************** Method: Constructor ********************************************************************************/ @@ -411,4 +413,6 @@ DynamicMassBodyInterpolation::warn_no_interp(const char* const table_name) "Remember to switch the flag to true to use these data.\n" "Data remain available for use, but the interpolation will not execute\n" "until the control flag is set to true.\n"); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_properties.cc b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_properties.cc index bf07ea8f..e9abc13b 100644 --- a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_properties.cc +++ b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_body_properties.cc @@ -19,6 +19,8 @@ #include "../include/dynamic_mass_body_nominal_properties.hh" #include +namespace cml { + /***************************************************************************** Constructors @@ -85,4 +87,6 @@ DynamicMassBodyProperties::disperse_mass_properties () interpolation.poi_dep_yz.bias_data(poi_bias[2], kk); } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_group.cc b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_group.cc index 9f388409..4cede922 100644 --- a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_group.cc +++ b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_group.cc @@ -23,6 +23,8 @@ LIBRARY DEPENDENCIES: #include "../include/dynamic_mass_group.hh" #include "../include/dynamic_mass_string.hh" +namespace cml { + /******************************************************************************* Method: DynamicMassGroup Purpose: (Constructor) @@ -518,4 +520,6 @@ DynamicMassGroup::add_mass_to_group_internal( mass->initialize_dyn_mass(); } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_string.cc b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_string.cc index ad517aa6..4999c429 100644 --- a/models/dynamics/mass/dynamic_mass/src/dynamic_mass_string.cc +++ b/models/dynamics/mass/dynamic_mass/src/dynamic_mass_string.cc @@ -30,6 +30,8 @@ #include #include +namespace cml { + /***************************************************************************** initialize Purpose:(Copies the body_collection to available_bodies) @@ -215,4 +217,6 @@ DynamicMassString::update() }; consumable_mass = std::accumulate(available_bodies.begin(), available_bodies.end(), 0.0, add_consumable_mass); mass_consumed += mass_consumed_step; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_composite_dispersions.hh b/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_composite_dispersions.hh index 35c81fbf..86217616 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_composite_dispersions.hh +++ b/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_composite_dispersions.hh @@ -39,6 +39,8 @@ namespace jeod { class DynManager; } +namespace cml { + /******************************************************************************* MassBodyCompositeDispersions PURPOSE:(Manages dispersions to be applied to the composite-properties. @@ -114,4 +116,8 @@ private: void comp_to_core_updates(); void process_dispersions(); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_dispersed_init.hh b/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_dispersed_init.hh index 05222d5e..214eeefb 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_dispersed_init.hh +++ b/models/dynamics/mass/mass_body_dispersed_init/include/mass_body_dispersed_init.hh @@ -26,6 +26,8 @@ namespace jeod { class DynManager; } +namespace cml { + /******************************************************************************* The instantiable replacement for MassBodyInit. The apply(...) method in this class can be used as a direct replacement for the @@ -42,4 +44,8 @@ public: void apply( jeod::DynManager & dyn_manager) override; }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/mass/mass_body_dispersed_init/include/mass_properties_dispersions.hh b/models/dynamics/mass/mass_body_dispersed_init/include/mass_properties_dispersions.hh index 3c0f8ccd..767652ce 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/include/mass_properties_dispersions.hh +++ b/models/dynamics/mass/mass_body_dispersed_init/include/mass_properties_dispersions.hh @@ -25,6 +25,8 @@ PROGRAMMERS: #ifndef CML_MASS_PROPERTIES_DISPERSIONS_HH #define CML_MASS_PROPERTIES_DISPERSIONS_HH +namespace cml { + /******************************************************************************* MassPropertiesDispersions PURPOSE: (Primarily data-storage. May include some dispersion functionality @@ -133,4 +135,8 @@ public: MassPropertiesDispersionsFlags & operator = ( const MassPropertiesDispersionsFlags& rhs) = delete; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_composite_dispersions.cc b/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_composite_dispersions.cc index 52e2edec..a7c1d27d 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_composite_dispersions.cc +++ b/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_composite_dispersions.cc @@ -27,6 +27,8 @@ LIBRARY DEPENDENCIES: #include "jeod/models/utils/math/include/matrix3x3.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /******************************************************************************* Constructor *******************************************************************************/ @@ -300,4 +302,6 @@ MassBodyCompositeDispersions::process_dispersions() // Construct the dispersed inertia tensor from the moment and products of // inertia dispersions. disperse.generate_inertia_tensor( poi_are_negative_integrals); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_dispersed_init.cc b/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_dispersed_init.cc index bbd6bd72..35ccbfe7 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_dispersed_init.cc +++ b/models/dynamics/mass/mass_body_dispersed_init/src/mass_body_dispersed_init.cc @@ -15,6 +15,8 @@ #include "jeod/models/utils/math/include/matrix3x3.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /******************************************************************************* apply PURPOSE:(Applies the body-action after first adding the dispersions to the @@ -65,3 +67,6 @@ MassBodyDispersedInit::apply(jeod::DynManager & dyn_manager) // variables to the Mass Body. MassBodyInit::apply( dyn_manager); } + + +} // namespace cml diff --git a/models/dynamics/mass/mass_body_dispersed_init/src/mass_properties_dispersions.cc b/models/dynamics/mass/mass_body_dispersed_init/src/mass_properties_dispersions.cc index fe8a9cb8..680d5055 100644 --- a/models/dynamics/mass/mass_body_dispersed_init/src/mass_properties_dispersions.cc +++ b/models/dynamics/mass/mass_body_dispersed_init/src/mass_properties_dispersions.cc @@ -14,6 +14,8 @@ #include +namespace cml { + /******************************************************************************* generate_inertia_tensor PURPOSE:(Generates the inertia tensor from the moment and products of inertia.) @@ -188,4 +190,6 @@ void MassPropertiesDispersions::scale_poi( double nominal_xy, poi[0] *= nominal_xy; poi[1] *= nominal_xz; poi[2] *= nominal_yz; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass/mass_body_distribute_comp_to_core/include/mass_body_distribute_comp_to_core.hh b/models/dynamics/mass/mass_body_distribute_comp_to_core/include/mass_body_distribute_comp_to_core.hh index 7a5e64b7..f9f53531 100644 --- a/models/dynamics/mass/mass_body_distribute_comp_to_core/include/mass_body_distribute_comp_to_core.hh +++ b/models/dynamics/mass/mass_body_distribute_comp_to_core/include/mass_body_distribute_comp_to_core.hh @@ -28,6 +28,8 @@ Programmers: #include "jeod/models/dynamics/mass/include/mass_properties.hh" #include "jeod/models/dynamics/mass/include/mass_point_state.hh" +namespace cml { + /***************************************************************************** @@ -77,4 +79,8 @@ class MassBodyDistributeCompToCore MassBodyDistributeCompToCore & operator = ( const MassBodyDistributeCompToCore&); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/mass/mass_body_distribute_comp_to_core/src/mass_body_distribute_comp_to_core.cc b/models/dynamics/mass/mass_body_distribute_comp_to_core/src/mass_body_distribute_comp_to_core.cc index 49e7387e..24aba2ff 100644 --- a/models/dynamics/mass/mass_body_distribute_comp_to_core/src/mass_body_distribute_comp_to_core.cc +++ b/models/dynamics/mass/mass_body_distribute_comp_to_core/src/mass_body_distribute_comp_to_core.cc @@ -22,6 +22,8 @@ Library dependencies: #include "jeod/models/utils/math/include/matrix3x3.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** Constructor @@ -349,4 +351,6 @@ MassBodyDistributeCompToCore::check_for_valid_mass_properties() const "simulation will continue with impossible mass properties for ", adjustable_body.name.get_name(), ".\n"); } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/mass_derivative_dynamics/include/mass_derivative_dynamics.hh b/models/dynamics/mass_derivative_dynamics/include/mass_derivative_dynamics.hh index 9c9c7098..5618d737 100644 --- a/models/dynamics/mass_derivative_dynamics/include/mass_derivative_dynamics.hh +++ b/models/dynamics/mass_derivative_dynamics/include/mass_derivative_dynamics.hh @@ -25,6 +25,8 @@ class DynBody; class MassProperties; } +namespace cml { + /***************************************************************************** MassDerivativeDynamics Purpose:(Provides a pseudo-force and pseudo-torque to emulate the effects of @@ -152,4 +154,8 @@ class MassDerivativeDynamics : public SubscriptionBase MassDerivativeDynamics (const MassDerivativeDynamics&); MassDerivativeDynamics& operator = (const MassDerivativeDynamics&); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/mass_derivative_dynamics/src/mass_derivative_dynamics.cc b/models/dynamics/mass_derivative_dynamics/src/mass_derivative_dynamics.cc index 33c2c817..fad4beca 100644 --- a/models/dynamics/mass_derivative_dynamics/src/mass_derivative_dynamics.cc +++ b/models/dynamics/mass_derivative_dynamics/src/mass_derivative_dynamics.cc @@ -24,6 +24,8 @@ LIBRARY DEPENDENCY: #include "cml/models/utilities/math_utils/include/math_utils.hh" #include +namespace cml { + /***************************************************************************** Constructor @@ -434,3 +436,6 @@ MassDerivativeDynamics::modify_velocity() body.composite_body); body.propagate_state(); } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/atmos_rel_state/include/atmos_relative_state.hh b/models/dynamics/state_descriptors/atmos_rel_state/include/atmos_relative_state.hh index 777a11e9..7d14d328 100644 --- a/models/dynamics/state_descriptors/atmos_rel_state/include/atmos_relative_state.hh +++ b/models/dynamics/state_descriptors/atmos_rel_state/include/atmos_relative_state.hh @@ -36,6 +36,9 @@ PROGRAMMERS: namespace jeod { class DynBody; } + +namespace cml { + class AtmosphereExecInterface; class AtmosExecOutput; class ExtendedPlanetaryDerivedState; @@ -174,4 +177,8 @@ class AtmosRelativeState : public SubscriptionBase }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/atmos_rel_state/src/atmos_relative_state.cc b/models/dynamics/state_descriptors/atmos_rel_state/src/atmos_relative_state.cc index 1ca8efc8..4a05b8fb 100644 --- a/models/dynamics/state_descriptors/atmos_rel_state/src/atmos_relative_state.cc +++ b/models/dynamics/state_descriptors/atmos_rel_state/src/atmos_relative_state.cc @@ -54,6 +54,8 @@ LIBRARY DEPENDENCIES: #include "../include/atmos_relative_state.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -689,4 +691,6 @@ AtmosRelativeState::normalize_T_traj_body() Q_traj_body.left_quat_from_transformation( T_traj_body); Q_traj_body.normalize(); Q_traj_body.left_quat_to_transformation( T_traj_body); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/atmos_rel_state/verif/SIM_nan_verif/atmos_rel_state_test.hh b/models/dynamics/state_descriptors/atmos_rel_state/verif/SIM_nan_verif/atmos_rel_state_test.hh index 98120831..650dc983 100644 --- a/models/dynamics/state_descriptors/atmos_rel_state/verif/SIM_nan_verif/atmos_rel_state_test.hh +++ b/models/dynamics/state_descriptors/atmos_rel_state/verif/SIM_nan_verif/atmos_rel_state_test.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #include "jeod/models/utils/orientation/include/orientation.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + class AtmosRelStateTest : public AtmosRelativeState { @@ -58,4 +60,8 @@ inline void AtmosRelStateTest::compute_euler_angles() + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/earth_moon_rotating_frame/include/earth_moon_rotating_frame.hh b/models/dynamics/state_descriptors/earth_moon_rotating_frame/include/earth_moon_rotating_frame.hh index 920758a4..24b1cba2 100644 --- a/models/dynamics/state_descriptors/earth_moon_rotating_frame/include/earth_moon_rotating_frame.hh +++ b/models/dynamics/state_descriptors/earth_moon_rotating_frame/include/earth_moon_rotating_frame.hh @@ -21,6 +21,8 @@ Programmers: #include "cml/models/dynamics/state_descriptors/pointing_ref_frame/include/ephem_based_pointing_ref_frame.hh" #include "jeod/models/environment/ephemerides/ephem_manager/include/ephem_manager.hh" +namespace cml { + /***************************************************************************** EarthMoonRotatingFrame Purpose:(Contains configuration data and a PointingRefFrame instance @@ -56,4 +58,8 @@ class EarthMoonRotatingFrame : public EphemBasedPointingRefFrame { void update() override; void set_orientation(FrameOrientation new_orientation); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/earth_moon_rotating_frame/src/earth_moon_rotating_frame.cc b/models/dynamics/state_descriptors/earth_moon_rotating_frame/src/earth_moon_rotating_frame.cc index 64822327..d1a3c154 100644 --- a/models/dynamics/state_descriptors/earth_moon_rotating_frame/src/earth_moon_rotating_frame.cc +++ b/models/dynamics/state_descriptors/earth_moon_rotating_frame/src/earth_moon_rotating_frame.cc @@ -21,6 +21,8 @@ Library dependencies: #include "../include/earth_moon_rotating_frame.hh" +namespace cml { + /******************************************************************************* Constructor Purpose: (Construct a EarthMoonRotatingFrame object.) @@ -132,4 +134,6 @@ EarthMoonRotatingFrame::update() jeod::Vector3::negate(pointing_frame.state.rot.T_parent_this[1]); pointing_frame.state.rot.compute_quaternion(); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh index 69cf47f8..1e1640ca 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh @@ -39,6 +39,8 @@ class DynBody; class DynManager; } +namespace cml { + /***************************************************************************** ExtendedPlanetaryDerivedState Purpose:(Provides a plethora of options for expressing the state relative @@ -241,4 +243,8 @@ protected: }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/point_to_point.hh b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/point_to_point.hh index e6f8f9ed..7ac7770c 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/point_to_point.hh +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/point_to_point.hh @@ -29,6 +29,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** PointToPointElement @@ -149,4 +151,8 @@ class PointToPointManager PointToPointManager ( const PointToPointManager &) = delete; PointToPointManager & operator = ( const PointToPointManager &) = delete; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/range_safety_data.hh b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/range_safety_data.hh index f51b6dcd..6c0b5624 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/range_safety_data.hh +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/range_safety_data.hh @@ -21,6 +21,8 @@ #ifndef CML_RANGE_SAFETY_DATA_HH #define CML_RANGE_SAFETY_DATA_HH +namespace cml { + /* PURPOSE: @@ -73,4 +75,8 @@ class RangeSafetyData to the South Impact Limit Line (ILL). */ double ZVRT{0.0}; /* (m) Altitude in pad frame */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/topo_container.hh b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/topo_container.hh index f7eae004..2133fa75 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/topo_container.hh +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/topo_container.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include "velocity_set.hh" +namespace cml { + /***************************************************************************** TopoContainer Purpose:(The TopoContainer class provides the velocity-related values that may @@ -60,4 +62,8 @@ class TopoContainer { void update(); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/velocity_set.hh b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/velocity_set.hh index 95966757..26eea497 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/include/velocity_set.hh +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/include/velocity_set.hh @@ -26,6 +26,8 @@ PROGRAMMERS: #ifndef CML_VELOCITY_SET_HH #define CML_VELOCITY_SET_HH +namespace cml { + /***************************************************************************** VelocitySet Purpose:(Collection of velocity elements for topocentric and topodetic frame @@ -53,4 +55,8 @@ class VelocitySet{ void initialize(const double * vel_in); void update(); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/extended_planetary_derived_state.cc b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/extended_planetary_derived_state.cc index 232a38aa..fc989399 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/extended_planetary_derived_state.cc +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/extended_planetary_derived_state.cc @@ -44,6 +44,8 @@ LIBRARY DEPENDENCIES: #include "../include/extended_planetary_derived_state.hh" +namespace cml { + /************************************************************************* Method: ExtendedPlanetaryDerivedState Purpose: Constructor @@ -732,4 +734,6 @@ ExtendedPlanetaryDerivedState::calculate_relative_accel() // a_{p:p} = relative_accel - omega_cross_omega_cross_r - two_omega_cross_v jeod::Vector3::decr(omega_cross_omega_cross_r, relative_accel); jeod::Vector3::decr(two_omega_cross_v, relative_accel); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/point_to_point.cc b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/point_to_point.cc index 8578ae34..52449ea3 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/point_to_point.cc +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/point_to_point.cc @@ -34,6 +34,8 @@ ASSUMPTIONS / LIMITATIONS: #include #include +namespace cml { + namespace { /***************************************************************************** @@ -359,4 +361,6 @@ PointToPointManager::make_all_pairings() } } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/topo_container.cc b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/topo_container.cc index db17d337..90131e89 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/topo_container.cc +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/topo_container.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "../include/topo_container.hh" +namespace cml { + /***************************************************************************** TopoContainer @@ -92,4 +94,6 @@ TopoContainer::update() } inertial_vel.update(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/velocity_set.cc b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/velocity_set.cc index 511ea620..bc50aa17 100644 --- a/models/dynamics/state_descriptors/extended_planetary_derived_state/src/velocity_set.cc +++ b/models/dynamics/state_descriptors/extended_planetary_derived_state/src/velocity_set.cc @@ -29,6 +29,8 @@ ASSUMPTIONS AND LIMITATIONS #include "../include/velocity_set.hh" +namespace cml { + /***************************************************************************** VelocitySet Purpose:(Constructor) @@ -86,4 +88,6 @@ VelocitySet::update() flight_path = std::atan2( -velocity[2], vel_xy ); altitude_rate = -velocity[2]; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/orb_elem_subset/include/orb_elem_subset.hh b/models/dynamics/state_descriptors/orb_elem_subset/include/orb_elem_subset.hh index b9dfc870..427aa770 100644 --- a/models/dynamics/state_descriptors/orb_elem_subset/include/orb_elem_subset.hh +++ b/models/dynamics/state_descriptors/orb_elem_subset/include/orb_elem_subset.hh @@ -24,9 +24,11 @@ PROGRAMMERS: // Forward declaration namespace jeod { - class Planet; +class Planet; } +namespace cml { + class OrbElemSubset{ public: @@ -118,4 +120,8 @@ class OrbElemSubset{ OrbElemSubset & operator = (const OrbElemSubset&) = delete; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/orb_elem_subset/src/orb_elem_subset.cc b/models/dynamics/state_descriptors/orb_elem_subset/src/orb_elem_subset.cc index 4b3bc941..8a22bace 100644 --- a/models/dynamics/state_descriptors/orb_elem_subset/src/orb_elem_subset.cc +++ b/models/dynamics/state_descriptors/orb_elem_subset/src/orb_elem_subset.cc @@ -19,6 +19,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/orb_elem_subset.hh" +namespace cml { + /***************************************************************************** constructor *****************************************************************************/ @@ -259,4 +261,6 @@ OrbElemSubset::correct_for_j2() position_mag -= j2_delta; vel_vertical_scalar += (4.0 * j2_correction * sinI_sinL*sinI_cosL * mean_motion); semi_major_axis -= (j2_correction * (2.0 - 3.0 * sin_sq_I)); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/pointing_ref_frame/include/ephem_based_pointing_ref_frame.hh b/models/dynamics/state_descriptors/pointing_ref_frame/include/ephem_based_pointing_ref_frame.hh index f888e070..83849560 100644 --- a/models/dynamics/state_descriptors/pointing_ref_frame/include/ephem_based_pointing_ref_frame.hh +++ b/models/dynamics/state_descriptors/pointing_ref_frame/include/ephem_based_pointing_ref_frame.hh @@ -17,6 +17,8 @@ Programmers: #include "jeod/models/environment/ephemerides/ephem_manager/include/ephem_manager.hh" #include "pointing_ref_frame.hh" +namespace cml { + /** * Extension of the @ref PointingRefFrame for cases where the Originating Frame * or Target Frame are ephemeris-based frames. @@ -77,4 +79,8 @@ class EphemBasedPointingRefFrame : public PointingRefFrame SubscriptionBase::initialize(); } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/pointing_ref_frame/include/pointing_ref_frame.hh b/models/dynamics/state_descriptors/pointing_ref_frame/include/pointing_ref_frame.hh index 3e443569..09c9ff86 100644 --- a/models/dynamics/state_descriptors/pointing_ref_frame/include/pointing_ref_frame.hh +++ b/models/dynamics/state_descriptors/pointing_ref_frame/include/pointing_ref_frame.hh @@ -20,6 +20,8 @@ Programmers: #include "jeod/models/utils/ref_frames/include/ref_frame_state.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /** * Defines a reference frame (the Pointing Frame) based on two other reference * frames: the Originating Frame and the Target Frame @@ -131,4 +133,8 @@ class PointingRefFrame : public SubscriptionBase { */ void deactivate() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/pointing_ref_frame/src/pointing_ref_frame.cc b/models/dynamics/state_descriptors/pointing_ref_frame/src/pointing_ref_frame.cc index a9fb979d..f0416d80 100644 --- a/models/dynamics/state_descriptors/pointing_ref_frame/src/pointing_ref_frame.cc +++ b/models/dynamics/state_descriptors/pointing_ref_frame/src/pointing_ref_frame.cc @@ -18,6 +18,8 @@ Library dependencies: #include "../include/pointing_ref_frame.hh" +namespace cml { + /** * @details Initializes the frame with zero vectors for the position and velocity. * The angular velocity is set to a unit vector along the z-axis. The @@ -274,4 +276,6 @@ PointingRefFrame::deactivate() target_frame->unsubscribe(); pointing_frame.unsubscribe(); active = false; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/range/data/include/range_default_data.hh b/models/dynamics/state_descriptors/range/data/include/range_default_data.hh index f78810a0..9aa1f483 100644 --- a/models/dynamics/state_descriptors/range/data/include/range_default_data.hh +++ b/models/dynamics/state_descriptors/range/data/include/range_default_data.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include "../../include/range_from_pfix_reference.hh" +namespace cml { + // TODO Nino Tarantino: this needs to be a single free function, not a class. class RangeDefaultData { @@ -27,4 +29,8 @@ class RangeDefaultData void launch_pad_KSC_39B(RangeFromPfixReference & pad) const; }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/range/data/src/range_default_data.cc b/models/dynamics/state_descriptors/range/data/src/range_default_data.cc index ba12f93b..a9438948 100644 --- a/models/dynamics/state_descriptors/range/data/src/range_default_data.cc +++ b/models/dynamics/state_descriptors/range/data/src/range_default_data.cc @@ -13,6 +13,8 @@ #include "../../include/range_from_pfix_reference.hh" #include "../include/range_default_data.hh" +namespace cml { + /***************************************************************************** @@ -33,3 +35,6 @@ RangeDefaultData::launch_pad_KSC_39B( pad.reference_data.direction_type = PfixReferencePoint::topodetic; pad.reference_data.azimuth = M_PI_2; } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/range/include/pfix_reference_point.hh b/models/dynamics/state_descriptors/range/include/pfix_reference_point.hh index 65419212..afb32a6d 100644 --- a/models/dynamics/state_descriptors/range/include/pfix_reference_point.hh +++ b/models/dynamics/state_descriptors/range/include/pfix_reference_point.hh @@ -16,6 +16,8 @@ Programmers: #include "jeod/models/utils/planet_fixed/planet_fixed_posn/include/planet_fixed_posn.hh" +namespace cml { + class PfixReferencePoint : public jeod::PlanetFixedPosition { public: @@ -66,4 +68,8 @@ class PfixReferencePoint : public jeod::PlanetFixedPosition void set_direction (bool & use_polar_direction, bool & ref_point_set); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/range/include/range_computation.hh b/models/dynamics/state_descriptors/range/include/range_computation.hh index b84ce900..39f86123 100644 --- a/models/dynamics/state_descriptors/range/include/range_computation.hh +++ b/models/dynamics/state_descriptors/range/include/range_computation.hh @@ -27,6 +27,8 @@ class Planet; class PlanetFixedPosition; } +namespace cml { + /***************************************************************************** RangeValues Purpose:(Provides the collective range and range-angle variables in one place) @@ -151,4 +153,8 @@ class RangeComputation : public RangeValues, virtual void is_abstract() = 0; // Makes this class non-instantiable }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/range/include/range_from_pfix_reference.hh b/models/dynamics/state_descriptors/range/include/range_from_pfix_reference.hh index f4d3543b..9422ee39 100644 --- a/models/dynamics/state_descriptors/range/include/range_from_pfix_reference.hh +++ b/models/dynamics/state_descriptors/range/include/range_from_pfix_reference.hh @@ -23,6 +23,8 @@ namespace jeod { class PlanetFixedPosition; } +namespace cml { + class RangeFromPfixReference : public RangeComputation { public: @@ -39,4 +41,8 @@ class RangeFromPfixReference : public RangeComputation void is_abstract() override {} // Makes this class instantiable }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/range/include/range_to_pfix_reference.hh b/models/dynamics/state_descriptors/range/include/range_to_pfix_reference.hh index b1476e8b..982da968 100644 --- a/models/dynamics/state_descriptors/range/include/range_to_pfix_reference.hh +++ b/models/dynamics/state_descriptors/range/include/range_to_pfix_reference.hh @@ -23,6 +23,8 @@ namespace jeod { class PlanetFixedPosition; } +namespace cml { + class RangeToPfixReference : public RangeComputation { protected: @@ -50,4 +52,8 @@ class RangeToPfixReference : public RangeComputation }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/range/src/pfix_reference_point.cc b/models/dynamics/state_descriptors/range/src/pfix_reference_point.cc index 55415739..400ac82c 100644 --- a/models/dynamics/state_descriptors/range/src/pfix_reference_point.cc +++ b/models/dynamics/state_descriptors/range/src/pfix_reference_point.cc @@ -18,6 +18,8 @@ Library dependencies: #include "../include/pfix_reference_point.hh" +namespace cml { + /***************************************************************************** set_point Purpose:(sets the reference-point position based on the input values.) @@ -142,4 +144,6 @@ PfixReferencePoint::set_direction( "set the direction.\n"); break; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/range/src/range_computation.cc b/models/dynamics/state_descriptors/range/src/range_computation.cc index adecdf9f..1c324099 100644 --- a/models/dynamics/state_descriptors/range/src/range_computation.cc +++ b/models/dynamics/state_descriptors/range/src/range_computation.cc @@ -27,6 +27,8 @@ Library dependencies: #include "../include/range_computation.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -292,4 +294,6 @@ RangeComputation::update_using_cartesian() if (jeod::Vector3::dot(pos_x_pos_unit_pfix,dir_x_pos_unit_pfix) < 0) { downrange_angle *= -1.0; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_descriptors/range/src/range_from_pfix_reference.cc b/models/dynamics/state_descriptors/range/src/range_from_pfix_reference.cc index 4b86d355..6d80b11b 100644 --- a/models/dynamics/state_descriptors/range/src/range_from_pfix_reference.cc +++ b/models/dynamics/state_descriptors/range/src/range_from_pfix_reference.cc @@ -18,6 +18,8 @@ Library dependencies: #include "../include/range_computation.hh" #include "../include/range_from_pfix_reference.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -115,3 +117,6 @@ RangeFromPfixReference::update_using_cartesian() RangeComputation::update_using_cartesian(); } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/range/src/range_to_pfix_reference.cc b/models/dynamics/state_descriptors/range/src/range_to_pfix_reference.cc index 3768e999..2998582d 100644 --- a/models/dynamics/state_descriptors/range/src/range_to_pfix_reference.cc +++ b/models/dynamics/state_descriptors/range/src/range_to_pfix_reference.cc @@ -16,6 +16,8 @@ #include "../include/range_to_pfix_reference.hh" +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -159,3 +161,6 @@ RangeToPfixReference::update_using_cartesian() RangeComputation::update_using_cartesian(); } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/separation_state/include/lvlh_separation_state.hh b/models/dynamics/state_descriptors/separation_state/include/lvlh_separation_state.hh index c01e3321..1afc4218 100644 --- a/models/dynamics/state_descriptors/separation_state/include/lvlh_separation_state.hh +++ b/models/dynamics/state_descriptors/separation_state/include/lvlh_separation_state.hh @@ -27,6 +27,8 @@ class DynManager; class RefFrame; } +namespace cml { + class LvlhSeparationState : public SeparationState { public: @@ -83,4 +85,8 @@ class LvlhSeparationState : public SeparationState void deactivate() override; }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/state_descriptors/separation_state/include/separation_state.hh b/models/dynamics/state_descriptors/separation_state/include/separation_state.hh index b550f7e1..a109c086 100644 --- a/models/dynamics/state_descriptors/separation_state/include/separation_state.hh +++ b/models/dynamics/state_descriptors/separation_state/include/separation_state.hh @@ -27,6 +27,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include +namespace cml { + class SeparationState : public SubscriptionBase { @@ -109,4 +111,8 @@ class SeparationState : public SubscriptionBase void deactivate() override; }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/separation_state/src/lvlh_separation_state.cc b/models/dynamics/state_descriptors/separation_state/src/lvlh_separation_state.cc index e9574381..f2323969 100644 --- a/models/dynamics/state_descriptors/separation_state/src/lvlh_separation_state.cc +++ b/models/dynamics/state_descriptors/separation_state/src/lvlh_separation_state.cc @@ -23,6 +23,8 @@ LIBRARY DEPENDENCIES: #include "jeod/models/utils/lvlh_frame/include/lvlh_frame.hh" #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -329,3 +331,6 @@ LvlhSeparationState::deactivate() } SeparationState::deactivate(); } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/separation_state/src/separation_state.cc b/models/dynamics/state_descriptors/separation_state/src/separation_state.cc index bcf6ebdc..3b7ca7d0 100644 --- a/models/dynamics/state_descriptors/separation_state/src/separation_state.cc +++ b/models/dynamics/state_descriptors/separation_state/src/separation_state.cc @@ -24,6 +24,8 @@ LIBRARY DEPENDENCIES: #include "../include/separation_state.hh" +namespace cml { + /******************************************************************************** Method: SeparationState Purpose: (Constructor) @@ -217,3 +219,6 @@ void SeparationState::deactivate() } active = false; } + + +} // namespace cml diff --git a/models/dynamics/state_descriptors/simple_planet_rel_state/include/simple_planet_rel_state.hh b/models/dynamics/state_descriptors/simple_planet_rel_state/include/simple_planet_rel_state.hh index 7646e373..880d1ba9 100644 --- a/models/dynamics/state_descriptors/simple_planet_rel_state/include/simple_planet_rel_state.hh +++ b/models/dynamics/state_descriptors/simple_planet_rel_state/include/simple_planet_rel_state.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "jeod/models/dynamics/dyn_body/include/dyn_body.hh" #include "jeod/models/dynamics/dyn_manager/include/class_declarations.hh" +namespace cml { + class SimplePlanetRelState : public SubscriptionBase, public jeod::RelativeDerivedState { @@ -43,4 +45,8 @@ class SimplePlanetRelState : public SubscriptionBase, jeod::DynManager & dyn_manager) override; void update() override; }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_descriptors/simple_planet_rel_state/src/simple_planet_rel_state.cc b/models/dynamics/state_descriptors/simple_planet_rel_state/src/simple_planet_rel_state.cc index d5966e1f..505e3fa7 100644 --- a/models/dynamics/state_descriptors/simple_planet_rel_state/src/simple_planet_rel_state.cc +++ b/models/dynamics/state_descriptors/simple_planet_rel_state/src/simple_planet_rel_state.cc @@ -17,6 +17,8 @@ PURPOSE: (A really simple extension of relative derived state. #include "jeod/models/dynamics/dyn_manager/include/class_declarations.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** Constructor @@ -68,4 +70,6 @@ SimplePlanetRelState::update() jeod::RelativeDerivedState::update(); altitude = jeod::Vector3::vmag(rel_state.trans.position) - reference_radius; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/correlated_state_dispersion/include/correlated_state_dispersion.hh b/models/dynamics/state_initialize/correlated_state_dispersion/include/correlated_state_dispersion.hh index 0af84055..956988d2 100644 --- a/models/dynamics/state_initialize/correlated_state_dispersion/include/correlated_state_dispersion.hh +++ b/models/dynamics/state_initialize/correlated_state_dispersion/include/correlated_state_dispersion.hh @@ -47,6 +47,7 @@ namespace jeod { class RefFrameState; } +namespace cml { class CorrelatedStateDispersion { public: @@ -333,4 +334,8 @@ class CorrelatedStateDispersion { void transform_TR_param( const double position[3], const double velocity[3]); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_initialize/correlated_state_dispersion/src/correlated_state_dispersion.cc b/models/dynamics/state_initialize/correlated_state_dispersion/src/correlated_state_dispersion.cc index 0faea3c9..bc9f1fbc 100644 --- a/models/dynamics/state_initialize/correlated_state_dispersion/src/correlated_state_dispersion.cc +++ b/models/dynamics/state_initialize/correlated_state_dispersion/src/correlated_state_dispersion.cc @@ -24,6 +24,8 @@ LIBRARY DEPENDENCIES: #include "../include/correlated_state_dispersion.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -788,4 +790,6 @@ CorrelatedStateDispersion::transform_TR_param( pos_error[ii] = R_PCI[ii] - position[ii]; vel_error[ii] = V_wrt_PCI_PCI[ii] - velocity[ii]; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/correlated_state_dispersion/verif/SIM_cholesky_unit_test/include/test_class.hh b/models/dynamics/state_initialize/correlated_state_dispersion/verif/SIM_cholesky_unit_test/include/test_class.hh index 996498c2..f0feee52 100644 --- a/models/dynamics/state_initialize/correlated_state_dispersion/verif/SIM_cholesky_unit_test/include/test_class.hh +++ b/models/dynamics/state_initialize/correlated_state_dispersion/verif/SIM_cholesky_unit_test/include/test_class.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #include "../../../include/correlated_state_dispersion.hh" #include "cml/models/utilities/math_utils/include/math_utils.hh" +namespace cml { + class TestCorrelatedStateDispersion : public CorrelatedStateDispersion { public: double reconstruct[9][9]; @@ -70,4 +72,8 @@ class TestCorrelatedStateDispersion : public CorrelatedStateDispersion { TestCorrelatedStateDispersion (const TestCorrelatedStateDispersion&); TestCorrelatedStateDispersion & operator = (const TestCorrelatedStateDispersion&); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_initialize/state_initialize/include/monte_carlo_state_dispersion.hh b/models/dynamics/state_initialize/state_initialize/include/monte_carlo_state_dispersion.hh index 45b40a66..32198a52 100644 --- a/models/dynamics/state_initialize/state_initialize/include/monte_carlo_state_dispersion.hh +++ b/models/dynamics/state_initialize/state_initialize/include/monte_carlo_state_dispersion.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "jeod/models/dynamics/body_action/include/dyn_body_init_trans_state.hh" +namespace cml { + class MonteCarloStateDispersion { protected: // external reference jeod::DynBodyInitTransState & trans_init; /* (--) reference to StateInitialize's @@ -57,4 +59,8 @@ class MonteCarloStateDispersion { void disperse_trans_state(); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_initialize/state_initialize/include/state_initialize.hh b/models/dynamics/state_initialize/state_initialize/include/state_initialize.hh index 7a2775cd..20b712a4 100644 --- a/models/dynamics/state_initialize/state_initialize/include/state_initialize.hh +++ b/models/dynamics/state_initialize/state_initialize/include/state_initialize.hh @@ -36,6 +36,8 @@ PROGRAMMERS: #include "jeod/models/utils/planet_fixed/planet_fixed_posn/include/alt_lat_long_state.hh" #include "monte_carlo_state_dispersion.hh" +namespace cml { + class StateInitialize : public jeod::DynBodyInit { public: @@ -327,4 +329,8 @@ class StateInitialize : public jeod::DynBodyInit void generate_rot_init_values(jeod::DynManager & dyn_manager); void apply_internal(jeod::DynManager & dyn_manager); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_initialize/state_initialize/include/state_initialize_with_propagation.hh b/models/dynamics/state_initialize/state_initialize/include/state_initialize_with_propagation.hh index 31c9e6e8..18e2eac2 100644 --- a/models/dynamics/state_initialize/state_initialize/include/state_initialize_with_propagation.hh +++ b/models/dynamics/state_initialize/state_initialize/include/state_initialize_with_propagation.hh @@ -48,6 +48,8 @@ PROGRAMMERS: #include "state_initialize.hh" +namespace cml { + class StateInitializeWithPropagation : public StateInitialize { protected: @@ -90,4 +92,8 @@ class StateInitializeWithPropagation : public StateInitialize void rk4_integration(); void compute_planet_orientation (double time); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_initialize/state_initialize/src/monte_carlo_state_dispersion.cc b/models/dynamics/state_initialize/state_initialize/src/monte_carlo_state_dispersion.cc index d75d62ec..317eda22 100644 --- a/models/dynamics/state_initialize/state_initialize/src/monte_carlo_state_dispersion.cc +++ b/models/dynamics/state_initialize/state_initialize/src/monte_carlo_state_dispersion.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "../include/monte_carlo_state_dispersion.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -76,4 +78,6 @@ MonteCarloStateDispersion::disperse_trans_state() trans_init.position); jeod::Vector3::incr( velocity_dispersion_inertial, trans_init.velocity); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/state_initialize/src/state_initialize.cc b/models/dynamics/state_initialize/state_initialize/src/state_initialize.cc index 6eda96a6..434144bb 100644 --- a/models/dynamics/state_initialize/state_initialize/src/state_initialize.cc +++ b/models/dynamics/state_initialize/state_initialize/src/state_initialize.cc @@ -45,6 +45,8 @@ LIBRARY DEPENDENCIES: #include "../include/state_initialize.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -1626,4 +1628,6 @@ StateInitialize::verify_compatibility() const "Attitude: ", attitude_input_data_type, " \n" "Att-Rate: ", att_rate_input_data_type, " \n"); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/state_initialize/src/state_initialize_with_propagation.cc b/models/dynamics/state_initialize/state_initialize/src/state_initialize_with_propagation.cc index b7848184..eb38f7cb 100644 --- a/models/dynamics/state_initialize/state_initialize/src/state_initialize_with_propagation.cc +++ b/models/dynamics/state_initialize/state_initialize/src/state_initialize_with_propagation.cc @@ -53,6 +53,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "jeod/models/utils/math/include/matrix3x3.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** constructor *****************************************************************************/ @@ -317,4 +319,6 @@ StateInitializeWithPropagation::compute_planet_orientation( jeod::Matrix3x3::product( T_initial_to_current, T_inrtl_to_initial_pfix, planet->pfix.state.rot.T_parent_this); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/target_relative_parameters/include/TR_parameter_ref_frame.hh b/models/dynamics/state_initialize/target_relative_parameters/include/TR_parameter_ref_frame.hh index 7a734fe6..635a48be 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/include/TR_parameter_ref_frame.hh +++ b/models/dynamics/state_initialize/target_relative_parameters/include/TR_parameter_ref_frame.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include +namespace cml { + /***************************************************************************** TR_Parameter_RefFrame Purpose:A class that specifies the 3 basis vectors of a frame defined by 2 @@ -51,4 +53,8 @@ class TR_Parameter_RefFrame { bool compute_frame( const double vec_A[3], const double vec_B[3]); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_param.hh b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_param.hh index 9226714f..7784c38c 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_param.hh +++ b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_param.hh @@ -23,6 +23,8 @@ PROGRAMMERS: #include "TR_parameter_ref_frame.hh" #include "TR_state_parameter_set.hh" +namespace cml { + /***************************************************************************** TargetRelative_StateParam @@ -158,4 +160,8 @@ class TargetRelative_StateParam : public TR_ParameterSet bool compute_biased_target(); }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameter_set.hh b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameter_set.hh index d7cffd05..60bf3a6d 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameter_set.hh +++ b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameter_set.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #ifndef CML_TR_STATE_PARAMETER_SET_HH #define CML_TR_STATE_PARAMETER_SET_HH +namespace cml { + /***************************************************************************** TR_ParameterSet Purpose:A POD class providing the 7 target-relative parameters. @@ -33,4 +35,8 @@ class TR_ParameterSet { } }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters.hh b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters.hh index efa68c96..45547487 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters.hh +++ b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters.hh @@ -29,6 +29,8 @@ NOTES: #include "TR_state_param.hh" +namespace cml { + /***************************************************************************** TargetRelative_StateParameter Purpose: @@ -109,4 +111,8 @@ class TargetRelative_StateParameter : public TargetRelative_StateParam void initialize_internal(const double R_Ref_PCPF[3]); double compute_position_magnitude(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters_alt.hh b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters_alt.hh index eb9cdf35..3e80e5ba 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters_alt.hh +++ b/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameters_alt.hh @@ -26,6 +26,8 @@ NOTES: #include "TR_state_param.hh" #include "cml/models/dynamics/state_initialize/target_relative_parameters/include/TR_state_parameter_set.hh" + +namespace cml { /***************************************************************************** TargetRelative_StateParameter_Alt Purpose: @@ -77,4 +79,8 @@ class TargetRelative_StateParameter_Alt : public TargetRelative_StateParam double (&R)[3]); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_initialize/target_relative_parameters/src/TR_parameter_ref_frame.cc b/models/dynamics/state_initialize/target_relative_parameters/src/TR_parameter_ref_frame.cc index 11a958f7..56c8c0e2 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/src/TR_parameter_ref_frame.cc +++ b/models/dynamics/state_initialize/target_relative_parameters/src/TR_parameter_ref_frame.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -81,4 +83,6 @@ bool TR_Parameter_RefFrame::compute_frame( p_hat); jeod::Vector3::normalize( p_hat); return true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_param.cc b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_param.cc index bed6076e..fa5457ed 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_param.cc +++ b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_param.cc @@ -23,6 +23,8 @@ LIBRARY DEPENDENCIES: #include "../include/TR_state_param.hh" #include "../include/TR_state_parameter_set.hh" +namespace cml { + /***************************************************************************** Constructor @@ -690,4 +692,6 @@ TargetRelative_StateParam::compute_biased_target() return false; } return true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters.cc b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters.cc index 1fc52bb8..6a571c15 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters.cc +++ b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/TR_state_parameter_set.hh" #include "../include/TR_state_parameters.hh" +namespace cml { + /***************************************************************************** initialize Purpose:(Initialize uhat_Ref_PCPF given a reference geodetic altitude, @@ -373,4 +375,6 @@ TargetRelative_StateParameter::compute_position_magnitude() // Return position magnitude that gives desired geodetic altitude //----------------------------------------------------- return Rmag; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters_alt.cc b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters_alt.cc index 64556128..0a087d4e 100644 --- a/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters_alt.cc +++ b/models/dynamics/state_initialize/target_relative_parameters/src/TR_state_parameters_alt.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/TR_state_param.hh" #include "../include/TR_state_parameter_set.hh" +namespace cml { + /***************************************************************************** initialize Purpose:(Initialize uhat_Ref given a position reference vector. @@ -150,4 +152,6 @@ TargetRelative_StateParameter_Alt::compute_position_from_params( altitude + target_r_mag, position); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_overrides/contact/include/contact_state_override.hh b/models/dynamics/state_overrides/contact/include/contact_state_override.hh index 8fed9990..64c743c6 100644 --- a/models/dynamics/state_overrides/contact/include/contact_state_override.hh +++ b/models/dynamics/state_overrides/contact/include/contact_state_override.hh @@ -45,6 +45,8 @@ PROGRAMMERS: #include "jeod/models/utils/quaternion/include/quat.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + class ContactStateOverride : public SubscriptionBase { protected: @@ -125,4 +127,8 @@ class ContactStateOverride : public SubscriptionBase const jeod::Quaternion & Q_override_struc_to_integ_frame); void activate() override; }; + + +} // namespace cml + #endif diff --git a/models/dynamics/state_overrides/contact/src/contact_state_override.cc b/models/dynamics/state_overrides/contact/src/contact_state_override.cc index 46fc990f..c1c7b155 100644 --- a/models/dynamics/state_overrides/contact/src/contact_state_override.cc +++ b/models/dynamics/state_overrides/contact/src/contact_state_override.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/contact_state_override.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -483,4 +485,6 @@ ContactStateOverride::set_deactivation_threshold( double threshold) else { deactivation_threshold = threshold; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_overrides/twist_sway/include/twist_sway.hh b/models/dynamics/state_overrides/twist_sway/include/twist_sway.hh index fe17d76f..c3573034 100644 --- a/models/dynamics/state_overrides/twist_sway/include/twist_sway.hh +++ b/models/dynamics/state_overrides/twist_sway/include/twist_sway.hh @@ -50,6 +50,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** TwistSwayParams @@ -258,4 +260,8 @@ public: void compute_twist_sway_enu(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_overrides/twist_sway/src/twist_sway.cc b/models/dynamics/state_overrides/twist_sway/src/twist_sway.cc index 3ef3dd9e..493037f6 100644 --- a/models/dynamics/state_overrides/twist_sway/src/twist_sway.cc +++ b/models/dynamics/state_overrides/twist_sway/src/twist_sway.cc @@ -28,6 +28,8 @@ Library dependencies: #include "../include/twist_sway.hh" +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -608,4 +610,6 @@ TwistSway::deactivate() fast_list.clear(); slow_list.clear(); SubscriptionBase::deactivate(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_predictors/apsides_predictor/include/apsides_predictor.hh b/models/dynamics/state_predictors/apsides_predictor/include/apsides_predictor.hh index e2d07743..a9af5430 100644 --- a/models/dynamics/state_predictors/apsides_predictor/include/apsides_predictor.hh +++ b/models/dynamics/state_predictors/apsides_predictor/include/apsides_predictor.hh @@ -25,6 +25,8 @@ class RefFrameTrans; class Planet; } +namespace cml { + class ApsidesPredictor : public SubscriptionBase { public: @@ -70,4 +72,8 @@ class ApsidesPredictor : public SubscriptionBase { void compute_next_apsis(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/dynamics/state_predictors/apsides_predictor/src/apsides_predictor.cc b/models/dynamics/state_predictors/apsides_predictor/src/apsides_predictor.cc index d04b4906..bb1b9a14 100644 --- a/models/dynamics/state_predictors/apsides_predictor/src/apsides_predictor.cc +++ b/models/dynamics/state_predictors/apsides_predictor/src/apsides_predictor.cc @@ -15,6 +15,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/apsides_predictor.hh" +namespace cml { + /***************************************************************************** Constructor @@ -224,4 +226,6 @@ ApsidesPredictor::activate() { active = true; update(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/dynamics/state_predictors/impact_point/include/impact_point.hh b/models/dynamics/state_predictors/impact_point/include/impact_point.hh index 9d43559b..9f36a8da 100644 --- a/models/dynamics/state_predictors/impact_point/include/impact_point.hh +++ b/models/dynamics/state_predictors/impact_point/include/impact_point.hh @@ -35,6 +35,8 @@ class Planet; class RefFrameTrans; } +namespace cml { + class ImpactPoint : public jeod::PlanetFixedPosition, public SubscriptionBase { @@ -101,4 +103,8 @@ class ImpactPoint : public jeod::PlanetFixedPosition, void activate() override; }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/dynamics/state_predictors/impact_point/src/impact_point.cc b/models/dynamics/state_predictors/impact_point/src/impact_point.cc index 42c4a929..cb3d932a 100644 --- a/models/dynamics/state_predictors/impact_point/src/impact_point.cc +++ b/models/dynamics/state_predictors/impact_point/src/impact_point.cc @@ -26,6 +26,8 @@ LIBRARY DEPENDENCIES: #include "../include/impact_point.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -347,4 +349,6 @@ ImpactPoint::activate() { active = true; update(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/EGM2008/include/egm_2008.hh b/models/environment/EGM2008/include/egm_2008.hh index b3b87bbe..93c04223 100644 --- a/models/environment/EGM2008/include/egm_2008.hh +++ b/models/environment/EGM2008/include/egm_2008.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "cml/models/utilities/table_interp_cpp/include/table_independent_variable.hh" #include "cml/models/utilities/table_interp_cpp/include/table_lookup_set.hh" +namespace cml { + // JEOD Dependencies @@ -58,4 +60,8 @@ class EGM2008_WGS84 : public SubscriptionBase EGM2008_WGS84 (const EGM2008_WGS84&); EGM2008_WGS84& operator= (const EGM2008_WGS84&); }; + + +} // namespace cml + #endif diff --git a/models/environment/EGM2008/src/egm_2008.cc b/models/environment/EGM2008/src/egm_2008.cc index 3d488420..d4ee09a3 100644 --- a/models/environment/EGM2008/src/egm_2008.cc +++ b/models/environment/EGM2008/src/egm_2008.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -70,4 +72,6 @@ EGM2008_WGS84::update() } table_set.update(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/EGM2008/src/egm_2008_data.cc b/models/environment/EGM2008/src/egm_2008_data.cc index 3037be21..ddf4d414 100644 --- a/models/environment/EGM2008/src/egm_2008_data.cc +++ b/models/environment/EGM2008/src/egm_2008_data.cc @@ -13,6 +13,8 @@ #include #include +namespace cml { + /***************************************************************************** load_data() *****************************************************************************/ @@ -410,3 +412,6 @@ EGM2008_WGS84::load_data() table_set.add_independent_variable( tiv_lon); table_set.associate_table_and_independent(); } + + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec.hh index 63d6bda9..a6b8944b 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec.hh @@ -47,6 +47,9 @@ namespace jeod { class DynBody; class TimeStandard; } + +namespace cml { + class ExtendedPlanetaryDerivedState; class LookupAtmosWinds; class STD1976; @@ -135,4 +138,8 @@ class AtmosphereExec : public AtmosphereExecInterface { void add_gust(); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_atmos_base.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_atmos_base.hh index bb6abf01..cc1eb7b4 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_atmos_base.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_atmos_base.hh @@ -18,6 +18,8 @@ PROGRAMMERS: #include "cml/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /******************************************************************************* AtmosphereExec_AtmosBase Purpose:(Base class containing members and methods common to all atmosphere @@ -109,4 +111,8 @@ class AtmosphereExec_AtmosWindsBase : public AtmosphereExec_AtmosBase out.wind_velocity_tc); } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_drwp.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_drwp.hh index d6df22fa..d6cdd07a 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_drwp.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_drwp.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "atmosphere_exec_atmos_base.hh" +namespace cml { + class AtmosExecOutput; class ExtendedPlanetaryDerivedState; class LookupAtmosWinds; @@ -51,4 +53,8 @@ class AtmosphereExec_Drwp : public AtmosphereExec_AtmosWindsBase protected: bool initialize(); }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_gram.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_gram.hh index f8ddc871..ac30946c 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_gram.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_gram.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "atmosphere_exec_atmos_base.hh" +namespace cml { + class AtmosExecOutput; class ExtendedPlanetaryDerivedState; @@ -225,4 +227,8 @@ class AtmosphereExec_Gram : public AtmosphereExec_AtmosWindsBase bool initialize(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_interface.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_interface.hh index 5668de68..3c28bd3b 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_interface.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_interface.hh @@ -26,6 +26,8 @@ PROGRAMMERS: #include "atmosphere_exec_atmos_base.hh" #include +namespace cml { + /***************************************************************************** AtmosphereExecInterface @@ -80,4 +82,8 @@ class AtmosphereExecInterface : public SubscriptionBase void deactivate() override; }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_out.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_out.hh index 5afc667e..defc83de 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_out.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_out.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #ifndef CML_ATMOSPHERE_EXEC_OUT_HH #define CML_ATMOSPHERE_EXEC_OUT_HH +namespace cml { + class AtmosExecOutput { public: double temperature{0.0}; /* (K) Temperature */ @@ -42,4 +44,8 @@ class AtmosExecOutput { } }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_simple_winds.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_simple_winds.hh index 9787d0d0..cc7e8bb6 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_simple_winds.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_simple_winds.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "atmosphere_exec_atmos_base.hh" #include "cml/models/environment/atmos/atmosphere_models/simple_lookup_wind/include/simple_lookup_wind.hh" +namespace cml { + class AtmosExecOutput; class ExtendedPlanetaryDerivedState; @@ -69,4 +71,8 @@ class AtmosphereExec_SimpleLookupWind : public AtmosphereExec_AtmosWindsBase void set_altitude_type(TopoType type); }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmos_exec/include/atmosphere_exec_std.hh b/models/environment/atmos/atmos_exec/include/atmosphere_exec_std.hh index 945f9714..b8476618 100644 --- a/models/environment/atmos/atmos_exec/include/atmosphere_exec_std.hh +++ b/models/environment/atmos/atmos_exec/include/atmosphere_exec_std.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "atmosphere_exec_atmos_base.hh" +namespace cml { + class AtmosExecOutput; class STD1976; @@ -44,4 +46,8 @@ class AtmosphereExec_STD : public AtmosphereExec_AtmosBase bool initialize_atmos() override {return true;} void update_atmos() override; }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec.cc index c59d788c..91514650 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec.cc @@ -55,6 +55,8 @@ LIBRARY DEPENDENCIES: #include "../include/atmosphere_exec_gram.hh" #include "../include/atmosphere_exec_interface.hh" +namespace cml { + /******************************************************************************* Method: @@ -423,3 +425,6 @@ AtmosphereExec::add_gust() out.wind_velocity_tc); out.wind_vmag = jeod::Vector3::vmag( out.wind_velocity_td ); } + + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec_drwp.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec_drwp.cc index fafcad48..c43b5002 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec_drwp.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec_drwp.cc @@ -19,6 +19,8 @@ #include "../include/atmosphere_exec_drwp.hh" #include "../include/atmosphere_exec_out.hh" +namespace cml { + /***************************************************************************** Purpose:(Construct the class) @@ -120,4 +122,6 @@ AtmosphereExec_Drwp::update_winds() out.wind_velocity_tc[2] = DRWP_atmos.wind_velocity_tc[2]; winds_from_topocentric(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec_gram.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec_gram.cc index 984c2a02..2d9193c2 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec_gram.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec_gram.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include "../include/atmosphere_exec_gram.hh" #include "../include/atmosphere_exec_out.hh" +namespace cml { + // TODO: move these GramInterface lines to their own file? GramInterface::GramInterface() : @@ -302,3 +304,6 @@ AtmosphereExec_Gram::update_winds() winds_from_topocentric(); } + + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec_interface.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec_interface.cc index d5f0cd8d..496802c3 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec_interface.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec_interface.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include "../include/atmosphere_exec_interface.hh" +namespace cml { + /***************************************************************************** Constructor @@ -137,4 +139,6 @@ AtmosphereExecInterface::initialize() current_winds = &atmos_none; } SubscriptionBase::initialize(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec_simple_winds.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec_simple_winds.cc index 16f94724..718a4804 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec_simple_winds.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec_simple_winds.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/atmosphere_exec_out.hh" #include "../include/atmosphere_exec_simple_winds.hh" +namespace cml { + /***************************************************************************** Constructor @@ -150,4 +152,6 @@ AtmosphereExec_SimpleLookupWind::set_altitude_type( planet_state.update(); } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmos_exec/src/atmosphere_exec_std.cc b/models/environment/atmos/atmos_exec/src/atmosphere_exec_std.cc index 67dfd6eb..bc6fdfed 100644 --- a/models/environment/atmos/atmos_exec/src/atmosphere_exec_std.cc +++ b/models/environment/atmos/atmos_exec/src/atmosphere_exec_std.cc @@ -17,6 +17,8 @@ #include "../include/atmosphere_exec_out.hh" #include "cml/models/environment/atmos/atmosphere_models/std_atmos_1976/include/std_atmos_1976.hh" +namespace cml { + /***************************************************************************** Purpose:(Construct the class) @@ -48,4 +50,6 @@ AtmosphereExec_STD::update_atmos() out.speed_of_sound = std76.speed_of_sound; out.dynamic_viscosity = std76.dynamic_viscosity; out.mean_free_path = std76.mean_free_path; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmosphere_models/DRWP_atmos/include/lookup_winds.hh b/models/environment/atmos/atmosphere_models/DRWP_atmos/include/lookup_winds.hh index 3f6ceba7..bd074d7a 100644 --- a/models/environment/atmos/atmosphere_models/DRWP_atmos/include/lookup_winds.hh +++ b/models/environment/atmos/atmosphere_models/DRWP_atmos/include/lookup_winds.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** DRWPTableLookup @@ -220,4 +222,8 @@ protected: void calculate_wind_mag_dir(); void stream_error(int line, const std::string& drwpFileName_); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/atmosphere_models/DRWP_atmos/src/lookup_winds.cc b/models/environment/atmos/atmosphere_models/DRWP_atmos/src/lookup_winds.cc index 177e8cd2..86b2c716 100644 --- a/models/environment/atmos/atmosphere_models/DRWP_atmos/src/lookup_winds.cc +++ b/models/environment/atmos/atmosphere_models/DRWP_atmos/src/lookup_winds.cc @@ -28,6 +28,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** verify Purpose: @@ -845,4 +847,6 @@ void LookupAtmosWinds::test_for_reinitialize() "is invalid. This method is obsolete and has been deprecated.\n" "Check intent on why this method was called, and review documentation for " "alternative approach.\n"); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmosphere_models/simple_lookup_wind/include/simple_lookup_wind.hh b/models/environment/atmos/atmosphere_models/simple_lookup_wind/include/simple_lookup_wind.hh index 6bdf1ef2..b6be0096 100644 --- a/models/environment/atmos/atmosphere_models/simple_lookup_wind/include/simple_lookup_wind.hh +++ b/models/environment/atmos/atmosphere_models/simple_lookup_wind/include/simple_lookup_wind.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include +namespace cml { + // NOTES - the table-lookup capabilities assume that the driving independent // variable is altitude; // - the general application of this model has the wind-model being @@ -108,4 +110,8 @@ class SimpleLookupWind : public SubscriptionBase void assign_dir_mag_vert_data( const double * data_array, size_t num_elem_per_variable); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/atmosphere_models/simple_lookup_wind/src/simple_lookup_wind.cc b/models/environment/atmos/atmosphere_models/simple_lookup_wind/src/simple_lookup_wind.cc index e9c395d1..1ff52300 100644 --- a/models/environment/atmos/atmosphere_models/simple_lookup_wind/src/simple_lookup_wind.cc +++ b/models/environment/atmos/atmosphere_models/simple_lookup_wind/src/simple_lookup_wind.cc @@ -17,6 +17,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include "jeod/models/utils/math/include/vector3.hh" #include "../include/simple_lookup_wind.hh" + +namespace cml { /***************************************************************************** Constructor *****************************************************************************/ @@ -206,4 +208,6 @@ SimpleLookupWind::assign_dir_mag_vert_data( wind_vertical_up_table.load_data( data_array+3*num_elem_per_variable, dim_list); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/atmosphere_models/std_atmos_1976/include/std_atmos_1976.hh b/models/environment/atmos/atmosphere_models/std_atmos_1976/include/std_atmos_1976.hh index a7864b2a..74b91d79 100644 --- a/models/environment/atmos/atmosphere_models/std_atmos_1976/include/std_atmos_1976.hh +++ b/models/environment/atmos/atmosphere_models/std_atmos_1976/include/std_atmos_1976.hh @@ -33,6 +33,8 @@ PROGRAMMERS: #define CML_STD_ATMOS_1976_HH #include + +namespace cml { /** The main class to implement the computation of standard atmosphere model 1976 */ class STD1976 { @@ -106,4 +108,8 @@ private: } ; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976.cc b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976.cc index 0ba32cf5..02ba3496 100644 --- a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976.cc +++ b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976.cc @@ -43,6 +43,7 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/std_atmos_1976.hh" #include "std_atmos_formula.h" +namespace cml { STD1976::STD1976() { @@ -169,4 +170,6 @@ void STD1976::update(const double &altitude_in //the given geometric height //to calculate mean free path (m) mean_free_path = cal_mfp(kinetic_temperature, pressure); -} \ No newline at end of file +} + +} // namespace cml \ No newline at end of file diff --git a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976_dd.cc b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976_dd.cc index 493a191d..63fd414d 100644 --- a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976_dd.cc +++ b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_1976_dd.cc @@ -30,6 +30,8 @@ LIBRARY DEPENDENCIES: #include "../include/std_atmos_1976.hh" #include "std_atmos_formula.h" +namespace cml { + const double STD1976::min_valid_alt = -5000.0; const double STD1976::max_valid_alt = 1000000.0; @@ -117,3 +119,6 @@ size_t STD1976::get_alt_tbl_len() return alt_tbl_len; } + + +} // namespace cml diff --git a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_formula.h b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_formula.h index 11c4efc5..fdd6486b 100644 --- a/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_formula.h +++ b/models/environment/atmos/atmosphere_models/std_atmos_1976/src/std_atmos_formula.h @@ -20,6 +20,8 @@ #include #include "../include/std_atmos_1976.hh" +namespace cml { + //to calculate the mass density static inline double cal_density(const double &press, //pressure, unit:N/m2 const double &k_t, //kinetic temperature, unit: K @@ -102,6 +104,7 @@ static inline double log_interp(const double x_vals[], //the data set of x-axis return std::exp(log_y); } - -#endif +} // namespace + +#endif \ No newline at end of file diff --git a/models/environment/atmos/first_order_hold/include/first_order_hold.hh b/models/environment/atmos/first_order_hold/include/first_order_hold.hh index badf412f..abb41b35 100644 --- a/models/environment/atmos/first_order_hold/include/first_order_hold.hh +++ b/models/environment/atmos/first_order_hold/include/first_order_hold.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "cml/models/environment/atmos/atmos_exec/include/atmosphere_exec_out.hh" #include "cml/models/dynamics/state_descriptors/extended_planetary_derived_state/include/extended_planetary_derived_state.hh" +namespace cml { + class FirstOrderHold { public: bool FO_hold{false}; /* (--) First order holding will be performed */ @@ -51,4 +53,8 @@ class FirstOrderHold { reference to vehicle's planet-state.*/ AtmosExecOutput & out; /* (--) reference to atmos-exec output struct */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/first_order_hold/src/first_order_hold.cc b/models/environment/atmos/first_order_hold/src/first_order_hold.cc index dbb8d999..2f759aed 100644 --- a/models/environment/atmos/first_order_hold/src/first_order_hold.cc +++ b/models/environment/atmos/first_order_hold/src/first_order_hold.cc @@ -20,6 +20,8 @@ #include "../include/first_order_hold.hh" +namespace cml { + /******************************************************************************* Method: @@ -182,4 +184,6 @@ FirstOrderHold::update() } else { out.wind_angle_blowing_from = out.wind_angle_blowing_to + M_PI; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/gust/include/gust.hh b/models/environment/atmos/gust/include/gust.hh index 17cf7d87..6af9b81b 100644 --- a/models/environment/atmos/gust/include/gust.hh +++ b/models/environment/atmos/gust/include/gust.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #ifndef CML_GUST_HH #define CML_GUST_HH +namespace cml { + class GustModel @@ -65,4 +67,8 @@ class GustModel void deactivate(); bool is_active() const {return active;} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/gust/src/gust.cc b/models/environment/atmos/gust/src/gust.cc index 98178dd3..4383a5cc 100644 --- a/models/environment/atmos/gust/src/gust.cc +++ b/models/environment/atmos/gust/src/gust.cc @@ -20,6 +20,8 @@ LIBRARY DEPENDENCIES: #include "../include/gust.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -117,4 +119,6 @@ GustModel::deactivate() magnitude = 0.0; MathUtils::zero_vector(gust_vector); //jeod::Vector3::initialize(gust_vector); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_payload_data.hh b/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_payload_data.hh index c6ed77ae..53b87bf4 100644 --- a/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_payload_data.hh +++ b/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_payload_data.hh @@ -8,6 +8,8 @@ Purpose: #ifndef CML_LAGGED_ATMOS_PAYLOAD_DATA_HH #define CML_LAGGED_ATMOS_PAYLOAD_DATA_HH +namespace cml { + class LaggedAtmosPayloadData { public: @@ -39,4 +41,8 @@ class LaggedAtmosPayloadData { // copy assignment operator LaggedAtmosPayloadData& operator=(const LaggedAtmosPayloadData& orig) = default; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_wind.hh b/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_wind.hh index 49f92288..a2702da7 100644 --- a/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_wind.hh +++ b/models/environment/atmos/lagged_atmosphere/include/lagged_atmos_wind.hh @@ -21,6 +21,8 @@ Author: #include "lagged_atmos_payload_data.hh" +namespace cml { + // The atmosphere of the payload is saved as a function of altitude, and is // then interpolated using the parachute's altitude. This causes the // parachute to fly through the same atmosphere profile as the payload, but @@ -78,4 +80,8 @@ class LaggedAtmosWind { altitude.*/ }; + + +} // namespace cml + #endif diff --git a/models/environment/atmos/lagged_atmosphere/src/lagged_atmos_wind.cc b/models/environment/atmos/lagged_atmosphere/src/lagged_atmos_wind.cc index 71a0b714..7df1304c 100644 --- a/models/environment/atmos/lagged_atmosphere/src/lagged_atmos_wind.cc +++ b/models/environment/atmos/lagged_atmosphere/src/lagged_atmos_wind.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include #include #include + +namespace cml { /***************************************************************************** Constructors *****************************************************************************/ @@ -254,3 +256,6 @@ LaggedAtmosWind::set_max_delta_altitude( double max_new) max_delta_altitude = max_new; } } + + +} // namespace cml diff --git a/models/environment/eclipse_calculator/include/eclipse_calculator.hh b/models/environment/eclipse_calculator/include/eclipse_calculator.hh index 50dc91b3..f8c1c78b 100644 --- a/models/environment/eclipse_calculator/include/eclipse_calculator.hh +++ b/models/environment/eclipse_calculator/include/eclipse_calculator.hh @@ -25,6 +25,8 @@ class DynManager; class RefFrame; } +namespace cml { + class EclipseCalculator : public SubscriptionBase { protected: @@ -67,4 +69,8 @@ class EclipseCalculator : public SubscriptionBase void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/eclipse_calculator/src/eclipse_calculator.cc b/models/environment/eclipse_calculator/src/eclipse_calculator.cc index 560c0a36..d23b513c 100644 --- a/models/environment/eclipse_calculator/src/eclipse_calculator.cc +++ b/models/environment/eclipse_calculator/src/eclipse_calculator.cc @@ -16,6 +16,8 @@ LIBRARY DEPENDENCIES: #include "jeod/models/utils/math/include/vector3.hh" #include "jeod/models/utils/ref_frames/include/ref_frame.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -127,4 +129,6 @@ EclipseCalculator::deactivate() sun.inertial_frame_ptr->unsubscribe(); earth.local_frame_ptr->unsubscribe(); moon.local_frame_ptr->unsubscribe(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/ephemerides/planet_planet_state/include/planet_planet_state.hh b/models/environment/ephemerides/planet_planet_state/include/planet_planet_state.hh index 4edf865e..a60cdc4b 100644 --- a/models/environment/ephemerides/planet_planet_state/include/planet_planet_state.hh +++ b/models/environment/ephemerides/planet_planet_state/include/planet_planet_state.hh @@ -33,6 +33,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include +namespace cml { + class PlanetPlanetState : public SubscriptionBase { @@ -68,4 +70,8 @@ class PlanetPlanetState : public SubscriptionBase void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif diff --git a/models/environment/ephemerides/planet_planet_state/src/planet_planet_state.cc b/models/environment/ephemerides/planet_planet_state/src/planet_planet_state.cc index 9230dc53..6fffa492 100644 --- a/models/environment/ephemerides/planet_planet_state/src/planet_planet_state.cc +++ b/models/environment/ephemerides/planet_planet_state/src/planet_planet_state.cc @@ -28,6 +28,8 @@ LIBRARY DEPENDENCIES: #include "../include/planet_planet_state.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -159,3 +161,6 @@ PlanetPlanetState::deactivate() to_frame->unsubscribe(); SubscriptionBase::deactivate(); } + + +} // namespace cml diff --git a/models/environment/gravity/fast_gravity/include/spherical_harmonics_fast_gravity_controls.hh b/models/environment/gravity/fast_gravity/include/spherical_harmonics_fast_gravity_controls.hh index 2bf922b3..7391d2e1 100644 --- a/models/environment/gravity/fast_gravity/include/spherical_harmonics_fast_gravity_controls.hh +++ b/models/environment/gravity/fast_gravity/include/spherical_harmonics_fast_gravity_controls.hh @@ -22,6 +22,8 @@ Programmers: #include "jeod/models/environment/gravity/include/gravity_integ_frame.hh" #include "jeod/models/environment/gravity/include/spherical_harmonics_gravity_controls.hh" +namespace cml { + class SphericalHarmonicsFastGravityControls : public jeod::SphericalHarmonicsGravityControls { // Member data @@ -97,4 +99,8 @@ class SphericalHarmonicsFastGravityControls : public jeod::SphericalHarmonicsGra } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/environment/gravity/fast_gravity/src/spherical_harmonics_fast_gravity_controls.cc b/models/environment/gravity/fast_gravity/src/spherical_harmonics_fast_gravity_controls.cc index fda61b89..cc4e3a35 100644 --- a/models/environment/gravity/fast_gravity/src/spherical_harmonics_fast_gravity_controls.cc +++ b/models/environment/gravity/fast_gravity/src/spherical_harmonics_fast_gravity_controls.cc @@ -28,6 +28,8 @@ LIBRARY DEPENDENCIES: #include "../include/spherical_harmonics_fast_gravity_controls.hh" +namespace cml { + /******************************************************************************* Function: SphericalHarmonicsFastGravityControls::initialize Purpose: (Sets the encessary parameters) @@ -245,4 +247,6 @@ SphericalHarmonicsFastGravityControls::calc_nonspherical(// Return: -- Void count_limit = std::floor(count_limit / ratio_compare); count_limit = std::max(count_limit, 1); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/gravity/gravity_fidelity_manager/include/gravity_fidelity_manager.hh b/models/environment/gravity/gravity_fidelity_manager/include/gravity_fidelity_manager.hh index 12d6eb2d..b404120e 100644 --- a/models/environment/gravity/gravity_fidelity_manager/include/gravity_fidelity_manager.hh +++ b/models/environment/gravity/gravity_fidelity_manager/include/gravity_fidelity_manager.hh @@ -21,6 +21,8 @@ class RefFrame; class SphericalHarmonicsGravityControls; } +namespace cml { + class GravityFidelityManager : public SubscriptionBase { protected: // External references @@ -68,4 +70,8 @@ class GravityFidelityManager : public SubscriptionBase void initialize() override; void update(); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/environment/gravity/gravity_fidelity_manager/src/gravity_fidelity_manager.cc b/models/environment/gravity/gravity_fidelity_manager/src/gravity_fidelity_manager.cc index f4461e61..df5758aa 100644 --- a/models/environment/gravity/gravity_fidelity_manager/src/gravity_fidelity_manager.cc +++ b/models/environment/gravity/gravity_fidelity_manager/src/gravity_fidelity_manager.cc @@ -17,6 +17,8 @@ PURPOSE: (Manages the desired fidelity of the gravity model for one #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -74,4 +76,6 @@ GravityFidelityManager::update() grav_controls.order = std::lround(degree_order); grav_controls.spherical = (grav_controls.degree == 0); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/environment/gravity/lunar_GRGM900C/data/include/GRGM900C_lunar_gravity.hh b/models/environment/gravity/lunar_GRGM900C/data/include/GRGM900C_lunar_gravity.hh index f9725b56..5592a7da 100644 --- a/models/environment/gravity/lunar_GRGM900C/data/include/GRGM900C_lunar_gravity.hh +++ b/models/environment/gravity/lunar_GRGM900C/data/include/GRGM900C_lunar_gravity.hh @@ -30,6 +30,8 @@ Programmers: #include "jeod/models/environment/gravity/include/spherical_harmonics_gravity_source.hh" +namespace cml { + class GRGM900C_LunarGravity { public: @@ -56,4 +58,8 @@ class GRGM900C_LunarGravity + + +} // namespace cml + #endif diff --git a/models/environment/gravity/lunar_GRGM900C/data/src/GRGM900C_lunar_gravity.cc b/models/environment/gravity/lunar_GRGM900C/data/src/GRGM900C_lunar_gravity.cc index f0fefa76..41cb3008 100644 --- a/models/environment/gravity/lunar_GRGM900C/data/src/GRGM900C_lunar_gravity.cc +++ b/models/environment/gravity/lunar_GRGM900C/data/src/GRGM900C_lunar_gravity.cc @@ -30,6 +30,8 @@ Assumptions and Limitations: #include "../include/GRGM900C_lunar_gravity.hh" +namespace cml { + // NOTE - allocated memory is assigned to the SphericalHarmonicsGravitySource // and is destroyed with the SphericalHarmonicsGravitySource. This @@ -821835,3 +821837,6 @@ GRGM900C_LunarGravity::populate_max_res_c() const memcpy (grav_source.Snm[900], temp_S_900, sizeof(temp_S_900)); } + + +} // namespace cml diff --git a/models/fhw/effectors/piston_thruster/include/piston_thruster.hh b/models/fhw/effectors/piston_thruster/include/piston_thruster.hh index 2179a74d..51ae82a0 100644 --- a/models/fhw/effectors/piston_thruster/include/piston_thruster.hh +++ b/models/fhw/effectors/piston_thruster/include/piston_thruster.hh @@ -26,6 +26,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /******************************************************************************* PistonThrusterOutputs @@ -126,4 +128,8 @@ protected: positions have been loaded. */ void deactivate() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/piston_thruster/include/piston_thruster_group.hh b/models/fhw/effectors/piston_thruster/include/piston_thruster_group.hh index 6e9fe423..2d8684c1 100644 --- a/models/fhw/effectors/piston_thruster/include/piston_thruster_group.hh +++ b/models/fhw/effectors/piston_thruster/include/piston_thruster_group.hh @@ -49,6 +49,8 @@ PROGRAMMERS: #include "piston_thruster.hh" +namespace cml { + /***************************************************************************** PistonThrusterGroupInputs Purpose:(Initialization of user-specified inputs for a group of piston @@ -140,4 +142,8 @@ protected: void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/piston_thruster/src/piston_thruster.cc b/models/fhw/effectors/piston_thruster/src/piston_thruster.cc index dcf80e3e..b93c2064 100644 --- a/models/fhw/effectors/piston_thruster/src/piston_thruster.cc +++ b/models/fhw/effectors/piston_thruster/src/piston_thruster.cc @@ -28,6 +28,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/piston_thruster.hh" +namespace cml { + /******************************************************************************* Constructors *******************************************************************************/ @@ -155,4 +157,6 @@ PistonThruster::deactivate() jeod::Vector3::initialize( sideB.out.force); jeod::Vector3::initialize( sideB.out.moment); active = false; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/piston_thruster/src/piston_thruster_group.cc b/models/fhw/effectors/piston_thruster/src/piston_thruster_group.cc index 1993df73..2793d1c5 100644 --- a/models/fhw/effectors/piston_thruster/src/piston_thruster_group.cc +++ b/models/fhw/effectors/piston_thruster/src/piston_thruster_group.cc @@ -31,6 +31,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/piston_thruster.hh" #include "../include/piston_thruster_group.hh" +namespace cml { + /******************************************************************************* Constructors *******************************************************************************/ @@ -234,4 +236,6 @@ PistonThrusterGroup::deactivate() piston_thruster->unsubscribe(); } active = false; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/piston_thruster/verif/include/sample_group.hh b/models/fhw/effectors/piston_thruster/verif/include/sample_group.hh index 08c9a7d5..890c27c2 100644 --- a/models/fhw/effectors/piston_thruster/verif/include/sample_group.hh +++ b/models/fhw/effectors/piston_thruster/verif/include/sample_group.hh @@ -12,6 +12,8 @@ #include "trick/constant.h" #include "../../include/piston_thruster_group.hh" +namespace cml { + class SamplePistonGroup : public PistonThrusterGroup { public: @@ -167,4 +169,8 @@ class SamplePistonGroup : public PistonThrusterGroup SamplePistonGroup & operator = (const SamplePistonGroup&); }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rcs_generic/include/Example_RcsAdvanced.hh b/models/fhw/effectors/rcs_generic/include/Example_RcsAdvanced.hh index dd32634b..4b1c1e1a 100644 --- a/models/fhw/effectors/rcs_generic/include/Example_RcsAdvanced.hh +++ b/models/fhw/effectors/rcs_generic/include/Example_RcsAdvanced.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include "rcs_group.hh" #include "rcs_jet.hh" +namespace cml { + class RcsAdvancedExample : public RcsGeneric { public: @@ -56,4 +58,8 @@ class RcsAdvancedExample : public RcsGeneric RcsAdvancedExample (const RcsAdvancedExample& rhs); RcsAdvancedExample & operator = (const RcsAdvancedExample& rhs);; }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rcs_generic/include/rcs_build_trail.hh b/models/fhw/effectors/rcs_generic/include/rcs_build_trail.hh index 2194c069..965d5df7 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_build_trail.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_build_trail.hh @@ -18,6 +18,8 @@ PROGRAMMERS: #include "rcs_scale_factor_interface.hh" +namespace cml { + /***************************************************************************** RcsBuildUpTrailOffJetData Purpose:(Jet-specific data for RcsBuildUpTrailOff) @@ -58,4 +60,8 @@ class RcsBuildUpTrailOff virtual ~RcsBuildUpTrailOff() = default; virtual void build_up_trail_off_effects(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rcs_generic/include/rcs_generic.hh b/models/fhw/effectors/rcs_generic/include/rcs_generic.hh index c44d8b01..5e4f6c24 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_generic.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_generic.hh @@ -31,6 +31,8 @@ PROGRAMMERS: #include #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + // Forward declaration class RcsPropPod; class RcsJetGroup; @@ -151,4 +153,8 @@ class RcsGeneric : public SubscriptionBase { void update_part_II(); void check_mult_jet_flag_init(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rcs_generic/include/rcs_group.hh b/models/fhw/effectors/rcs_generic/include/rcs_group.hh index 89786927..0a46f723 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_group.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_group.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include +namespace cml { + /***************************************************************************** RcsGenericModel Purpose:(Jet models) @@ -101,4 +103,8 @@ class RcsJetGroup { unsigned int get_num_prop_components() const {return num_prop_components;} }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rcs_generic/include/rcs_jet.hh b/models/fhw/effectors/rcs_generic/include/rcs_jet.hh index b2fc0a91..f1de02be 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_jet.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_jet.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include "rcs_group.hh" #include "rcs_generic.hh" +namespace cml { + /***************************************************************************** RcsJet Purpose:(The individual jets) @@ -237,4 +239,8 @@ class RcsJet { void apply_direction_dispersion(); void switch_status( RcsJetStatus new_status); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rcs_generic/include/rcs_prop_pod.hh b/models/fhw/effectors/rcs_generic/include/rcs_prop_pod.hh index cc6743c3..b59ad5da 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_prop_pod.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_prop_pod.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include #include "cml/models/dynamics/mass/dynamic_mass/include/dynamic_mass_body_properties.hh" +namespace cml { + /***************************************************************************** RcsPodComponent Purpose:(Represents each source of mass-draw-down, e.g. fuel and other gasses @@ -179,4 +181,8 @@ class RcsPropPod{ bool is_healthy() const { return health != HealthFail;} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rcs_generic/include/rcs_scale_factor_interface.hh b/models/fhw/effectors/rcs_generic/include/rcs_scale_factor_interface.hh index b19733e9..a6b80745 100644 --- a/models/fhw/effectors/rcs_generic/include/rcs_scale_factor_interface.hh +++ b/models/fhw/effectors/rcs_generic/include/rcs_scale_factor_interface.hh @@ -10,6 +10,8 @@ PROGRAMMERS: #ifndef CML_RCS_SCALE_FACTOR_INTERFACE_HH #define CML_RCS_SCALE_FACTOR_INTERFACE_HH +namespace cml { + /***************************************************************************** RcsScaleFactorInterfaceJet Purpose:(Jet-specific data for RcsScaleFactorInterface) @@ -56,4 +58,8 @@ class RcsScaleFactorInterface RcsScaleFactorInterface(const RcsScaleFactorInterface&) = delete; RcsScaleFactorInterface & operator= (const RcsScaleFactorInterface&) = delete; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rcs_generic/src/Example_RcsAdvanced.cc b/models/fhw/effectors/rcs_generic/src/Example_RcsAdvanced.cc index f0311bc3..d7217333 100644 --- a/models/fhw/effectors/rcs_generic/src/Example_RcsAdvanced.cc +++ b/models/fhw/effectors/rcs_generic/src/Example_RcsAdvanced.cc @@ -7,6 +7,8 @@ PURPOSE: (Example of a RCS system) #include "../include/Example_RcsAdvanced.hh" +namespace cml { + /***************************************************************************** Constructor @@ -349,3 +351,6 @@ RcsAdvancedExample::configure_jets() } } } + + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/src/rcs_build_trail.cc b/models/fhw/effectors/rcs_generic/src/rcs_build_trail.cc index 094e40a4..19adcbe7 100644 --- a/models/fhw/effectors/rcs_generic/src/rcs_build_trail.cc +++ b/models/fhw/effectors/rcs_generic/src/rcs_build_trail.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + RcsBuildUpTrailOff::RcsBuildUpTrailOff( RcsScaleFactorInterface& interface_, RcsBuildUpTrailOffJetData * const jet_, const double& time) @@ -56,4 +58,6 @@ void RcsBuildUpTrailOff::build_up_trail_off_effects() (jet[id].decay_time - interface.valve_decay_time)), 1.0); } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/src/rcs_generic.cc b/models/fhw/effectors/rcs_generic/src/rcs_generic.cc index 6607b9a5..e8c57506 100644 --- a/models/fhw/effectors/rcs_generic/src/rcs_generic.cc +++ b/models/fhw/effectors/rcs_generic/src/rcs_generic.cc @@ -83,6 +83,8 @@ ASSUMPTIONS AND LIMITATIONS: #include +namespace cml { + /***************************************************************************** Constructor Purpose:() @@ -483,4 +485,6 @@ RcsGeneric::set_calc_flow_rate(bool new_value) else { calc_flow_rate = new_value; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/src/rcs_group.cc b/models/fhw/effectors/rcs_generic/src/rcs_group.cc index 89bae1f8..63f19fa3 100644 --- a/models/fhw/effectors/rcs_generic/src/rcs_group.cc +++ b/models/fhw/effectors/rcs_generic/src/rcs_group.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/math_utils/include/math_utils.hh" +namespace cml { + /***************************************************************************** Constructor @@ -120,4 +122,6 @@ RcsJetGroup::set_blow_down( return; } blow_down = blow_down_; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/src/rcs_jet.cc b/models/fhw/effectors/rcs_generic/src/rcs_jet.cc index ea7c8b71..3c839a36 100644 --- a/models/fhw/effectors/rcs_generic/src/rcs_jet.cc +++ b/models/fhw/effectors/rcs_generic/src/rcs_jet.cc @@ -23,6 +23,8 @@ LIBRARY DEPENDENCIES: #include "../include/rcs_prop_pod.hh" #include "../include/rcs_jet.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -1156,4 +1158,6 @@ RcsJet::set_force_direction( scratch[1] = force_dir_y; scratch[2] = force_dir_z; set_force_direction(scratch); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/src/rcs_prop_pod.cc b/models/fhw/effectors/rcs_generic/src/rcs_prop_pod.cc index cee33d6f..c18e8efb 100644 --- a/models/fhw/effectors/rcs_generic/src/rcs_prop_pod.cc +++ b/models/fhw/effectors/rcs_generic/src/rcs_prop_pod.cc @@ -20,6 +20,8 @@ LIBRARY DEPENDENCIES: #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -314,4 +316,6 @@ RcsPropPod::set_thrust_factor( __FILE__,__LINE__,"Invalid assignment\n", "The thrust_factor vector is not sufficiently large to handle index ", index, ".\n"); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rcs_generic/verif/data/include/rcs_test_multigroup.hh b/models/fhw/effectors/rcs_generic/verif/data/include/rcs_test_multigroup.hh index 6fed7508..a56b8c03 100644 --- a/models/fhw/effectors/rcs_generic/verif/data/include/rcs_test_multigroup.hh +++ b/models/fhw/effectors/rcs_generic/verif/data/include/rcs_test_multigroup.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "cml/models/fhw/effectors/rcs_generic/include/rcs_group.hh" #include "cml/models/fhw/effectors/rcs_generic/include/rcs_jet.hh" +namespace cml { + class RcsTestMultigroup : public RcsGeneric { public: @@ -42,4 +44,8 @@ class RcsTestMultigroup : public RcsGeneric RcsTestMultigroup (const RcsTestMultigroup& rhs); RcsTestMultigroup & operator = (const RcsTestMultigroup& rhs); }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rcs_generic/verif/data/src/rcs_test_multigroup.cc b/models/fhw/effectors/rcs_generic/verif/data/src/rcs_test_multigroup.cc index 4a7cc620..d20c28c0 100644 --- a/models/fhw/effectors/rcs_generic/verif/data/src/rcs_test_multigroup.cc +++ b/models/fhw/effectors/rcs_generic/verif/data/src/rcs_test_multigroup.cc @@ -7,6 +7,8 @@ PURPOSE: (Example of a RCS system. For testing purpsoes only.) #include "../include/rcs_test_multigroup.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -130,3 +132,6 @@ RcsTestMultigroup::configure_jets() jet_03.set_isp(200); jet_04.set_isp(200); } + + +} // namespace cml diff --git a/models/fhw/effectors/rocket_motors/include/rocket_motor_basic.hh b/models/fhw/effectors/rocket_motors/include/rocket_motor_basic.hh index 66677cb8..85fff26b 100644 --- a/models/fhw/effectors/rocket_motors/include/rocket_motor_basic.hh +++ b/models/fhw/effectors/rocket_motors/include/rocket_motor_basic.hh @@ -24,6 +24,8 @@ PROGRAMMERS: #include "rocket_motor_dispersions.hh" +namespace cml { + /***************************************************************************** RocketMotor_Basic @@ -180,4 +182,8 @@ protected: virtual void start_motor(); void activate() override; }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rocket_motors/include/rocket_motor_dispersions.hh b/models/fhw/effectors/rocket_motors/include/rocket_motor_dispersions.hh index ef41580f..891af435 100644 --- a/models/fhw/effectors/rocket_motors/include/rocket_motor_dispersions.hh +++ b/models/fhw/effectors/rocket_motors/include/rocket_motor_dispersions.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #ifndef CML_ROCKET_MOTOR_DISPERSIONS_HH #define CML_ROCKET_MOTOR_DISPERSIONS_HH +namespace cml { + class RocketMotorDispersions { public: double position_dispersion[3]{}; /* (m) Dispersion in the position of the motor frame. */ @@ -34,4 +36,8 @@ public: void apply_dispersions( double position[3], double T_parent_to_motor[3][3]); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rocket_motors/include/rocket_motor_multi_nozzle.hh b/models/fhw/effectors/rocket_motors/include/rocket_motor_multi_nozzle.hh index bc5f311e..56a967db 100644 --- a/models/fhw/effectors/rocket_motors/include/rocket_motor_multi_nozzle.hh +++ b/models/fhw/effectors/rocket_motors/include/rocket_motor_multi_nozzle.hh @@ -25,6 +25,8 @@ PROGRAMMERS: #include #include +namespace cml { + class RocketMotor_MultiNozzle : public RocketMotor_TableThrust { protected: // external references @@ -133,4 +135,8 @@ public: size_t get_num_noz() const { return num_noz; } }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rocket_motors/include/rocket_motor_nozzle.hh b/models/fhw/effectors/rocket_motors/include/rocket_motor_nozzle.hh index a5fbeb6b..7dc7badf 100644 --- a/models/fhw/effectors/rocket_motors/include/rocket_motor_nozzle.hh +++ b/models/fhw/effectors/rocket_motors/include/rocket_motor_nozzle.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #ifndef CML_ROCKET_MOTOR_NOZZLE_HH #define CML_ROCKET_MOTOR_NOZZLE_HH +namespace cml { + class RocketMotorNozzle { friend class RocketMotor_MultiNozzle; public: @@ -89,4 +91,8 @@ protected: void modify_thrust_mag_atmos (double atm_pressure); void compute_thrust_vec(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/rocket_motors/include/rocket_motor_table_thrust.hh b/models/fhw/effectors/rocket_motors/include/rocket_motor_table_thrust.hh index d34bf5bf..36667321 100644 --- a/models/fhw/effectors/rocket_motors/include/rocket_motor_table_thrust.hh +++ b/models/fhw/effectors/rocket_motors/include/rocket_motor_table_thrust.hh @@ -27,6 +27,8 @@ PROGRAMMERS: #include "rocket_motor_basic.hh" +namespace cml { + class RocketMotor_TableThrust : public RocketMotor_Basic { public: enum ConsumptionType { @@ -126,4 +128,8 @@ protected: void update_table(); void compute_flow_rate_and_isp(); }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/rocket_motors/src/rocket_motor_basic.cc b/models/fhw/effectors/rocket_motors/src/rocket_motor_basic.cc index 4f89312b..96a6f517 100644 --- a/models/fhw/effectors/rocket_motors/src/rocket_motor_basic.cc +++ b/models/fhw/effectors/rocket_motors/src/rocket_motor_basic.cc @@ -20,6 +20,8 @@ LIBRARY DEPENDENCIES: #include "../include/rocket_motor_basic.hh" +namespace cml { + /***************************************************************************** constructor @@ -375,3 +377,6 @@ RocketMotor_Basic::activate() } SubscriptionBase::activate(); } + + +} // namespace cml diff --git a/models/fhw/effectors/rocket_motors/src/rocket_motor_dispersions.cc b/models/fhw/effectors/rocket_motors/src/rocket_motor_dispersions.cc index e9b5c281..b96862df 100644 --- a/models/fhw/effectors/rocket_motors/src/rocket_motor_dispersions.cc +++ b/models/fhw/effectors/rocket_motors/src/rocket_motor_dispersions.cc @@ -17,6 +17,8 @@ LIBRARY DEPENDENCIES: #include "../include/rocket_motor_dispersions.hh" +namespace cml { + /***************************************************************************** apply_dispersions Purpose:(Disperse the position and attitude of the motor frame. The nominal @@ -144,4 +146,6 @@ RocketMotorDispersions::apply_dispersions( jeod::Matrix3x3::product_left_transpose( T_dispersion_to_nominal, scratch, T_parent_to_motor); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rocket_motors/src/rocket_motor_multi_nozzle.cc b/models/fhw/effectors/rocket_motors/src/rocket_motor_multi_nozzle.cc index 4e2c1247..02f55262 100644 --- a/models/fhw/effectors/rocket_motors/src/rocket_motor_multi_nozzle.cc +++ b/models/fhw/effectors/rocket_motors/src/rocket_motor_multi_nozzle.cc @@ -31,6 +31,8 @@ LIBRARY DEPENDENCIES: #include "../include/rocket_motor_nozzle.hh" #include "../include/rocket_motor_table_thrust.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -530,4 +532,6 @@ RocketMotor_MultiNozzle::set_flex_threshold(double new_threshold) "Threshold will remain at ", flex_threshold, ".\n"); } else { flex_threshold = new_threshold; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rocket_motors/src/rocket_motor_nozzle.cc b/models/fhw/effectors/rocket_motors/src/rocket_motor_nozzle.cc index d05fd216..31838f50 100644 --- a/models/fhw/effectors/rocket_motors/src/rocket_motor_nozzle.cc +++ b/models/fhw/effectors/rocket_motors/src/rocket_motor_nozzle.cc @@ -20,6 +20,8 @@ LIBRARY DEPENDENCIES: #include "../include/rocket_motor_nozzle.hh" +namespace cml { + /***************************************************************************** initialize Purpose:(Initialize the rocket motors nozzle class and generate position @@ -160,4 +162,6 @@ RocketMotorNozzle::compute_thrust_vec() { jeod::Vector3::scale( thrust_dir, thrust_mag, thrust ); jeod::Vector3::scale( thrust_dir, thrust_vac_mag, thrust_vac ); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/rocket_motors/src/rocket_motor_table_thrust.cc b/models/fhw/effectors/rocket_motors/src/rocket_motor_table_thrust.cc index d951918c..c0c65337 100644 --- a/models/fhw/effectors/rocket_motors/src/rocket_motor_table_thrust.cc +++ b/models/fhw/effectors/rocket_motors/src/rocket_motor_table_thrust.cc @@ -27,6 +27,8 @@ LIBRARY DEPENDENCIES: #include "../include/rocket_motor_basic.hh" #include "../include/rocket_motor_table_thrust.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -521,3 +523,6 @@ RocketMotor_TableThrust::start_motor() RocketMotor_Basic::start_motor(); prop_mass_init = dyn_mass_properties.consumable_mass; } + + +} // namespace cml diff --git a/models/fhw/effectors/springs/include/mass_body_detach_with_springs.hh b/models/fhw/effectors/springs/include/mass_body_detach_with_springs.hh index 13706a09..3567906e 100644 --- a/models/fhw/effectors/springs/include/mass_body_detach_with_springs.hh +++ b/models/fhw/effectors/springs/include/mass_body_detach_with_springs.hh @@ -21,13 +21,15 @@ PROGRAMMERS: #include "simple_spring_group.hh" -class SeparationState; - namespace jeod { class DynBody; class DynManager; } +namespace cml { + +class SeparationState; + /* spring specific info for each spring */ class MassBodyDetachWithSprings : public jeod::BodyDetach { @@ -115,4 +117,8 @@ private: MassBodyDetachWithSprings(const MassBodyDetachWithSprings& rhs); MassBodyDetachWithSprings & operator= (const MassBodyDetachWithSprings&); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/fhw/effectors/springs/include/simple_spring_group.hh b/models/fhw/effectors/springs/include/simple_spring_group.hh index ac10e677..926a927c 100644 --- a/models/fhw/effectors/springs/include/simple_spring_group.hh +++ b/models/fhw/effectors/springs/include/simple_spring_group.hh @@ -23,6 +23,8 @@ PROGRAMMERS: #include "simple_spring_individual.hh" +namespace cml { + /******************************************************************************* SpringGroup Purpose:(Collection of Springs) @@ -99,4 +101,8 @@ public: void update(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/springs/include/simple_spring_individual.hh b/models/fhw/effectors/springs/include/simple_spring_individual.hh index 3e802c00..4a16cac8 100644 --- a/models/fhw/effectors/springs/include/simple_spring_individual.hh +++ b/models/fhw/effectors/springs/include/simple_spring_individual.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #ifndef CML_SIMPLE_SPRING_INDIVIDUAL_HH #define CML_SIMPLE_SPRING_INDIVIDUAL_HH +namespace cml { + /* Spring specific info for each spring */ class SimpleSpringIndividual{ public: @@ -54,4 +56,8 @@ public: double separation_speed); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/springs/src/simple_spring_group.cc b/models/fhw/effectors/springs/src/simple_spring_group.cc index 6f022432..b978e873 100644 --- a/models/fhw/effectors/springs/src/simple_spring_group.cc +++ b/models/fhw/effectors/springs/src/simple_spring_group.cc @@ -23,6 +23,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/simple_spring_group.hh" +namespace cml { + /******************************************************************************* initialize Purpose:(Sets the pointers.) @@ -329,4 +331,6 @@ SimpleSpringGroup::update() } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/springs/src/simple_spring_individual.cc b/models/fhw/effectors/springs/src/simple_spring_individual.cc index 87a72c9c..95224a61 100644 --- a/models/fhw/effectors/springs/src/simple_spring_individual.cc +++ b/models/fhw/effectors/springs/src/simple_spring_individual.cc @@ -12,6 +12,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/simple_spring_individual.hh" +namespace cml { + /******************************************************************************* initialize Purpose:(Used to set the initial compression of the springs.) @@ -63,4 +65,6 @@ SimpleSpringIndividual::calculate_force( double separation_distance, damping_force = damping_constant * extension_speed; axial_force -= damping_force; return axial_force; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/vent/include/simple_vent.hh b/models/fhw/effectors/vent/include/simple_vent.hh index 51fd4dc7..55a1641c 100644 --- a/models/fhw/effectors/vent/include/simple_vent.hh +++ b/models/fhw/effectors/vent/include/simple_vent.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + class SimpleVent { friend class VentSet; @@ -181,4 +183,8 @@ class SimpleVent { void set_duration_internal(); virtual void set_force_internal(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/fhw/effectors/vent/include/vent.hh b/models/fhw/effectors/vent/include/vent.hh index cbe24aa6..6650af8c 100644 --- a/models/fhw/effectors/vent/include/vent.hh +++ b/models/fhw/effectors/vent/include/vent.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "simple_vent.hh" +namespace cml { + class Vent : public SimpleVent { friend class VentSet; protected: @@ -67,4 +69,8 @@ class Vent : public SimpleVent { void update_mass_demand() override; void stop_venting() override; }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/vent/include/vent_set.hh b/models/fhw/effectors/vent/include/vent_set.hh index bd080626..4e3bcd75 100644 --- a/models/fhw/effectors/vent/include/vent_set.hh +++ b/models/fhw/effectors/vent/include/vent_set.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include "simple_vent.hh" +namespace cml { + class VentSet : public SubscriptionBase { protected: // external references jeod::DynBody& dyn_body; /* (--) jeod::DynBody to which vents are attached */ @@ -99,4 +101,8 @@ class VentSet : public SubscriptionBase { private: void start_vent_internal( SimpleVent * vent); }; + + +} // namespace cml + #endif diff --git a/models/fhw/effectors/vent/src/simple_vent.cc b/models/fhw/effectors/vent/src/simple_vent.cc index 4bc699c1..421ea865 100644 --- a/models/fhw/effectors/vent/src/simple_vent.cc +++ b/models/fhw/effectors/vent/src/simple_vent.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/math_utils/include/math_utils.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /************************************************************************* Constructor *************************************************************************/ @@ -761,4 +763,6 @@ void SimpleVent::set_force_internal() force); force_mag_set = true; force_set = true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/vent/src/vent.cc b/models/fhw/effectors/vent/src/vent.cc index f4e4185a..0257fd58 100644 --- a/models/fhw/effectors/vent/src/vent.cc +++ b/models/fhw/effectors/vent/src/vent.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "../include/vent.hh" +namespace cml { + /************************************************************************ Constructor ************************************************************************/ @@ -426,4 +428,6 @@ void Vent::update_mass_demand() tank.dynamic_properties.mass_consumed_step += flowrate * (dyn_time - prev_time); prev_time = dyn_time; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/fhw/effectors/vent/src/vent_set.cc b/models/fhw/effectors/vent/src/vent_set.cc index fd3bb93f..7c2685ba 100644 --- a/models/fhw/effectors/vent/src/vent_set.cc +++ b/models/fhw/effectors/vent/src/vent_set.cc @@ -26,6 +26,8 @@ LIBRARY DEPENDENCY: #include "../include/vent.hh" #include "../include/vent_set.hh" +namespace cml { + /***************************************************************************** Constructors (a) baseline, do not create any vents @@ -475,3 +477,6 @@ void VentSet::start_vent_internal(SimpleVent * vent) dynamic_vents.push_back(vent); } } + + +} // namespace cml diff --git a/models/interactions/aero/include/aero_coefficients.hh b/models/interactions/aero/include/aero_coefficients.hh index 4918a2e3..c7b8710e 100644 --- a/models/interactions/aero/include/aero_coefficients.hh +++ b/models/interactions/aero/include/aero_coefficients.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #ifndef CML_AERO_COEFFICIENTS_HH #define CML_AERO_COEFFICIENTS_HH +namespace cml { + /******************************************************************************* AeroCoefficientsCoreBase Purpose: (These are the core-values, shared between the Table-lookup, the API, @@ -125,4 +127,8 @@ public: AeroCoefficientsDisp() = default; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_environment.hh b/models/interactions/aero/include/aero_environment.hh index d1ba1102..3ccf31da 100644 --- a/models/interactions/aero/include/aero_environment.hh +++ b/models/interactions/aero/include/aero_environment.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #include #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* AeroEnvironment Purpose: (References the environment variables; @@ -81,4 +83,8 @@ public: const double * get_cg_position() const { return cg_position;} const double * get_true_body_rates() const { return true_body_rates;} }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_executive_base.hh b/models/interactions/aero/include/aero_executive_base.hh index 35d154fb..ef4ec545 100644 --- a/models/interactions/aero/include/aero_executive_base.hh +++ b/models/interactions/aero/include/aero_executive_base.hh @@ -34,6 +34,8 @@ PROGRAMMERS: #include "aero_interface_output.hh" +namespace cml { + /***************************************************************************** AeroExecutiveBase Purpose: Baseline Aero Executive, intended to be common across all aero @@ -73,4 +75,8 @@ public: virtual void update() = 0; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_executive_simple.hh b/models/interactions/aero/include/aero_executive_simple.hh index 64a97e65..1e7ec59c 100644 --- a/models/interactions/aero/include/aero_executive_simple.hh +++ b/models/interactions/aero/include/aero_executive_simple.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "aero_executive_base.hh" +namespace cml { + class AeroInterfaceOutput; /******************************************************************************* @@ -79,4 +81,8 @@ public: void initialize() override; void update() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_executive_simple_lift_drag.hh b/models/interactions/aero/include/aero_executive_simple_lift_drag.hh index 14715865..8e51f740 100644 --- a/models/interactions/aero/include/aero_executive_simple_lift_drag.hh +++ b/models/interactions/aero/include/aero_executive_simple_lift_drag.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #include "aero_executive_base.hh" +namespace cml { + class AeroInterfaceOutput; /******************************************************************************* @@ -78,4 +80,8 @@ public: void initialize() override; void update() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_executive_table.hh b/models/interactions/aero/include/aero_executive_table.hh index 1b196c2f..37102e7d 100644 --- a/models/interactions/aero/include/aero_executive_table.hh +++ b/models/interactions/aero/include/aero_executive_table.hh @@ -26,6 +26,8 @@ PROGRAMMERS: #include #include +namespace cml { + class AeroInterfaceOutput; class AeroEnvironment; @@ -206,4 +208,8 @@ private: AeroExecutiveTable (const AeroExecutiveTable &); AeroExecutiveTable & operator = (const AeroExecutiveTable &); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_interface_base.hh b/models/interactions/aero/include/aero_interface_base.hh index c2f47153..95d3fdf2 100644 --- a/models/interactions/aero/include/aero_interface_base.hh +++ b/models/interactions/aero/include/aero_interface_base.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "aero_interface_output.hh" #include "aero_executive_base.hh" +namespace cml { + /******************************************************************************* AeroInterfaceBase Purpose: (Abstract class providing the base for the AeroInterface options.) @@ -68,4 +70,8 @@ protected: void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_interface_base_extended.hh b/models/interactions/aero/include/aero_interface_base_extended.hh index d3f9f79c..2d9464c7 100644 --- a/models/interactions/aero/include/aero_interface_base_extended.hh +++ b/models/interactions/aero/include/aero_interface_base_extended.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "aero_interface_base.hh" #include "aero_environment.hh" +namespace cml { + /******************************************************************************* AeroInterfaceExtended Purpose:(Common elements for the Table-lookup and Api options.) @@ -50,4 +52,8 @@ public: AeroInterfaceBaseExtended (const AeroInterfaceBaseExtended &) = delete; AeroInterfaceBaseExtended & operator = (const AeroInterfaceBaseExtended &) = delete; }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_interface_output.hh b/models/interactions/aero/include/aero_interface_output.hh index 11c31cc6..dca9fbd2 100644 --- a/models/interactions/aero/include/aero_interface_output.hh +++ b/models/interactions/aero/include/aero_interface_output.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /******************************************************************************* AeroInterfaceOutput Purpose:(The data elements recognized as the primary outputs of the aero models.) @@ -59,4 +61,8 @@ public: zero_torque(); } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/include/aero_interface_simple.hh b/models/interactions/aero/include/aero_interface_simple.hh index 67bba63f..83df945b 100644 --- a/models/interactions/aero/include/aero_interface_simple.hh +++ b/models/interactions/aero/include/aero_interface_simple.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "aero_interface_base.hh" #include "aero_executive_simple.hh" +namespace cml { + class AtmosRelativeState; /******************************************************************************* @@ -40,4 +42,8 @@ public: void initialize() override; void update() override; }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_interface_simple_lift_drag.hh b/models/interactions/aero/include/aero_interface_simple_lift_drag.hh index 8b891f72..f90fb316 100644 --- a/models/interactions/aero/include/aero_interface_simple_lift_drag.hh +++ b/models/interactions/aero/include/aero_interface_simple_lift_drag.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "aero_interface_base.hh" #include "aero_executive_simple_lift_drag.hh" +namespace cml { + class AtmosRelativeState; /******************************************************************************* @@ -38,4 +40,8 @@ public: void initialize() override; void update() override; }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_interface_table.hh b/models/interactions/aero/include/aero_interface_table.hh index 486bb875..9d841e13 100644 --- a/models/interactions/aero/include/aero_interface_table.hh +++ b/models/interactions/aero/include/aero_interface_table.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "aero_interface_base_extended.hh" #include "aero_executive_table.hh" +namespace cml { + class AtmosRelativeState; /******************************************************************************* @@ -49,4 +51,8 @@ protected: void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_table_set.hh b/models/interactions/aero/include/aero_table_set.hh index c08da94a..aedcc2ef 100644 --- a/models/interactions/aero/include/aero_table_set.hh +++ b/models/interactions/aero/include/aero_table_set.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "aero_table_set_base.hh" #include "aero_executive_table.hh" +namespace cml { + class AeroTableSet: public AeroTableSetBase { public: @@ -43,4 +45,8 @@ private: AeroTableSet (const AeroTableSet &); AeroTableSet & operator = (const AeroTableSet &); }; + + +} // namespace cml + #endif diff --git a/models/interactions/aero/include/aero_table_set_base.hh b/models/interactions/aero/include/aero_table_set_base.hh index 1bfbe3ad..63a40f91 100644 --- a/models/interactions/aero/include/aero_table_set_base.hh +++ b/models/interactions/aero/include/aero_table_set_base.hh @@ -23,6 +23,8 @@ PROGRAMMERS: #include "aero_coefficients.hh" +namespace cml { + class AeroTableSetBase: public TableLookupSet { protected: @@ -154,4 +156,8 @@ protected: void query_off_diag_aero_damping(); AeroDampingType verify_aero_damping(const std::string & type) const; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/aero/src/aero_executive_simple.cc b/models/interactions/aero/src/aero_executive_simple.cc index 3b2e6b38..e0854b90 100644 --- a/models/interactions/aero/src/aero_executive_simple.cc +++ b/models/interactions/aero/src/aero_executive_simple.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_executive_simple.hh" #include "../include/aero_interface_output.hh" +namespace cml { + /******************************************************************************* Constructor: *******************************************************************************/ @@ -164,4 +166,6 @@ AeroExecutiveSimple::set_drag_type(DragType drag_type_in) break; } drag_type = drag_type_in; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/aero/src/aero_executive_simple_lift_drag.cc b/models/interactions/aero/src/aero_executive_simple_lift_drag.cc index 0de48025..e65592fc 100644 --- a/models/interactions/aero/src/aero_executive_simple_lift_drag.cc +++ b/models/interactions/aero/src/aero_executive_simple_lift_drag.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_executive_simple_lift_drag.hh" #include "../include/aero_interface_output.hh" +namespace cml { + /******************************************************************************* Constructor: *******************************************************************************/ @@ -154,4 +156,6 @@ AeroExecutiveSimpleLiftDrag::set_aero_type(AeroType aero_type_in) break; } aero_type = aero_type_in; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/aero/src/aero_executive_table.cc b/models/interactions/aero/src/aero_executive_table.cc index daacfa1f..04438c44 100644 --- a/models/interactions/aero/src/aero_executive_table.cc +++ b/models/interactions/aero/src/aero_executive_table.cc @@ -29,6 +29,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_interface_output.hh" #include "../include/aero_table_set_base.hh" +namespace cml { + /******************************************************************************* Constructors *******************************************************************************/ @@ -569,4 +571,6 @@ AeroExecutiveTable::aero_forces_moments() output.moment_mrc[2] = coefficients.Cn_mrc * pAL; jeod::Vector3::transform_transpose( T_struc_to_aero_frame, output.moment_mrc); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/aero/src/aero_executive_table_disperse.cc b/models/interactions/aero/src/aero_executive_table_disperse.cc index 1622c4fc..f9e29201 100644 --- a/models/interactions/aero/src/aero_executive_table_disperse.cc +++ b/models/interactions/aero/src/aero_executive_table_disperse.cc @@ -13,6 +13,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_table_set_base.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* process_prelim_uncertainties Purpose: (For the tables in which the uncertainties are specified and fixed, @@ -659,3 +661,6 @@ AeroExecutiveTable::increment_damping_coeffs_with_bias() coefficients.dCn_dq += bias.dCn_dq; } } + + +} // namespace cml diff --git a/models/interactions/aero/src/aero_interface_base.cc b/models/interactions/aero/src/aero_interface_base.cc index 660f5fdd..a6431491 100644 --- a/models/interactions/aero/src/aero_interface_base.cc +++ b/models/interactions/aero/src/aero_interface_base.cc @@ -16,6 +16,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_interface_base.hh" +namespace cml { + /******************************************************************************* Constructor *******************************************************************************/ @@ -148,3 +150,6 @@ AeroInterfaceBase::deactivate() SubscriptionBase::deactivate(); } + + +} // namespace cml diff --git a/models/interactions/aero/src/aero_interface_simple.cc b/models/interactions/aero/src/aero_interface_simple.cc index d78e7f21..123a50ac 100644 --- a/models/interactions/aero/src/aero_interface_simple.cc +++ b/models/interactions/aero/src/aero_interface_simple.cc @@ -12,6 +12,8 @@ PURPOSE: ( Provides the simple interface, exclusive to simple #include "../include/aero_interface_base.hh" #include "../include/aero_interface_simple.hh" +namespace cml { + /******************************************************************************* Constructor: *******************************************************************************/ @@ -62,4 +64,6 @@ AeroInterfaceSimple::update() return; } executive.update(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/aero/src/aero_interface_simple_lift_drag.cc b/models/interactions/aero/src/aero_interface_simple_lift_drag.cc index 808ca60e..68a6b2e4 100644 --- a/models/interactions/aero/src/aero_interface_simple_lift_drag.cc +++ b/models/interactions/aero/src/aero_interface_simple_lift_drag.cc @@ -11,6 +11,8 @@ PURPOSE: ( Provides the simple interface, exclusive to simple #include "../include/aero_interface_base.hh" #include "../include/aero_interface_simple_lift_drag.hh" +namespace cml { + /******************************************************************************* Constructor: *******************************************************************************/ @@ -65,3 +67,6 @@ AeroInterfaceSimpleLiftDrag::update() } executive.update(); } + + +} // namespace cml diff --git a/models/interactions/aero/src/aero_interface_table.cc b/models/interactions/aero/src/aero_interface_table.cc index dd9ada3b..f7a9adc1 100644 --- a/models/interactions/aero/src/aero_interface_table.cc +++ b/models/interactions/aero/src/aero_interface_table.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/dynamics/state_descriptors/atmos_rel_state/include/atmos_relative_state.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* Constructors *******************************************************************************/ @@ -130,3 +132,6 @@ AeroInterfaceTable::deactivate() AeroInterfaceBaseExtended::deactivate(); } } + + +} // namespace cml diff --git a/models/interactions/aero/src/aero_table_set_base.cc b/models/interactions/aero/src/aero_table_set_base.cc index f39fb8a2..73eab344 100644 --- a/models/interactions/aero/src/aero_table_set_base.cc +++ b/models/interactions/aero/src/aero_table_set_base.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "../include/aero_coefficients.hh" #include "../include/aero_table_set_base.hh" +namespace cml { + /******************************************************************************* Constructor *******************************************************************************/ @@ -242,4 +244,6 @@ AeroTableSetBase::set_table_type( AeroDataTableType new_type) else { data_table_type = new_type; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/aero/verif/SIM_Test_table/include/example_tables.hh b/models/interactions/aero/verif/SIM_Test_table/include/example_tables.hh index 797c6b5f..32be527b 100644 --- a/models/interactions/aero/verif/SIM_Test_table/include/example_tables.hh +++ b/models/interactions/aero/verif/SIM_Test_table/include/example_tables.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #include "cml/models/interactions/aero/include/aero_table_set.hh" #include "cml/models/interactions/aero/include/aero_executive_table.hh" +namespace cml { + /***************************************************************************** SimpleAeroTableSet Purpose:(Basic form for testing the 6 types of input sets. @@ -462,4 +464,8 @@ class ExampleTableSet1 : public AeroTableSet ExampleTableSet1 & operator= (const ExampleTableSet1 &); }; + + +} // namespace cml + #endif diff --git a/models/interactions/subsonic_wake/include/subsonic_wake.hh b/models/interactions/subsonic_wake/include/subsonic_wake.hh index 55e44e5c..15887970 100644 --- a/models/interactions/subsonic_wake/include/subsonic_wake.hh +++ b/models/interactions/subsonic_wake/include/subsonic_wake.hh @@ -32,6 +32,8 @@ NOTES: #include "wake_params.hh" #include "wake_effects.hh" +namespace cml { + /***************************************************************************** SubsonicWake @@ -130,4 +132,8 @@ class SubsonicWakeWithForce : public SubsonicWake void query_objB() override{} // just to make it instantiable }; + + +} // namespace cml + #endif diff --git a/models/interactions/subsonic_wake/include/wake_bodies.hh b/models/interactions/subsonic_wake/include/wake_bodies.hh index 6457dabd..299892a1 100644 --- a/models/interactions/subsonic_wake/include/wake_bodies.hh +++ b/models/interactions/subsonic_wake/include/wake_bodies.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #ifndef CML_WAKE_BODIES_HH #define CML_WAKE_BODIES_HH +namespace cml { + /***************************************************************************** WakeGeneratingBody Purpose:(The body that is generating the wake) @@ -172,4 +174,8 @@ class WakeFollowingBodyWithForce : public WakeFollowingBody void compute_force(double force_mag) override; double get_drag_area() const override {return Cd * area;} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/subsonic_wake/include/wake_effects.hh b/models/interactions/subsonic_wake/include/wake_effects.hh index 3be9efae..355e1649 100644 --- a/models/interactions/subsonic_wake/include/wake_effects.hh +++ b/models/interactions/subsonic_wake/include/wake_effects.hh @@ -30,6 +30,8 @@ NOTES: #include "wake_params.hh" #include "wake_bodies.hh" +namespace cml { + /***************************************************************************** WakeEffectsBase Purpose:(Provides the common variable interface that is shared between @@ -213,4 +215,8 @@ class WakeEffectsOut { WakePrfOut prf_model; /* (--) Output from PRF model */ WakeRevFlowOut rev_flow; /* (--) Output from reverse-flow model */ }; + + +} // namespace cml + #endif diff --git a/models/interactions/subsonic_wake/include/wake_params.hh b/models/interactions/subsonic_wake/include/wake_params.hh index 3152b36b..bad6f1f9 100644 --- a/models/interactions/subsonic_wake/include/wake_params.hh +++ b/models/interactions/subsonic_wake/include/wake_params.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #ifndef CML_WAKE_PARAMS_HH #define CML_WAKE_PARAMS_HH +namespace cml { + /***************************************************************************** WakeParamsSub Purpose:(A set of distance thresholds for the rev-flow and PRF models) @@ -54,4 +56,8 @@ class WakeParams WakeParams() = default; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/interactions/subsonic_wake/src/prf_model.cc b/models/interactions/subsonic_wake/src/prf_model.cc index aeaee474..d1891404 100644 --- a/models/interactions/subsonic_wake/src/prf_model.cc +++ b/models/interactions/subsonic_wake/src/prf_model.cc @@ -25,6 +25,8 @@ PURPOSE: (A generic model to simulate the pressure-recovery fraction (PRF) #include "../include/wake_effects.hh" #include "../include/wake_params.hh" +namespace cml { + /***************************************************************************** constructor *****************************************************************************/ @@ -149,4 +151,6 @@ WakePrfModel::deactivate() PRF = 1.0; force_toward_A = 0; WakeEffectsBase::deactivate(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/subsonic_wake/src/reverse_flow.cc b/models/interactions/subsonic_wake/src/reverse_flow.cc index 07ee6e6f..7d34554f 100644 --- a/models/interactions/subsonic_wake/src/reverse_flow.cc +++ b/models/interactions/subsonic_wake/src/reverse_flow.cc @@ -24,6 +24,8 @@ PURPOSE: (A generic model to simulate reverse-flow effects) #include "../include/wake_effects.hh" #include "../include/wake_params.hh" +namespace cml { + /***************************************************************************** constructor *****************************************************************************/ @@ -100,4 +102,6 @@ WakeReverseFlow::deactivate() { Qrev = 0.0; WakeEffectsBase::deactivate(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/subsonic_wake/src/subsonic_wake.cc b/models/interactions/subsonic_wake/src/subsonic_wake.cc index 558c3eed..335cacf6 100644 --- a/models/interactions/subsonic_wake/src/subsonic_wake.cc +++ b/models/interactions/subsonic_wake/src/subsonic_wake.cc @@ -25,6 +25,8 @@ PURPOSE: (A generic model to simulate subsonic wake effects) #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** constructor @@ -194,4 +196,6 @@ SubsonicWakeWithForce::deactivate() { jeod::Vector3::initialize(objectB.force); SubsonicWake::deactivate(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/subsonic_wake/src/wake_bodies.cc b/models/interactions/subsonic_wake/src/wake_bodies.cc index 295498c8..3062a855 100644 --- a/models/interactions/subsonic_wake/src/wake_bodies.cc +++ b/models/interactions/subsonic_wake/src/wake_bodies.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/math_utils/include/math_utils.hh" #include "../include/wake_bodies.hh" +namespace cml { + /***************************************************************************** @@ -241,4 +243,6 @@ WakeFollowingBodyWithForce::compute_force(double force_mag) jeod::Vector3::scale( scratch, -force_mag, // switch direction force); // in B structural frame. -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/interactions/subsonic_wake/src/wake_effects_base.cc b/models/interactions/subsonic_wake/src/wake_effects_base.cc index 3e8ea9ff..e74ae25c 100644 --- a/models/interactions/subsonic_wake/src/wake_effects_base.cc +++ b/models/interactions/subsonic_wake/src/wake_effects_base.cc @@ -22,6 +22,8 @@ PURPOSE: (A generic model to simulate the common elements of the #include "../include/wake_effects.hh" #include "../include/wake_params.hh" #include "jeod/models/utils/math/include/vector3.hh" + +namespace cml { /***************************************************************************** constructor *****************************************************************************/ @@ -81,4 +83,6 @@ WakeEffectsBase::generate_trail_and_radial_dist() (offset_trail_dist <= params.stop_dist) && (offset_radial_dist < params.radial_dist)); force_toward_A = 0.0; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/tools/unit_test/models/include/unit_test.hh b/models/tools/unit_test/models/include/unit_test.hh index 2c60ee8b..25516ac7 100644 --- a/models/tools/unit_test/models/include/unit_test.hh +++ b/models/tools/unit_test/models/include/unit_test.hh @@ -21,6 +21,7 @@ PROGRAMMERS: #include #include +namespace cml { /***************************************************************************** SweepSet @@ -123,8 +124,8 @@ class UnitTestFramework { void update_sweeps(); void update_file(); - private: - friend class UnitTestFrameworkTest; + + // TODO Nino Tarantino 9/11/26: Move to env utils model std::string expand_env_variables(const std::string& input); }; @@ -135,4 +136,7 @@ inline void unit_test_init( UNIT_TEST * data) {data->initialize();} inline void unit_test( UNIT_TEST * data) {data->update();} inline void unit_test_dd( UNIT_TEST * data) {(void) data;} inline void unit_test_shutdown( UNIT_TEST * data) {(void) data;} + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/tools/unit_test/models/src/unit_test.cc b/models/tools/unit_test/models/src/unit_test.cc index 6b0e5a18..122d61f9 100644 --- a/models/tools/unit_test/models/src/unit_test.cc +++ b/models/tools/unit_test/models/src/unit_test.cc @@ -34,6 +34,8 @@ LIBRARY DEPENDENCIES: #include "trick/input_processor_proto.h" #include "trick/IPPython.hh" +namespace cml { + extern Trick::IPPython* the_pip; @@ -676,4 +678,6 @@ UnitTestFramework::update_file() commands.push_back(commands.front()); } commands.pop_front(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/tools/unit_test/models/tests/test_unit_framework.cc b/models/tools/unit_test/models/tests/test_unit_framework.cc index 82f6d38b..4ae605fb 100644 --- a/models/tools/unit_test/models/tests/test_unit_framework.cc +++ b/models/tools/unit_test/models/tests/test_unit_framework.cc @@ -6,13 +6,13 @@ #include "mocks/cml/cml_message_mock.hh" // Create a test subclass to access protected methods (if needed) -class UnitTestFrameworkTest : public UnitTestFramework { +class UnitTestFrameworkTest : public cml::UnitTestFramework { public: using UnitTestFramework::expand_env_variables; }; TEST(UnitTestFrameworkTest, DefaultConstructorInitializesState) { - UnitTestFramework utf; + cml::UnitTestFramework utf; EXPECT_TRUE(utf.enabled); EXPECT_FALSE(utf.cycle_data); @@ -36,14 +36,14 @@ TEST(UnitTestFrameworkTest, ExpandEnvVariableUnknownThrows) { using testing::_; using testing::HasSubstr; - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; unsetenv("NON_EXISTENT_VAR"); UnitTestFrameworkTest utf; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("'NON_EXISTENT_VAR' is not set"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("'NON_EXISTENT_VAR' is not set"))); std::string input = "${NON_EXISTENT_VAR}/file.txt"; EXPECT_THROW(utf.expand_env_variables(input), std::runtime_error); -} +} \ No newline at end of file diff --git a/models/utilities/bin_counter/include/bin_counter.hh b/models/utilities/bin_counter/include/bin_counter.hh index 98391f25..84f6ef16 100644 --- a/models/utilities/bin_counter/include/bin_counter.hh +++ b/models/utilities/bin_counter/include/bin_counter.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** CML_BinCounterElement @@ -82,4 +84,8 @@ class CML_BinCounter { set_data( edges_v, closed_ends); } }; + + +} // namespace cml + #endif diff --git a/models/utilities/bin_counter/include/proximity_counter.hh b/models/utilities/bin_counter/include/proximity_counter.hh index 7cf5ba18..6c5f7a0f 100644 --- a/models/utilities/bin_counter/include/proximity_counter.hh +++ b/models/utilities/bin_counter/include/proximity_counter.hh @@ -23,6 +23,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** CML_ProximityCounterElement Purpose: Contents of each element of the working vector @@ -69,4 +71,8 @@ class CML_ProximityCounter { set_data( targets_v); } }; + + +} // namespace cml + #endif diff --git a/models/utilities/bin_counter/include/target_counter.hh b/models/utilities/bin_counter/include/target_counter.hh index d57c1a38..631a4292 100644 --- a/models/utilities/bin_counter/include/target_counter.hh +++ b/models/utilities/bin_counter/include/target_counter.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** CML_TargetCounterElement Purpose: Contents of each element of the working vector @@ -70,4 +72,8 @@ class CML_TargetCounter { set_data( targets_v); } }; + + +} // namespace cml + #endif diff --git a/models/utilities/bin_counter/src/bin_counter.cc b/models/utilities/bin_counter/src/bin_counter.cc index 84f8e854..2522852f 100644 --- a/models/utilities/bin_counter/src/bin_counter.cc +++ b/models/utilities/bin_counter/src/bin_counter.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/bin_counter.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -219,3 +221,6 @@ CML_BinCounter::insert(double value) } } } + + +} // namespace cml diff --git a/models/utilities/bin_counter/src/proximity_counter.cc b/models/utilities/bin_counter/src/proximity_counter.cc index ab8aa102..91c27d93 100644 --- a/models/utilities/bin_counter/src/proximity_counter.cc +++ b/models/utilities/bin_counter/src/proximity_counter.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -134,3 +136,6 @@ CML_ProximityCounter::insert(double value) } } } + + +} // namespace cml diff --git a/models/utilities/bin_counter/src/target_counter.cc b/models/utilities/bin_counter/src/target_counter.cc index 63f5bc86..27a6ed2c 100644 --- a/models/utilities/bin_counter/src/target_counter.cc +++ b/models/utilities/bin_counter/src/target_counter.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "../include/target_counter.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -127,4 +129,6 @@ CML_TargetCounter::does_val_exist(int val) const { return std::any_of( targets.begin(), targets.end(), [val](const auto & target_) {return (val == target_.value);}); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/buffers/include/simple_ring_buffer.hh b/models/utilities/buffers/include/simple_ring_buffer.hh index 6cf9882c..0ea7ffbb 100644 --- a/models/utilities/buffers/include/simple_ring_buffer.hh +++ b/models/utilities/buffers/include/simple_ring_buffer.hh @@ -23,6 +23,8 @@ ASSUMPTIONS: #include #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + template class CMLSimpleRingBuffer { public: @@ -184,4 +186,8 @@ Purpose: } }; + + +} // namespace cml + #endif diff --git a/models/utilities/buffers/include/tagged_ring_buffer.hh b/models/utilities/buffers/include/tagged_ring_buffer.hh index 355ae459..d7ff6381 100644 --- a/models/utilities/buffers/include/tagged_ring_buffer.hh +++ b/models/utilities/buffers/include/tagged_ring_buffer.hh @@ -28,6 +28,8 @@ ASSUMPTIONS: #include #include +namespace cml { + /***************************************************************************** CMLTaggedRingBufferMember Purpose: @@ -227,4 +229,8 @@ Note: return &data_[prox_ix].data; } }; + + +} // namespace cml + #endif diff --git a/models/utilities/buffers/verif/SIM_simple_ring_buffer/sample_class.hh b/models/utilities/buffers/verif/SIM_simple_ring_buffer/sample_class.hh index cc81dd29..60fd9309 100644 --- a/models/utilities/buffers/verif/SIM_simple_ring_buffer/sample_class.hh +++ b/models/utilities/buffers/verif/SIM_simple_ring_buffer/sample_class.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "cml/models/utilities/buffers/include/simple_ring_buffer.hh" +namespace cml { + struct TestStruc { double x; @@ -48,4 +50,8 @@ struct SampleModel } }; + + +} // namespace cml + #endif diff --git a/models/utilities/buffers/verif/SIM_tagged_ring_buffer/sample_class.hh b/models/utilities/buffers/verif/SIM_tagged_ring_buffer/sample_class.hh index 7721b29a..eb846d4e 100644 --- a/models/utilities/buffers/verif/SIM_tagged_ring_buffer/sample_class.hh +++ b/models/utilities/buffers/verif/SIM_tagged_ring_buffer/sample_class.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "cml/models/utilities/buffers/include/tagged_ring_buffer.hh" +namespace cml { + struct TestStruc { double x; @@ -62,4 +64,8 @@ struct SampleModel } }; + + +} // namespace cml + #endif diff --git a/models/utilities/cml_message/include/cml_message.hh b/models/utilities/cml_message/include/cml_message.hh index 90321eb2..f4760c4b 100644 --- a/models/utilities/cml_message/include/cml_message.hh +++ b/models/utilities/cml_message/include/cml_message.hh @@ -24,6 +24,8 @@ Programmers: #include "cml/models/utilities/color_string/include/color_string.hh" +namespace cml { + namespace CMLMessage { enum PublishLevel { @@ -160,4 +162,8 @@ std::string set_prec( T var, int precision) } + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/cml_message/src/cml_message.cc b/models/utilities/cml_message/src/cml_message.cc index e1de14cd..a235c223 100644 --- a/models/utilities/cml_message/src/cml_message.cc +++ b/models/utilities/cml_message/src/cml_message.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + namespace { CMLMessage::PublishLevel publish_level = CMLMessage::Warning; @@ -116,3 +118,6 @@ void publish(PublishLevel msg_level, } } + + +} // namespace cml diff --git a/models/utilities/cml_message/test/cml_message_test.cc b/models/utilities/cml_message/test/cml_message_test.cc index bf7a6568..5668e6d5 100644 --- a/models/utilities/cml_message/test/cml_message_test.cc +++ b/models/utilities/cml_message/test/cml_message_test.cc @@ -11,24 +11,24 @@ namespace { // Test that the message publishing level is set properly. TEST(CMLMessage, SetPublishLevel) { const std::array publish_levels { - CMLMessage::Fail, - CMLMessage::Error, - CMLMessage::Warning, - CMLMessage::Status, - CMLMessage::Inform, - CMLMessage::Debug + cml::CMLMessage::Fail, + cml::CMLMessage::Error, + cml::CMLMessage::Warning, + cml::CMLMessage::Status, + cml::CMLMessage::Inform, + cml::CMLMessage::Debug }; for (auto level : publish_levels) { - CMLMessage::set_publish_level(level); - EXPECT_EQ(CMLMessage::get_publish_level(), level); + cml::CMLMessage::set_publish_level(level); + EXPECT_EQ(cml::CMLMessage::get_publish_level(), level); } } // Test the helper function that combines a variable number of arguments into a single string. TEST(CMLMessage, CollateArgs) { const std::string arg4 = "test function"; - auto result = CMLMessage::collate_args("We supply ", 4, " arguments to ", arg4); + auto result = cml::CMLMessage::collate_args("We supply ", 4, " arguments to ", arg4); EXPECT_EQ(result, "We supply 4 arguments to test function"); } @@ -37,32 +37,32 @@ TEST(CMLMessage, CollateArgs) { TEST(CMLMessage, InterfaceMethods) { using testing::_; - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; const int ii = 4; const std::string part2 = "is a collection of "; const char* part3 = " arguments"; const std::string expected = "This is a collection of 4 arguments"; - CMLMessage::set_publish_level(CMLMessage::Debug); + cml::CMLMessage::set_publish_level(cml::CMLMessage::Debug); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Error, _, _, expected)); - CMLMessage::error(__FILE__, __LINE__, "This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Error, _, _, expected)); + cml::CMLMessage::error(__FILE__, __LINE__, "This ", part2, ii, part3); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Warning, _, _, expected)); - CMLMessage::warn(__FILE__, __LINE__, "This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Warning, _, _, expected)); + cml::CMLMessage::warn(__FILE__, __LINE__, "This ", part2, ii, part3); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Inform, _, _, expected)); - CMLMessage::inform(__FILE__, __LINE__, "This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Inform, _, _, expected)); + cml::CMLMessage::inform(__FILE__, __LINE__, "This ", part2, ii, part3); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Debug, _, _, expected)); - CMLMessage::debug(__FILE__, __LINE__, "This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Debug, _, _, expected)); + cml::CMLMessage::debug(__FILE__, __LINE__, "This ", part2, ii, part3); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Status, _, _, expected)); - CMLMessage::status("This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Status, _, _, expected)); + cml::CMLMessage::status("This ", part2, ii, part3); - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Fail, _, _, expected)); - CMLMessage::fail(__FILE__, __LINE__, "This ", part2, ii, part3); + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Fail, _, _, expected)); + cml::CMLMessage::fail(__FILE__, __LINE__, "This ", part2, ii, part3); } // Test the printf formatting functionality by formatting a floating point value. @@ -74,7 +74,7 @@ TEST(CMLMessage, PrintFormat) { const std::string part2 = "is a collection of "; // Test a valid format. - const auto result = CMLMessage::printf_fmt( + const auto result = cml::CMLMessage::printf_fmt( "%12.6g %14.12g %18.12E %15.3f %6d", x, x, x, x, ii); const std::string expected = @@ -82,7 +82,7 @@ TEST(CMLMessage, PrintFormat) { EXPECT_EQ(result, expected); // Test an invalid format. - EXPECT_THAT(CMLMessage::printf_fmt("%Z", "bad format specifier"), HasSubstr("ERROR: invalid printf")); + EXPECT_THAT(cml::CMLMessage::printf_fmt("%Z", "bad format specifier"), HasSubstr("ERROR: invalid printf")); } } diff --git a/models/utilities/cml_message/verif/SIM_verif/include/sample_model.hh b/models/utilities/cml_message/verif/SIM_verif/include/sample_model.hh index 8ee5924d..24668db0 100644 --- a/models/utilities/cml_message/verif/SIM_verif/include/sample_model.hh +++ b/models/utilities/cml_message/verif/SIM_verif/include/sample_model.hh @@ -12,6 +12,8 @@ Programmers: #include #include "cml/models/utilities/cml_message/include/cml_message.hh" + +namespace cml { struct SampleModel { bool terminate {false}; /* (--) If true, will terminate the sim on the next update() call */ @@ -50,4 +52,8 @@ struct SampleModel { } } }; + + +} // namespace cml + #endif diff --git a/models/utilities/color_string/include/color_string.hh b/models/utilities/color_string/include/color_string.hh index edaa39b2..bdf3fb32 100644 --- a/models/utilities/color_string/include/color_string.hh +++ b/models/utilities/color_string/include/color_string.hh @@ -8,6 +8,8 @@ Purpose: (Apply ANSI color codes to strings in order to change the color of the #include +namespace cml { + class ColorString { public: // This set of static casts will turn the inputed text into the @@ -87,4 +89,8 @@ class ColorString { } }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/include/constraint.hh b/models/utilities/constraint_check/include/constraint.hh index 17b856f2..2e5f2a9b 100644 --- a/models/utilities/constraint_check/include/constraint.hh +++ b/models/utilities/constraint_check/include/constraint.hh @@ -23,6 +23,8 @@ PROGRAMMERS: #include "constraint_enum.hh" #include "constraint_test.hh" +namespace cml { + /***************************************************************************** Constraint Purpose: @@ -88,4 +90,8 @@ class Constraint void count_violations(); void post_update(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/constraint_check/include/constraint_enum.hh b/models/utilities/constraint_check/include/constraint_enum.hh index 25384a91..80c5a92a 100644 --- a/models/utilities/constraint_check/include/constraint_enum.hh +++ b/models/utilities/constraint_check/include/constraint_enum.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #ifndef CML_CONSTRAINT_ENUM_HH #define CML_CONSTRAINT_ENUM_HH +namespace cml { + struct ConstraintEnum { @@ -33,4 +35,8 @@ struct ConstraintEnum OpenOpen }; }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/include/constraint_set.hh b/models/utilities/constraint_check/include/constraint_set.hh index 1d6678a3..cb56bca5 100644 --- a/models/utilities/constraint_check/include/constraint_set.hh +++ b/models/utilities/constraint_check/include/constraint_set.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** Name: ConstraintSet Purpose: @@ -57,4 +59,8 @@ class ConstraintSet : public SubscriptionBase void activate() override; static bool constraint_disabled( const Constraint * c); }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/include/constraint_test.hh b/models/utilities/constraint_check/include/constraint_test.hh index fecb9f97..6bd2ec06 100644 --- a/models/utilities/constraint_check/include/constraint_test.hh +++ b/models/utilities/constraint_check/include/constraint_test.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "constraint_enum.hh" +namespace cml { + /***************************************************************************** ConstraintTest Purpose: @@ -132,4 +134,8 @@ class ConstraintTestTimed : public ConstraintTest void initialize_gap_time(); void update_timer(double delta_time); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/constraint_check/include/constraint_test_templates.hh b/models/utilities/constraint_check/include/constraint_test_templates.hh index fc38b121..13bf2b6e 100644 --- a/models/utilities/constraint_check/include/constraint_test_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_templates.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Notes: - The classes defined in here are class-template extensions of @@ -261,4 +263,8 @@ class ConstraintTest_ValSet : public ConstraintTest return violation; } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh index 14a939bf..6fcae1d0 100644 --- a/models/utilities/constraint_check/include/constraint_test_timed_templates.hh +++ b/models/utilities/constraint_check/include/constraint_test_timed_templates.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "constraint_test.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Notes: - The classes defined in here are class-template extensions of @@ -296,4 +298,8 @@ class ConstraintTest_ValSetTimed : public ConstraintTestTimed return violation; } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/constraint_check/include/interval_constraint.hh b/models/utilities/constraint_check/include/interval_constraint.hh index 231bfa8a..e80384eb 100644 --- a/models/utilities/constraint_check/include/interval_constraint.hh +++ b/models/utilities/constraint_check/include/interval_constraint.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /***************************************************************************** Name: IntervalInstantConstraint @@ -213,4 +215,8 @@ class IntervalTimedConstraint : public Constraint IntervalTimedConstraint( const IntervalTimedConstraint &); IntervalTimedConstraint & operator=( const IntervalTimedConstraint &); }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/include/threshold_constraint.hh b/models/utilities/constraint_check/include/threshold_constraint.hh index 9c70bd13..0a3620dc 100644 --- a/models/utilities/constraint_check/include/threshold_constraint.hh +++ b/models/utilities/constraint_check/include/threshold_constraint.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Name: ThresholdInstantConstraint @@ -618,4 +620,8 @@ class ThresholdTimedConstraintSpecData : public Constraint ThresholdTimedConstraintSpecData & operator=( const ThresholdTimedConstraintSpecData &); }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/include/valset_constraint.hh b/models/utilities/constraint_check/include/valset_constraint.hh index acec2ccf..499809e3 100644 --- a/models/utilities/constraint_check/include/valset_constraint.hh +++ b/models/utilities/constraint_check/include/valset_constraint.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /* TODO Turner 2023/03 * Investigate: Can Trick support doubly-templated classes? * I.e. can we use a solidified class-template as the data type for @@ -216,4 +218,8 @@ class ValSetTimedConstraint : public Constraint ValSetTimedConstraint( const ValSetTimedConstraint &); ValSetTimedConstraint & operator=( const ValSetTimedConstraint &); }; + + +} // namespace cml + #endif diff --git a/models/utilities/constraint_check/src/constraint.cc b/models/utilities/constraint_check/src/constraint.cc index 2c14ef01..38b39109 100644 --- a/models/utilities/constraint_check/src/constraint.cc +++ b/models/utilities/constraint_check/src/constraint.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /***************************************************************************** Constructor @@ -123,4 +125,6 @@ Constraint::activate() test->activate(); } active = true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/constraint_check/src/constraint_set.cc b/models/utilities/constraint_check/src/constraint_set.cc index dfd64a59..c702fe8d 100644 --- a/models/utilities/constraint_check/src/constraint_set.cc +++ b/models/utilities/constraint_check/src/constraint_set.cc @@ -13,6 +13,8 @@ #include "../include/constraint_set.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** initialize @@ -67,4 +69,6 @@ bool ConstraintSet::constraint_disabled( const Constraint * c) { return !(c->enabled); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/constraint_check/src/constraint_test.cc b/models/utilities/constraint_check/src/constraint_test.cc index f8e31a1a..a1f892ef 100644 --- a/models/utilities/constraint_check/src/constraint_test.cc +++ b/models/utilities/constraint_check/src/constraint_test.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "../include/constraint_enum.hh" #include "../include/constraint_test.hh" +namespace cml { + /***************************************************************************** Name: set_violation_condition Purpose: @@ -206,4 +208,6 @@ ConstraintTestTimed::update_timer( double delta_time) gap_timer += delta_time; } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/constraint_check/src/constraint_test_templates.cc b/models/utilities/constraint_check/src/constraint_test_templates.cc index 4cf76cba..967040ac 100644 --- a/models/utilities/constraint_check/src/constraint_test_templates.cc +++ b/models/utilities/constraint_check/src/constraint_test_templates.cc @@ -12,6 +12,8 @@ #include "cml/models/utilities/math_utils/include/math_utils.hh" #include "../include/constraint_test_templates.hh" +namespace cml { + /***************************************************************************** Template specializations Purpose: @@ -36,3 +38,6 @@ bool ConstraintTest_Threshold::query_equals( float variable) const static_cast(threshold), equality_threshold)); } + + +} // namespace cml diff --git a/models/utilities/constraint_check/src/constraint_test_timed_templates.cc b/models/utilities/constraint_check/src/constraint_test_timed_templates.cc index b4547909..7cf49ae3 100644 --- a/models/utilities/constraint_check/src/constraint_test_timed_templates.cc +++ b/models/utilities/constraint_check/src/constraint_test_timed_templates.cc @@ -11,6 +11,8 @@ #include "../include/constraint_test_timed_templates.hh" #include +namespace cml { + /***************************************************************************** Template specializations Purpose: @@ -31,3 +33,6 @@ bool ConstraintTest_ThresholdTimed::query_equals( float variable) const { return std::abs(variable-threshold) <= equality_threshold; } + + +} // namespace cml diff --git a/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh b/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh index 2f4ac317..1c1cbf7b 100644 --- a/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh +++ b/models/utilities/constraint_check/verif/SIM_verif/test_constraint_set.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "../../include/threshold_constraint.hh" #include "../../include/interval_constraint.hh" +namespace cml { + // This dummy struct is required to force Trick ICG to generate attributes for // template members of template types when we Trickify CML. We don't actually // use this struct. If you run into similar issues in your sim, you'll need to @@ -183,4 +185,8 @@ class TestConstraintSet TestConstraintSet & operator=( const TestConstraintSet&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/convert_string/include/convert_string.hh b/models/utilities/convert_string/include/convert_string.hh index d46fd509..e0dc7e14 100644 --- a/models/utilities/convert_string/include/convert_string.hh +++ b/models/utilities/convert_string/include/convert_string.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* ConvertString Purpose:(Utility to convert strings to various formats.) @@ -99,4 +101,8 @@ bool ConvertString::convert_numeric(const char* str) { return false; } + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/double_to_words/include/convert_double_to_words.hh b/models/utilities/double_to_words/include/convert_double_to_words.hh index 57d281a0..066b7b47 100644 --- a/models/utilities/double_to_words/include/convert_double_to_words.hh +++ b/models/utilities/double_to_words/include/convert_double_to_words.hh @@ -21,6 +21,8 @@ PROGRAMMERS: #include #include +namespace cml { + void convert_double_to_uint_words( double convert_value, double resolution, std::vector &words, @@ -72,4 +74,8 @@ public: bool check_values(); }; + + +} // namespace cml + #endif diff --git a/models/utilities/double_to_words/src/convert_double_to_uint_words.cc b/models/utilities/double_to_words/src/convert_double_to_uint_words.cc index b2fe2026..e1302610 100644 --- a/models/utilities/double_to_words/src/convert_double_to_uint_words.cc +++ b/models/utilities/double_to_words/src/convert_double_to_uint_words.cc @@ -21,6 +21,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /******************************************************************************* Purpose:(Run the class function that calls the variables and creates the words array that is populated with the converted values for @@ -248,4 +250,6 @@ ConvertDoubleToUintWords::update() return; } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_arch/include/sSensorFaults.hh b/models/utilities/fault_arch/include/sSensorFaults.hh index fd65ad2a..50207d25 100644 --- a/models/utilities/fault_arch/include/sSensorFaults.hh +++ b/models/utilities/fault_arch/include/sSensorFaults.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #include "cml/models/utilities/fault_management/include/fault_manager.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* sSFault Purpose: @@ -65,4 +67,8 @@ class sSensorFaults : public FaultManager const char* fault_name, bool nom_required) override; }; + + +} // namespace cml + #endif diff --git a/models/utilities/fault_arch/src/sSensorFaults.cc b/models/utilities/fault_arch/src/sSensorFaults.cc index ed4214b4..b56bdf3a 100644 --- a/models/utilities/fault_arch/src/sSensorFaults.cc +++ b/models/utilities/fault_arch/src/sSensorFaults.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /******************************************************************************* Injection @@ -377,3 +379,6 @@ bool sSensorFaults::parse_rand_number( FaultRandNumber& rng, return true; } + + +} // namespace cml diff --git a/models/utilities/fault_management/include/fault.hh b/models/utilities/fault_management/include/fault.hh index 126671eb..a4291975 100644 --- a/models/utilities/fault_management/include/fault.hh +++ b/models/utilities/fault_management/include/fault.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "trigger_group.hh" +namespace cml { + /******************************************************************************* Fault Purpose:(Base class for managing fault injection for a single variable.) @@ -77,4 +79,8 @@ friend class FaultManager; The number of times a fire-limited trigger has been triggered. */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/fault_bias.hh b/models/utilities/fault_management/include/fault_bias.hh index 91d2196c..5ed12623 100644 --- a/models/utilities/fault_management/include/fault_bias.hh +++ b/models/utilities/fault_management/include/fault_bias.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "fault.hh" +namespace cml { + /******************************************************************************* FaultBias Purpose:(Manages injection of a bias fault.) @@ -66,4 +68,8 @@ bool FaultBias::set_param(const std::string& param_name, double value, bool r return true; } + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/fault_function.hh b/models/utilities/fault_management/include/fault_function.hh index 9a2321f5..6003b25e 100644 --- a/models/utilities/fault_management/include/fault_function.hh +++ b/models/utilities/fault_management/include/fault_function.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "fault_function_parameter.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* FaultFunctionBase Purpose:(Allows access to most members of FaultFunction without knowing the @@ -144,4 +146,8 @@ template void FaultFunction::overwrite_value() { } } } + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/fault_function_parameter.hh b/models/utilities/fault_management/include/fault_function_parameter.hh index 21bd622e..517dc3da 100644 --- a/models/utilities/fault_management/include/fault_function_parameter.hh +++ b/models/utilities/fault_management/include/fault_function_parameter.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "independent_variable.hh" +namespace cml { + /******************************************************************************* FaultFunctionParameter Purpose:(Returns a parameter that is a linear function of some arbitrary @@ -40,4 +42,8 @@ class FaultFunctionParameter { independent variable is relative, this is the initial value of the parameter. */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/fault_manager.hh b/models/utilities/fault_management/include/fault_manager.hh index 8e409445..edfd89b8 100644 --- a/models/utilities/fault_management/include/fault_manager.hh +++ b/models/utilities/fault_management/include/fault_manager.hh @@ -30,6 +30,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + // Forward declaration class FaultFunctionParameter; @@ -214,4 +216,8 @@ class FaultManager { }; template<> bool FaultManager::generate_random_value(); + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/fault_overwrite.hh b/models/utilities/fault_management/include/fault_overwrite.hh index 71aae4d0..22c9b2ef 100644 --- a/models/utilities/fault_management/include/fault_overwrite.hh +++ b/models/utilities/fault_management/include/fault_overwrite.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #include "fault.hh" +namespace cml { + /******************************************************************************* FaultOverwrite Purpose:(Manages injection of a fixed-value fault.) @@ -63,4 +65,8 @@ template<> bool FaultOverwrite::set_param( const std::string& param_name, double val_, bool reset_nominal); + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/fault_random_walk.hh b/models/utilities/fault_management/include/fault_random_walk.hh index 084574eb..c61bd514 100644 --- a/models/utilities/fault_management/include/fault_random_walk.hh +++ b/models/utilities/fault_management/include/fault_random_walk.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #include "fault.hh" #include "rand_number.hh" +namespace cml { + /******************************************************************************* FaultRandomWalk Purpose:(Manages injection of a random-walk fault.) @@ -83,4 +85,8 @@ bool FaultRandomWalk::set_param(const std::string& param_name, double value, return true; } + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/fault_scale.hh b/models/utilities/fault_management/include/fault_scale.hh index a845333b..ee627476 100644 --- a/models/utilities/fault_management/include/fault_scale.hh +++ b/models/utilities/fault_management/include/fault_scale.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "fault.hh" +namespace cml { + /******************************************************************************* FaultScale Purpose:(Manages injection of a scale-factor fault.) @@ -67,4 +69,8 @@ bool FaultScale::set_param(const std::string& param_name, double value, bool return true; } + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/fault_stale.hh b/models/utilities/fault_management/include/fault_stale.hh index 2c9effa7..1419655f 100644 --- a/models/utilities/fault_management/include/fault_stale.hh +++ b/models/utilities/fault_management/include/fault_stale.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "fault.hh" +namespace cml { + /******************************************************************************* FaultStale Purpose:(Manages injection of a stale-value fault.) @@ -49,4 +51,8 @@ template void FaultStale::overwrite_value() { variable = stale_value; } + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/fault_white_noise.hh b/models/utilities/fault_management/include/fault_white_noise.hh index d8014595..5f8dbf36 100644 --- a/models/utilities/fault_management/include/fault_white_noise.hh +++ b/models/utilities/fault_management/include/fault_white_noise.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #include "fault.hh" #include "rand_number.hh" +namespace cml { + /******************************************************************************* FaultWhiteNoise Purpose:(Manages injection of a white-noise fault.) @@ -73,4 +75,8 @@ bool FaultWhiteNoise::set_param(const std::string& param_name, double value, return true; } + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/include/independent_variable.hh b/models/utilities/fault_management/include/independent_variable.hh index 17040acd..16835a42 100644 --- a/models/utilities/fault_management/include/independent_variable.hh +++ b/models/utilities/fault_management/include/independent_variable.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "untyped_variable.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /******************************************************************************* FaultFunctionIndependentVariable Purpose:(An independent variable for a function. Can be absolute or relative to @@ -62,4 +64,8 @@ template void FaultFunctionIndependentVariable::initialize(T& var) { variable = new UntypedVariable(var); initialized = true; } + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/rand_number.hh b/models/utilities/fault_management/include/rand_number.hh index 21c6edb7..f006085e 100644 --- a/models/utilities/fault_management/include/rand_number.hh +++ b/models/utilities/fault_management/include/rand_number.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #include +namespace cml { + /******************************************************************************* FaultRandNumber Purpose:(Generates random numbers using a Gaussian or uniform distribution.) @@ -58,4 +60,8 @@ class FaultRandNumber { std::mt19937 rng; /* (--) Random number generator. */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/trigger.hh b/models/utilities/fault_management/include/trigger.hh index 1e6c2cb1..888549d7 100644 --- a/models/utilities/fault_management/include/trigger.hh +++ b/models/utilities/fault_management/include/trigger.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/math_utils/include/math_utils.hh" +namespace cml { + /******************************************************************************* TestEqual_Trait Purpose:(Contains an equality test. This test is different for integers than for @@ -377,4 +379,8 @@ template void Trigger::set_periodic(T length, T period) periodic_length = length; periodic_period = period; } + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/trigger_group.hh b/models/utilities/fault_management/include/trigger_group.hh index 81d9add1..2485023d 100644 --- a/models/utilities/fault_management/include/trigger_group.hh +++ b/models/utilities/fault_management/include/trigger_group.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include #include +namespace cml { + /******************************************************************************* TriggerGroup Purpose:(A group of fault triggers.) @@ -45,4 +47,8 @@ class TriggerGroup { List of triggers and whether they are enabled for this group. */ }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/fault_management/include/untyped_variable.hh b/models/utilities/fault_management/include/untyped_variable.hh index 8d260798..a89ceac6 100644 --- a/models/utilities/fault_management/include/untyped_variable.hh +++ b/models/utilities/fault_management/include/untyped_variable.hh @@ -9,6 +9,8 @@ PROGRAMMERS: #ifndef CML_UNTYPED_VARIABLE_HH #define CML_UNTYPED_VARIABLE_HH +namespace cml { + /******************************************************************************* UntypedVariableBase Purpose:(Allows access to a variable's value without knowing its type at compile @@ -39,4 +41,8 @@ template class UntypedVariable : public UntypedVariableBase { T& variable; /* (--) A variable of any type. */ }; + + +} // namespace cml + #endif diff --git a/models/utilities/fault_management/src/fault.cc b/models/utilities/fault_management/src/fault.cc index 91194451..743b3b4a 100644 --- a/models/utilities/fault_management/src/fault.cc +++ b/models/utilities/fault_management/src/fault.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /******************************************************************************* initialize Purpose:(Initializes the fault. This method only sets the initialized flag, but @@ -94,4 +96,6 @@ bool Fault::is_triggered() { was_triggered_last_pass = is_triggered; return is_triggered; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_management/src/fault_function.cc b/models/utilities/fault_management/src/fault_function.cc index 9183c260..41983723 100644 --- a/models/utilities/fault_management/src/fault_function.cc +++ b/models/utilities/fault_management/src/fault_function.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /******************************************************************************* initialize Purpose:(Initializes the fault.) @@ -96,4 +98,6 @@ bool FaultFunctionBase::set_param( const std::string& param_name, } return true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_management/src/fault_function_parameter.cc b/models/utilities/fault_management/src/fault_function_parameter.cc index 8eafe24f..43c319f8 100644 --- a/models/utilities/fault_management/src/fault_function_parameter.cc +++ b/models/utilities/fault_management/src/fault_function_parameter.cc @@ -9,6 +9,8 @@ #include "../include/fault_function_parameter.hh" +namespace cml { + /******************************************************************************* get_value Purpose:(Gets the value of the parameter.) @@ -31,4 +33,6 @@ void FaultFunctionParameter::reset_nominal_with_new_rate( double new_rate) { // ind_variable.get_value() returns zero under this condition, so the // standard evaluation leaves nominal unchanged, as would be expected. nominal = get_value() - new_rate * ind_variable.get_value(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_management/src/fault_manager.cc b/models/utilities/fault_management/src/fault_manager.cc index 07169a39..ee789040 100644 --- a/models/utilities/fault_management/src/fault_manager.cc +++ b/models/utilities/fault_management/src/fault_manager.cc @@ -37,6 +37,8 @@ LIBRARY DEPENDENCIES: #include "trick/parameter_types.h" #include "trick/reference.h" +namespace cml { + bool FaultManager::global_enabled = true; @@ -1742,4 +1744,6 @@ bool FaultManager::parse_rand_number( } return true; -} \ No newline at end of file +} + +} // namespace cml \ No newline at end of file diff --git a/models/utilities/fault_management/src/fault_overwrite.cc b/models/utilities/fault_management/src/fault_overwrite.cc index 2ad724ba..73d4accd 100644 --- a/models/utilities/fault_management/src/fault_overwrite.cc +++ b/models/utilities/fault_management/src/fault_overwrite.cc @@ -10,6 +10,8 @@ #include "../include/fault_overwrite.hh" #include +namespace cml { + /***************************************************************************** Name: set_param Purpose: @@ -33,3 +35,6 @@ bool FaultOverwrite::set_param( const std::string& param_name, // else return Fault::set_param(param_name, val_); } + + +} // namespace cml diff --git a/models/utilities/fault_management/src/independent_variable.cc b/models/utilities/fault_management/src/independent_variable.cc index 1e61441d..0e592269 100644 --- a/models/utilities/fault_management/src/independent_variable.cc +++ b/models/utilities/fault_management/src/independent_variable.cc @@ -9,6 +9,8 @@ #include "../include/independent_variable.hh" +namespace cml { + /***************************************************************************** Destructor *****************************************************************************/ @@ -46,4 +48,6 @@ double FaultFunctionIndependentVariable::get_value() { const double absolute = variable->get_value(); return relative_value ? absolute - relative_value_init : absolute; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_management/src/rand_number.cc b/models/utilities/fault_management/src/rand_number.cc index bedbd0b1..ed6b9d08 100644 --- a/models/utilities/fault_management/src/rand_number.cc +++ b/models/utilities/fault_management/src/rand_number.cc @@ -12,6 +12,8 @@ #include #include +namespace cml { + /******************************************************************************* initialize Purpose:(Seeds the random number generator.) @@ -89,4 +91,6 @@ double FaultRandNumber::get_random_number() } return rand_number; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/fault_management/src/trigger_group.cc b/models/utilities/fault_management/src/trigger_group.cc index 64e3f0a7..e9143be2 100644 --- a/models/utilities/fault_management/src/trigger_group.cc +++ b/models/utilities/fault_management/src/trigger_group.cc @@ -11,6 +11,8 @@ #include #include +namespace cml { + /******************************************************************************* operate Purpose:(Determines whether all of the triggers are triggered.) @@ -62,3 +64,6 @@ bool TriggerGroup::set_trigger_enable( const std::string & trigger_name, return trigger_found; } + + +} // namespace cml diff --git a/models/utilities/math_utils/include/ellipsoid_intersection.hh b/models/utilities/math_utils/include/ellipsoid_intersection.hh index 40c8a920..cc60d7ad 100644 --- a/models/utilities/math_utils/include/ellipsoid_intersection.hh +++ b/models/utilities/math_utils/include/ellipsoid_intersection.hh @@ -25,6 +25,8 @@ NOTES: #include "quadratic_solver.hh" #include "std_array_ops.hh" +namespace cml { + class EllipsoidIntersection{ private: const double (&end1)[3]; /* (m) @@ -108,4 +110,8 @@ Algorithm: EllipsoidIntersection( const EllipsoidIntersection&); EllipsoidIntersection& operator= (const EllipsoidIntersection&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/math_utils/include/math_utils.hh b/models/utilities/math_utils/include/math_utils.hh index c3f88dcd..0ebbefd3 100644 --- a/models/utilities/math_utils/include/math_utils.hh +++ b/models/utilities/math_utils/include/math_utils.hh @@ -28,6 +28,8 @@ #include "cml/models/utilities/math_utils/include/math_utils_private.hh" +namespace cml { + class MathUtils : private MathUtilsPrivate { @@ -1003,4 +1005,8 @@ template<> bool MathUtils::is_equal( double val1, double val2); template<> bool MathUtils::is_within_abs_tolerance( bool val1, bool val2, bool tol); template<> bool MathUtils::is_within_rel_tolerance( bool value, bool expected, double tol); + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/math_utils/include/math_utils_private.hh b/models/utilities/math_utils/include/math_utils_private.hh index 16e22ee9..17b711a8 100644 --- a/models/utilities/math_utils/include/math_utils_private.hh +++ b/models/utilities/math_utils/include/math_utils_private.hh @@ -9,6 +9,8 @@ #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + class MathUtilsPrivate { protected: @@ -193,4 +195,8 @@ class MathUtilsPrivate { return res; } }; + + +} // namespace cml + #endif diff --git a/models/utilities/math_utils/include/quadratic_solver.hh b/models/utilities/math_utils/include/quadratic_solver.hh index 96bfc9da..f0a160d9 100644 --- a/models/utilities/math_utils/include/quadratic_solver.hh +++ b/models/utilities/math_utils/include/quadratic_solver.hh @@ -10,6 +10,8 @@ PROGRAMMERS: #ifndef CML_QUADRATIC_SOLVER_HH #define CML_QUADRATIC_SOLVER_HH +namespace cml { + class QuadraticSolver { public: @@ -29,4 +31,8 @@ class QuadraticSolver { bool solve( bool compute_roots = true); }; + + +} // namespace cml + #endif diff --git a/models/utilities/math_utils/include/std_array_ops.hh b/models/utilities/math_utils/include/std_array_ops.hh index 6207a9ea..80d1cb2d 100644 --- a/models/utilities/math_utils/include/std_array_ops.hh +++ b/models/utilities/math_utils/include/std_array_ops.hh @@ -18,6 +18,8 @@ PROGRAMMERS: #include #include "math_utils.hh" +namespace cml { + /******************************************************************************* * Insertion * std::cout << some_std_arr << std::endl; @@ -514,5 +516,8 @@ std::array operator/(const double (&lhs)[N], std::array&& return result; } +} // namespace cml + #endif + #endif diff --git a/models/utilities/math_utils/src/math_utils.cc b/models/utilities/math_utils/src/math_utils.cc index 0598fc34..f7e0b616 100644 --- a/models/utilities/math_utils/src/math_utils.cc +++ b/models/utilities/math_utils/src/math_utils.cc @@ -32,6 +32,8 @@ #include "../include/math_utils.hh" +namespace cml { + /******************************************************************************* generate_inertial_to_lvlh Purpose:( Generates the transfromation matrix from inertial to LVLH given @@ -1023,4 +1025,6 @@ template<> bool MathUtils::is_within_rel_tolerance( bool value, bool expected, double tol) { return is_within_abs_tolerance(value, expected, static_cast(tol)); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/math_utils/src/quadratic_solver.cc b/models/utilities/math_utils/src/quadratic_solver.cc index 381c6865..b03a5a8e 100644 --- a/models/utilities/math_utils/src/quadratic_solver.cc +++ b/models/utilities/math_utils/src/quadratic_solver.cc @@ -9,6 +9,8 @@ PURPOSE: ( Setup and solution using the quadratic formula.) #include #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -94,3 +96,6 @@ bool QuadraticSolver::solve( bool compute_roots) } return roots_exist; } + + +} // namespace cml diff --git a/models/utilities/polygon_enclosure/include/polygon_enclosure.hh b/models/utilities/polygon_enclosure/include/polygon_enclosure.hh index 1f13f817..661d9681 100644 --- a/models/utilities/polygon_enclosure/include/polygon_enclosure.hh +++ b/models/utilities/polygon_enclosure/include/polygon_enclosure.hh @@ -27,6 +27,8 @@ PROGRAMMERS: #include #include +namespace cml { + template class PolygonEnclosure { @@ -250,4 +252,8 @@ Purpose: PolygonEnclosure( const PolygonEnclosure &); PolygonEnclosure& operator=( const PolygonEnclosure&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/polygon_enclosure/include/polygon_enclosure_sphere.hh b/models/utilities/polygon_enclosure/include/polygon_enclosure_sphere.hh index 4023422d..c0d67c4b 100644 --- a/models/utilities/polygon_enclosure/include/polygon_enclosure_sphere.hh +++ b/models/utilities/polygon_enclosure/include/polygon_enclosure_sphere.hh @@ -26,6 +26,8 @@ PROGRAMMERS: #include #include +namespace cml { + template class PolygonEnclosureSphere { @@ -601,4 +603,8 @@ Purpose: PolygonEnclosureSphere( const PolygonEnclosureSphere &); PolygonEnclosureSphere& operator=( const PolygonEnclosureSphere&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/sim_speed_monitor/include/sim_speed_monitor.hh b/models/utilities/sim_speed_monitor/include/sim_speed_monitor.hh index 3e726fa8..e6ff36ec 100644 --- a/models/utilities/sim_speed_monitor/include/sim_speed_monitor.hh +++ b/models/utilities/sim_speed_monitor/include/sim_speed_monitor.hh @@ -14,6 +14,8 @@ #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include "cml/models/utilities/math_utils/include/math_utils.hh" +namespace cml { + class SimSpeedMonitor : public SubscriptionBase { protected: #ifndef SWIG @@ -66,4 +68,8 @@ class SimSpeedMonitor : public SubscriptionBase { SimSpeedMonitor (const SimSpeedMonitor&); SimSpeedMonitor& operator = (const SimSpeedMonitor&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/subscriptions/include/subscriptions.hh b/models/utilities/subscriptions/include/subscriptions.hh index 8c28a4f9..cbb8418a 100644 --- a/models/utilities/subscriptions/include/subscriptions.hh +++ b/models/utilities/subscriptions/include/subscriptions.hh @@ -20,6 +20,8 @@ #include +namespace cml { + /** * Provides a subscription baseline for all models * @@ -164,4 +166,8 @@ class SubscriptionBase { */ virtual void deactivate(){active = false;} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/subscriptions/src/subscriptions.cc b/models/utilities/subscriptions/src/subscriptions.cc index bcb177c2..fc07bae1 100644 --- a/models/utilities/subscriptions/src/subscriptions.cc +++ b/models/utilities/subscriptions/src/subscriptions.cc @@ -11,6 +11,8 @@ #include "../include/subscriptions.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + // Instructs this model to turn itself on if everything is configured correctly void SubscriptionBase::subscribe() @@ -175,3 +177,6 @@ SubscriptionBase::subscribe_internal() num_subscriptions=0; } } + + +} // namespace cml diff --git a/models/utilities/subscriptions/verif/SIM_unit_subs/test_class.hh b/models/utilities/subscriptions/verif/SIM_unit_subs/test_class.hh index 9e920a0e..8a1bb1be 100644 --- a/models/utilities/subscriptions/verif/SIM_unit_subs/test_class.hh +++ b/models/utilities/subscriptions/verif/SIM_unit_subs/test_class.hh @@ -13,6 +13,8 @@ PROGRAMMERS: #include #include "../../include/subscriptions.hh" +namespace cml { + class SubscriptionTestClass : public SubscriptionBase { public: @@ -25,4 +27,8 @@ class SubscriptionTestClass : public SubscriptionBase std::cout << "******** ACTIVATION FAILS ********\n\n"; } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/table_interp_cpp/include/abstract_table_lookup.hh b/models/utilities/table_interp_cpp/include/abstract_table_lookup.hh index 2603aa5a..35f428dc 100644 --- a/models/utilities/table_interp_cpp/include/abstract_table_lookup.hh +++ b/models/utilities/table_interp_cpp/include/abstract_table_lookup.hh @@ -32,6 +32,8 @@ PROGRAMMERS: #include #include +namespace cml { + class AbstractTableLookup : public SubscriptionBase { public: @@ -109,4 +111,8 @@ protected: virtual TableIndependentVariable* lookup_independent( const std::string &var_name); }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/generic_multi_input_table.hh b/models/utilities/table_interp_cpp/include/generic_multi_input_table.hh index 70f68047..cb74c9a4 100644 --- a/models/utilities/table_interp_cpp/include/generic_multi_input_table.hh +++ b/models/utilities/table_interp_cpp/include/generic_multi_input_table.hh @@ -22,6 +22,8 @@ #include "table_independent_variable.hh" #include "table_type_defs.hh" +namespace cml { + /***************************************************************************** GenericMultiInputTable @@ -134,4 +136,8 @@ class GenericMultiInputTable GenericMultiInputTable (const GenericMultiInputTable&); GenericMultiInputTable& operator = (const GenericMultiInputTable&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/generic_single_input_table.hh b/models/utilities/table_interp_cpp/include/generic_single_input_table.hh index 73d142aa..0f7716f5 100644 --- a/models/utilities/table_interp_cpp/include/generic_single_input_table.hh +++ b/models/utilities/table_interp_cpp/include/generic_single_input_table.hh @@ -20,6 +20,8 @@ #include "generic_multi_input_table.hh" +namespace cml { + class GenericSingleInputTable : public GenericMultiInputTable { friend class SingleInputTableVarDeriv; @@ -33,4 +35,8 @@ class GenericSingleInputTable : public GenericMultiInputTable void generate_base_values() override; bool generate_output() override; }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/quaternion_spherical_interpolator.hh b/models/utilities/table_interp_cpp/include/quaternion_spherical_interpolator.hh index b9850239..a30f56fb 100644 --- a/models/utilities/table_interp_cpp/include/quaternion_spherical_interpolator.hh +++ b/models/utilities/table_interp_cpp/include/quaternion_spherical_interpolator.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "jeod/models/utils/quaternion/include/quat.hh" +namespace cml { + // NOTE - this does not attempt to get any values or put any values anywhere. // It is the responsibility of the table to populate and extract data // from this class because the table class knows where the @@ -62,4 +64,8 @@ class QuaternionSphericalInterpolator void set_epsilon_interp( double new_epsilon); void set_epsilon_delta( double new_epsilon); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/table_interp_cpp/include/simple_table_lookup.hh b/models/utilities/table_interp_cpp/include/simple_table_lookup.hh index f6d5e0c6..efa84cb9 100644 --- a/models/utilities/table_interp_cpp/include/simple_table_lookup.hh +++ b/models/utilities/table_interp_cpp/include/simple_table_lookup.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "table_type_defs.hh" #include +namespace cml { + // This class provides the simple, most used lookup case where one independent // variable is used as the basis for one-to-many dependent variables. @@ -126,4 +128,8 @@ public: void initialize() override; GenericMultiInputTable * get_table(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/table_interp_cpp/include/single_input_table_for_angles.hh b/models/utilities/table_interp_cpp/include/single_input_table_for_angles.hh index b6daeda5..e5671574 100644 --- a/models/utilities/table_interp_cpp/include/single_input_table_for_angles.hh +++ b/models/utilities/table_interp_cpp/include/single_input_table_for_angles.hh @@ -30,6 +30,8 @@ PROGRAMMERS: #include "cml/models/utilities/table_interp_cpp/include/table_type_defs.hh" #include "generic_single_input_table.hh" +namespace cml { + class SingleInputTableForAngles : public GenericSingleInputTable { public: @@ -58,4 +60,8 @@ class SingleInputTableForAngles : public GenericSingleInputTable bool generate_output() override; void bound_to_half_circle( double & angle) const; }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/single_input_table_for_quaternions.hh b/models/utilities/table_interp_cpp/include/single_input_table_for_quaternions.hh index b4c24559..ed9e26fb 100644 --- a/models/utilities/table_interp_cpp/include/single_input_table_for_quaternions.hh +++ b/models/utilities/table_interp_cpp/include/single_input_table_for_quaternions.hh @@ -29,6 +29,8 @@ PROGRAMMERS: #include "quaternion_spherical_interpolator.hh" #include +namespace cml { + class SingleInputTableForQuaternions : public GenericSingleInputTable { protected: @@ -61,4 +63,8 @@ class SingleInputTableForQuaternions : public GenericSingleInputTable protected: bool generate_output() override; }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/single_input_table_var_with_deriv.hh b/models/utilities/table_interp_cpp/include/single_input_table_var_with_deriv.hh index b8932cb1..4c7f7fcb 100644 --- a/models/utilities/table_interp_cpp/include/single_input_table_var_with_deriv.hh +++ b/models/utilities/table_interp_cpp/include/single_input_table_var_with_deriv.hh @@ -25,6 +25,8 @@ #include "generic_single_input_table.hh" #include +namespace cml { + class SingleInputTableVarDeriv : public GenericSingleInputTable { public: @@ -73,4 +75,8 @@ class SingleInputTableVarDeriv : public GenericSingleInputTable protected: bool generate_output() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/table_interp_cpp/include/table_independent_variable.hh b/models/utilities/table_interp_cpp/include/table_independent_variable.hh index 37403cdd..d6d04489 100644 --- a/models/utilities/table_interp_cpp/include/table_independent_variable.hh +++ b/models/utilities/table_interp_cpp/include/table_independent_variable.hh @@ -22,6 +22,8 @@ PROGRAMMERS: #include "table_type_defs.hh" +namespace cml { + /***************************************************************************** TableIndependentVariable @@ -243,4 +245,8 @@ private: TableIndependentVariable::LookupMethod>; using IndepPairVec = std::vector; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/table_lookup__transpose_data.hh b/models/utilities/table_interp_cpp/include/table_lookup__transpose_data.hh index bd85269d..fa74e997 100644 --- a/models/utilities/table_interp_cpp/include/table_lookup__transpose_data.hh +++ b/models/utilities/table_interp_cpp/include/table_lookup__transpose_data.hh @@ -37,6 +37,8 @@ PROGRAMMERS: #include "abstract_table_lookup.hh" #include "table_type_defs.hh" +namespace cml { + /***************************************************************************** TableLookupTransposeDataSet_TableConfig @@ -170,4 +172,8 @@ class TableLookupTransposeDataSet : public TableLookupSet private: void check_independent(); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/table_interp_cpp/include/table_lookup_set.hh b/models/utilities/table_interp_cpp/include/table_lookup_set.hh index 9f6a18a9..99883e44 100644 --- a/models/utilities/table_interp_cpp/include/table_lookup_set.hh +++ b/models/utilities/table_interp_cpp/include/table_lookup_set.hh @@ -20,6 +20,8 @@ PROGRAMMERS: #include "generic_multi_input_table.hh" #include "table_independent_variable.hh" +namespace cml { + class TableLookupSet : public AbstractTableLookup { public: @@ -90,4 +92,8 @@ public: TableIndependentVariable* lookup_independent( const std::string &var_name) override; }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/include/table_type_defs.hh b/models/utilities/table_interp_cpp/include/table_type_defs.hh index 293cdbe4..6fa532f6 100644 --- a/models/utilities/table_interp_cpp/include/table_type_defs.hh +++ b/models/utilities/table_interp_cpp/include/table_type_defs.hh @@ -12,8 +12,14 @@ #include #include +namespace cml { + using SizeVec = std::vector; using DoubleVec = std::vector; using DoublePtrVec = std::vector; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/src/abstract_table_lookup.cc b/models/utilities/table_interp_cpp/src/abstract_table_lookup.cc index 4e5ccb3e..666e4adb 100644 --- a/models/utilities/table_interp_cpp/src/abstract_table_lookup.cc +++ b/models/utilities/table_interp_cpp/src/abstract_table_lookup.cc @@ -33,6 +33,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -445,4 +447,6 @@ AbstractTableLookup::enable_table_interp( if (it != tables.end()) { it->second = flag; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/generic_multi_input_table.cc b/models/utilities/table_interp_cpp/src/generic_multi_input_table.cc index 32aa4f0c..fd3b9f90 100644 --- a/models/utilities/table_interp_cpp/src/generic_multi_input_table.cc +++ b/models/utilities/table_interp_cpp/src/generic_multi_input_table.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "../include/table_type_defs.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + // NOTE - using [index] rather than .at(index) to index STL-vectors primarily // because doing so is much faster. // The .at(index) notation is generally considered safer because it @@ -1047,4 +1049,6 @@ GenericMultiInputTable::index_checks( idx_stop = data.size() - 1; } return false; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/generic_single_input_table.cc b/models/utilities/table_interp_cpp/src/generic_single_input_table.cc index 25197f12..413636e4 100644 --- a/models/utilities/table_interp_cpp/src/generic_single_input_table.cc +++ b/models/utilities/table_interp_cpp/src/generic_single_input_table.cc @@ -19,6 +19,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /***************************************************************************** Constructors omitted @@ -180,3 +182,6 @@ GenericSingleInputTable::generate_output() } return true; } + + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/quaternion_spherical_interpolator.cc b/models/utilities/table_interp_cpp/src/quaternion_spherical_interpolator.cc index 51e78d45..41051e21 100644 --- a/models/utilities/table_interp_cpp/src/quaternion_spherical_interpolator.cc +++ b/models/utilities/table_interp_cpp/src/quaternion_spherical_interpolator.cc @@ -16,6 +16,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "jeod/models/utils/math/include/vector3.hh" +namespace cml { + /***************************************************************************** update Purpose:(main method) @@ -180,4 +182,6 @@ QuaternionSphericalInterpolator::set_epsilon_delta( double new_epsilon) else { epsilon_delta = new_epsilon; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/simple_table_lookup.cc b/models/utilities/table_interp_cpp/src/simple_table_lookup.cc index 89e1c659..9c3e16e2 100644 --- a/models/utilities/table_interp_cpp/src/simple_table_lookup.cc +++ b/models/utilities/table_interp_cpp/src/simple_table_lookup.cc @@ -24,6 +24,8 @@ LIBRARY DEPENDENCIES: #include "../include/table_independent_variable.hh" #include "../include/table_type_defs.hh" +namespace cml { + /***************************************************************************** load_independent_data Purpose:(Create the table-variable and populate it with independent-variable @@ -463,4 +465,6 @@ SimpleTableLookup::get_table() } return tables[0].first; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/single_input_table_for_angles.cc b/models/utilities/table_interp_cpp/src/single_input_table_for_angles.cc index 12e01121..e73518e4 100644 --- a/models/utilities/table_interp_cpp/src/single_input_table_for_angles.cc +++ b/models/utilities/table_interp_cpp/src/single_input_table_for_angles.cc @@ -26,6 +26,8 @@ #include "../include/table_type_defs.hh" #include "../include/single_input_table_for_angles.hh" +namespace cml { + /***************************************************************************** Constructors @@ -164,3 +166,6 @@ SingleInputTableForAngles::bound_to_half_circle( angle += 2 * half_circle; } } + + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/single_input_table_for_quaternions.cc b/models/utilities/table_interp_cpp/src/single_input_table_for_quaternions.cc index cc768d39..7d9e257e 100644 --- a/models/utilities/table_interp_cpp/src/single_input_table_for_quaternions.cc +++ b/models/utilities/table_interp_cpp/src/single_input_table_for_quaternions.cc @@ -27,6 +27,8 @@ LIBRARY DEPENDENCIES: #include "jeod/models/utils/quaternion/include/quat.hh" #include +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -124,3 +126,6 @@ SingleInputTableForQuaternions::generate_output() return true; } + + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/single_input_table_var_with_deriv.cc b/models/utilities/table_interp_cpp/src/single_input_table_var_with_deriv.cc index 5044ae6c..a824d93f 100644 --- a/models/utilities/table_interp_cpp/src/single_input_table_var_with_deriv.cc +++ b/models/utilities/table_interp_cpp/src/single_input_table_var_with_deriv.cc @@ -22,6 +22,8 @@ #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /***************************************************************************** Constructor @@ -197,4 +199,6 @@ SingleInputTableVarDeriv::generate_output() } } return true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/table_independent_variable.cc b/models/utilities/table_interp_cpp/src/table_independent_variable.cc index f2060822..384b4258 100644 --- a/models/utilities/table_interp_cpp/src/table_independent_variable.cc +++ b/models/utilities/table_interp_cpp/src/table_independent_variable.cc @@ -24,6 +24,8 @@ LIBRARY DEPENDENCIES: #include "../include/table_independent_variable.hh" +namespace cml { + /***************************************************************************** TableIndependentVariable Constructors @@ -654,3 +656,6 @@ TableIndependentVariable::check_monotonicity( delta = max_value - min_value; return true; } + + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/table_lookup__transpose_data.cc b/models/utilities/table_interp_cpp/src/table_lookup__transpose_data.cc index 4551bc39..f0ef6e5e 100644 --- a/models/utilities/table_interp_cpp/src/table_lookup__transpose_data.cc +++ b/models/utilities/table_interp_cpp/src/table_lookup__transpose_data.cc @@ -37,6 +37,8 @@ LIBRARY DEPENDENCIES: #include "../include/table_type_defs.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** initialize Purpose: @@ -552,4 +554,6 @@ TableLookupTransposeDataSet::remove_config( table_config.erase(table_config.begin() + static_cast(ix_del)); } return true; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/src/table_lookup_set.cc b/models/utilities/table_interp_cpp/src/table_lookup_set.cc index b9ee5a65..13bbe583 100644 --- a/models/utilities/table_interp_cpp/src/table_lookup_set.cc +++ b/models/utilities/table_interp_cpp/src/table_lookup_set.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include "../include/table_lookup_set.hh" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + /***************************************************************************** Constructor @@ -295,4 +297,6 @@ TableLookupSet::lookup_independent( "table-set.\n"); } return ret; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/utilities/table_interp_cpp/test/table_independent_variable_test.cc b/models/utilities/table_interp_cpp/test/table_independent_variable_test.cc index 4e1be9c4..7d030eff 100644 --- a/models/utilities/table_interp_cpp/test/table_independent_variable_test.cc +++ b/models/utilities/table_interp_cpp/test/table_independent_variable_test.cc @@ -19,10 +19,10 @@ TEST(TableIndependentVariable, Construction) { double variable {}; const double eps = 1.0e-9; - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; { - TableIndependentVariable article(variable, eps); + cml::TableIndependentVariable article(variable, eps); EXPECT_TRUE(article.get_name().empty()); const std::string name = "VarName"; @@ -31,27 +31,27 @@ TEST(TableIndependentVariable, Construction) { } { const std::string name = "VarName"; - TableIndependentVariable article(name, variable, eps); + cml::TableIndependentVariable article(name, variable, eps); EXPECT_EQ(name, article.get_name()); // The model will complain, but will let us change the name. const std::string new_name = "DifferentName"; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Warning, _, _, HasSubstr("set_name warning"))); + publish(cml::CMLMessage::Warning, _, _, HasSubstr("set_name warning"))); article.set_name(new_name); EXPECT_EQ(new_name, article.get_name()); } { - TableIndependentVariable article(variable, TableIndependentVariable::Linear, eps); + cml::TableIndependentVariable article(variable, cml::TableIndependentVariable::Linear, eps); EXPECT_TRUE(article.get_name().empty()); } { const std::string name = "VarName"; - TableIndependentVariable article( + cml::TableIndependentVariable article( name, variable, - TableIndependentVariable::WrapAround, + cml::TableIndependentVariable::WrapAround, eps); EXPECT_EQ(name, article.get_name()); } @@ -63,50 +63,50 @@ TEST(TableIndependentVariable, LoadInvalidData) { using testing::HasSubstr; double variable {}; - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); // Initializing before loading any data. { - CMLMessage::Mock cml_message_mock; - EXPECT_CALL(cml_message_mock, publish(CMLMessage::Error, _, _, _)); + cml::CMLMessage::Mock cml_message_mock; + EXPECT_CALL(cml_message_mock, publish(cml::CMLMessage::Error, _, _, _)); EXPECT_FALSE(article.initialize()); } // Biasing and scaling before loading any data. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Warning, _, _, HasSubstr("data has not yet been loaded"))).Times(2); + publish(cml::CMLMessage::Warning, _, _, HasSubstr("data has not yet been loaded"))).Times(2); article.bias_data(2.0, 0, 10); article.scale_data(2.0, 0, 10); } // Updating before loading any data. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("has not been initialized"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("has not been initialized"))); EXPECT_FALSE(article.update()); } // Bad pointer. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("cannot be NULL"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("cannot be NULL"))); EXPECT_FALSE(article.load_data(nullptr, 100)); EXPECT_FALSE(article.is_data_loaded()); } // Bad data size. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("must be > 0"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("must be > 0"))); const double some_data[] {0.0, 1.0, 2.0}; EXPECT_FALSE(article.load_data(some_data, 0)); EXPECT_FALSE(article.is_data_loaded()); @@ -114,10 +114,10 @@ TEST(TableIndependentVariable, LoadInvalidData) { // Empty data. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("Data must not be empty"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("Data must not be empty"))); const std::vector empty_data {}; EXPECT_FALSE(article.load_data(empty_data)); EXPECT_FALSE(article.is_data_loaded()); @@ -125,10 +125,10 @@ TEST(TableIndependentVariable, LoadInvalidData) { // Non-monotonic data. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("direction of increasing values"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("direction of increasing values"))); const std::vector non_monotonic_data {0.0, -1.0, 2.0, 0.0, 3.0}; EXPECT_FALSE(article.load_data(non_monotonic_data)); EXPECT_FALSE(article.is_data_loaded()); @@ -136,10 +136,10 @@ TEST(TableIndependentVariable, LoadInvalidData) { // Duplicated values. { - CMLMessage::Mock cml_message_mock; + cml::CMLMessage::Mock cml_message_mock; EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("identical"))); + publish(cml::CMLMessage::Error, _, _, HasSubstr("identical"))); const std::vector duplicated_data {1.0, 1.0, 1.0}; EXPECT_FALSE(article.load_data(duplicated_data)); EXPECT_FALSE(article.is_data_loaded()); @@ -152,7 +152,7 @@ TEST(TableIndependentVariable, ReloadData) { using ::testing::Pointwise; double variable {}; - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); const std::vector dataset1 {1.0, 2.0, 3.0}; EXPECT_TRUE(article.load_data(dataset1)); @@ -188,7 +188,7 @@ TEST(TableIndependentVariable, BiasAndScale) { const std::vector expected_data {2.1, 4.1, 6.1, 8.1}; { - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); article.load_data(breakpoints); article.scale_data(2.0); @@ -199,13 +199,13 @@ TEST(TableIndependentVariable, BiasAndScale) { // Same as the previous case except we mix up the upper and lower indices. // The model will graciously swap these values and still apply our bias // and scale factor. - CMLMessage::Mock cml_message_mock; - TableIndependentVariable article(variable); + cml::CMLMessage::Mock cml_message_mock; + cml::TableIndependentVariable article(variable); article.load_data(breakpoints); EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Warning, _, _, HasSubstr("higher than the stop index"))).Times(2); + publish(cml::CMLMessage::Warning, _, _, HasSubstr("higher than the stop index"))).Times(2); article.scale_data(2.0, breakpoints.size() - 1, 0); article.bias_data(0.1, breakpoints.size() - 1, 0); EXPECT_THAT(article.data, Pointwise(DoubleNear(1e-3), expected_data)); @@ -221,18 +221,18 @@ TEST(TableIndependentVariable, BiasAndScale) { // // The model will reject these attempts and leave the original breakpoints // unchanged. - CMLMessage::Mock cml_message_mock; - TableIndependentVariable article(variable); + cml::CMLMessage::Mock cml_message_mock; + cml::TableIndependentVariable article(variable); article.load_data(breakpoints); // We're expecting error messages from the monotonicity check and the // bias/scaling functions. EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("direction of increasing values"))).Times(2); + publish(cml::CMLMessage::Error, _, _, HasSubstr("direction of increasing values"))).Times(2); EXPECT_CALL( cml_message_mock, - publish(CMLMessage::Error, _, _, HasSubstr("would result in an invalid data set"))).Times(2); + publish(cml::CMLMessage::Error, _, _, HasSubstr("would result in an invalid data set"))).Times(2); article.scale_data(0.1, breakpoints.size() - 1); EXPECT_THAT(article.data, Pointwise(DoubleNear(1e-3), breakpoints)); @@ -245,7 +245,7 @@ TEST(TableIndependentVariable, BiasAndScale) { // Test data that's off the table's front and back. TEST(TableIndependentVariable, OffTable) { double variable {}; - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); std::vector breakpoints {0.0, 1.0, 2.0}; article.load_data(breakpoints); @@ -276,7 +276,7 @@ TEST(TableIndependentVariable, OffTable) { TEST(TableIndependentVariable, OneBreakpoint) { double variable {}; const std::vector breakpoints {1.0}; - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); article.load_data(breakpoints); article.initialize(); @@ -301,7 +301,7 @@ TEST(TableIndependentVariable, OneBreakpoint) { // Test various lookups with a data size of 2. TEST(TableIndependentVariable, TwoBreakpoints) { double variable {}; - TableIndependentVariable article(variable); + cml::TableIndependentVariable article(variable); const std::vector breakpoints {0.0, 1.0}; article.load_data(breakpoints); @@ -340,7 +340,7 @@ TEST(TableIndependentVariable, TwoBreakpoints) { TEST(TableIndependentVariable, WrapAroundContinuity) { double variable {}; const double eps = 1e-3; - TableIndependentVariable article(variable, TableIndependentVariable::WrapAround, eps); + cml::TableIndependentVariable article(variable, cml::TableIndependentVariable::WrapAround, eps); // Set breakpoints starting at 0 and ending at 2 with an interval of 0.1. // The large number of breakpoints exercises the binary search functionality. diff --git a/models/utilities/table_interp_cpp/verif/SIM_01a_table_lookup_set_nominal/include/test_model.hh b/models/utilities/table_interp_cpp/verif/SIM_01a_table_lookup_set_nominal/include/test_model.hh index 7dffe92b..f742e9b4 100644 --- a/models/utilities/table_interp_cpp/verif/SIM_01a_table_lookup_set_nominal/include/test_model.hh +++ b/models/utilities/table_interp_cpp/verif/SIM_01a_table_lookup_set_nominal/include/test_model.hh @@ -27,6 +27,8 @@ PROGRAMMERS: #include "../../../include/table_lookup_set.hh" #include "../../../include/table_independent_variable.hh" +namespace cml { + class TestModelBase { public: @@ -472,4 +474,8 @@ private: TestModelPreInstantiated (const TestModelPreInstantiated&); TestModelPreInstantiated& operator = (const TestModelPreInstantiated&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/table_interp_cpp/verif/SIM_03_simple_table_lookup_for_angles/include/test_model.hh b/models/utilities/table_interp_cpp/verif/SIM_03_simple_table_lookup_for_angles/include/test_model.hh index 7bae3571..9279d67a 100644 --- a/models/utilities/table_interp_cpp/verif/SIM_03_simple_table_lookup_for_angles/include/test_model.hh +++ b/models/utilities/table_interp_cpp/verif/SIM_03_simple_table_lookup_for_angles/include/test_model.hh @@ -15,6 +15,8 @@ PROGRAMMERS: #include "../../../include/simple_angle_table_lookup.hh" +namespace cml { + class TestModel { public: SimpleAngleTableLookup lookup; @@ -67,4 +69,8 @@ private: TestModel& operator = (const TestModel&); }; + + +} // namespace cml + #endif diff --git a/models/utilities/trick_logging/include/trick_logging.hh b/models/utilities/trick_logging/include/trick_logging.hh index 4253d312..a265bed6 100644 --- a/models/utilities/trick_logging/include/trick_logging.hh +++ b/models/utilities/trick_logging/include/trick_logging.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include "trick/exec_proto.h" #include "cml/models/utilities/cml_message/include/cml_message.hh" +namespace cml { + class TrickLogging { public: std::list group_list; @@ -225,4 +227,8 @@ class TrickLogging { return nullptr; } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/utilities/xml_helper/include/xml_helper.hh b/models/utilities/xml_helper/include/xml_helper.hh index be5f3172..e2a5618f 100644 --- a/models/utilities/xml_helper/include/xml_helper.hh +++ b/models/utilities/xml_helper/include/xml_helper.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include +namespace cml { + class XmlHelper { public: static xmlNodePtr xml_find( xmlNodePtr node, const char* name); @@ -31,4 +33,8 @@ class XmlHelper { static const char * xml_convert_ptr (const unsigned char * ptr); }; + + +} // namespace cml + #endif diff --git a/models/utilities/xml_helper/src/xml_helper.cc b/models/utilities/xml_helper/src/xml_helper.cc index 5c8e8939..91d3345c 100644 --- a/models/utilities/xml_helper/src/xml_helper.cc +++ b/models/utilities/xml_helper/src/xml_helper.cc @@ -13,6 +13,8 @@ #include #include +namespace cml { + /******************************************************************************* xml_find Purpose:(Finds an XML node with the given name at the same level as the @@ -150,3 +152,6 @@ const char * XmlHelper::xml_convert_ptr( const unsigned char* ptr) { return reinterpret_cast(ptr); } + + +} // namespace cml diff --git a/models/utilities/xml_helper/verif/SIM_verif/include/test.hh b/models/utilities/xml_helper/verif/SIM_verif/include/test.hh index 9a872d98..428c9e9f 100644 --- a/models/utilities/xml_helper/verif/SIM_verif/include/test.hh +++ b/models/utilities/xml_helper/verif/SIM_verif/include/test.hh @@ -16,6 +16,8 @@ #include "cml/models/utilities/xml_helper/include/xml_helper.hh" +namespace cml { + struct XmlHelperTester { std::string filename; @@ -228,4 +230,8 @@ struct XmlHelperTester { } }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/commandable_action/include/commandable_action.hh b/models/vehicle_management/commandable_action/include/commandable_action.hh index 9011862a..16d384b8 100644 --- a/models/vehicle_management/commandable_action/include/commandable_action.hh +++ b/models/vehicle_management/commandable_action/include/commandable_action.hh @@ -41,6 +41,8 @@ PROGRAMMERS: #include "commandable_action_set.hh" +namespace cml { + /***************************************************************************** CommandableAction Purpose:( @@ -101,4 +103,8 @@ class CommandableAction void disable() {enabled = false;} std::string & get_name() {return name;} }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/commandable_action/include/commandable_action_set.hh b/models/vehicle_management/commandable_action/include/commandable_action_set.hh index 20bb07e5..293002ac 100644 --- a/models/vehicle_management/commandable_action/include/commandable_action_set.hh +++ b/models/vehicle_management/commandable_action/include/commandable_action_set.hh @@ -37,6 +37,8 @@ PROGRAMMERS: #include #include +namespace cml { + // forward declaration class CommandableAction; @@ -115,4 +117,8 @@ class CommandableActionSet protected: virtual void generate_fsw_command() = 0; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/commandable_action/src/commandable_action.cc b/models/vehicle_management/commandable_action/src/commandable_action.cc index e7650be7..9c2b672f 100644 --- a/models/vehicle_management/commandable_action/src/commandable_action.cc +++ b/models/vehicle_management/commandable_action/src/commandable_action.cc @@ -17,6 +17,8 @@ #include "../include/commandable_action_set.hh" #include +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -113,3 +115,6 @@ CommandableAction::flag_command_processed() enabled = false; } } + + +} // namespace cml diff --git a/models/vehicle_management/commandable_action/src/commandable_action_set.cc b/models/vehicle_management/commandable_action/src/commandable_action_set.cc index 9236de46..b83248a1 100644 --- a/models/vehicle_management/commandable_action/src/commandable_action_set.cc +++ b/models/vehicle_management/commandable_action/src/commandable_action_set.cc @@ -37,6 +37,8 @@ Library dependencies: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include +namespace cml { + /***************************************************************************** Constructors *****************************************************************************/ @@ -233,3 +235,6 @@ CommandableActionSet::generate_fsw_command_safety_net() "disposition in generate_fsw_commands().\n"); } } + + +} // namespace cml diff --git a/models/vehicle_management/commandable_action/verif/SIM_verif/include/sample_set.hh b/models/vehicle_management/commandable_action/verif/SIM_verif/include/sample_set.hh index a55ca674..c24ddac9 100644 --- a/models/vehicle_management/commandable_action/verif/SIM_verif/include/sample_set.hh +++ b/models/vehicle_management/commandable_action/verif/SIM_verif/include/sample_set.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #include "../../../include/commandable_action_set.hh" #include "../../../include/commandable_action.hh" +namespace cml { + /***************************************************************************** FswBus Purpose: @@ -126,4 +128,8 @@ class DirectCommandableActionSet : public CommandableActionSet flag_command_processed(); } }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/include/compound_event.hh b/models/vehicle_management/compound_events/include/compound_event.hh index 74baeda6..50f3ec47 100644 --- a/models/vehicle_management/compound_events/include/compound_event.hh +++ b/models/vehicle_management/compound_events/include/compound_event.hh @@ -23,10 +23,12 @@ PROGRAMMERS: #ifdef SWIG #ifndef CML_COMPOUND_EVENTS_SWIG_TEMPLATES #define CML_COMPOUND_EVENTS_SWIG_TEMPLATES -%template(WatchValuesDelay_bool) WatchValuesDelay; +%template(WatchValuesDelay_bool) cml::WatchValuesDelay; #endif #endif +namespace cml { + /***************************************************************************** CompoundEvent Purpose: @@ -123,4 +125,8 @@ class CompoundEvent : public WatchValuesDelay void activate() override; // void check_arming_trigger(); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/vehicle_management/compound_events/include/compound_event_manager.hh b/models/vehicle_management/compound_events/include/compound_event_manager.hh index b77fada5..33f2a825 100644 --- a/models/vehicle_management/compound_events/include/compound_event_manager.hh +++ b/models/vehicle_management/compound_events/include/compound_event_manager.hh @@ -19,6 +19,8 @@ PROGRAMMERS: #include "trick/memorymanager_c_intf.h" #include +namespace cml { + class CompoundEventsManager : public VehicleEventsManager { protected: @@ -231,4 +233,8 @@ class CompoundEventsManager : public VehicleEventsManager return reinterpret_cast(var_name_ref->address); } }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/include/compound_event_python_interface.hh b/models/vehicle_management/compound_events/include/compound_event_python_interface.hh index 323fea62..9e3855d9 100644 --- a/models/vehicle_management/compound_events/include/compound_event_python_interface.hh +++ b/models/vehicle_management/compound_events/include/compound_event_python_interface.hh @@ -14,6 +14,8 @@ PROGRAMMERS: #include #include +namespace cml { + /***************************************************************************** CompoundEventActionConfig Purpose: @@ -66,4 +68,8 @@ struct CompoundEventPythonInterface void add_action( std::string action_name); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/compound_events/include/event_trigger.hh b/models/vehicle_management/compound_events/include/event_trigger.hh index 754cbcc4..dda91036 100644 --- a/models/vehicle_management/compound_events/include/event_trigger.hh +++ b/models/vehicle_management/compound_events/include/event_trigger.hh @@ -26,10 +26,12 @@ PROGRAMMERS: #ifdef SWIG #ifndef CML_EVENT_TRIGGERS_SWIG_TEMPLATES #define CML_EVENT_TRIGGERS_SWIG_TEMPLATES -%template(WatchValuesDelay_double) WatchValuesDelay; +%template(WatchValuesDelay_double) cml::WatchValuesDelay; #endif #endif +namespace cml { + /***************************************************************************** EventTriggeBaser Purpose: @@ -525,4 +527,7 @@ Notes: this->active = true; } }; + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/compound_events/include/event_trigger_set.hh b/models/vehicle_management/compound_events/include/event_trigger_set.hh index a250eea6..6ebd6528 100644 --- a/models/vehicle_management/compound_events/include/event_trigger_set.hh +++ b/models/vehicle_management/compound_events/include/event_trigger_set.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/vehicle_management/events_manager/include/watch_values_set.hh" #include "event_trigger.hh" + +namespace cml { /***************************************************************************** EventTriggerSet Purpose: @@ -51,4 +53,8 @@ class EventTriggerSet : public WatchValuesSet void update_conditional_trigger_references(); WatchValuesBaseCore * find_trigger( const std::string& trigger_name_in); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/compound_events/src/compound_event.cc b/models/vehicle_management/compound_events/src/compound_event.cc index 989b76ac..6270db20 100644 --- a/models/vehicle_management/compound_events/src/compound_event.cc +++ b/models/vehicle_management/compound_events/src/compound_event.cc @@ -25,6 +25,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/vehicle_management/events_manager/include/watch_values_delay.hh" #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -383,4 +385,6 @@ CompoundEvent::activate() // Identify which of the triggers has a conditional reference value. action_triggers.populate_conditional_reference_trigger_list(); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/compound_events/src/compound_event_manager.cc b/models/vehicle_management/compound_events/src/compound_event_manager.cc index 41483074..4f3d082e 100644 --- a/models/vehicle_management/compound_events/src/compound_event_manager.cc +++ b/models/vehicle_management/compound_events/src/compound_event_manager.cc @@ -27,6 +27,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /***************************************************************************** Constructor / Destructor @@ -202,4 +204,6 @@ CompoundEventsManager::set_trigger_delay_offset( CompoundEventsManager::set_trigger_delay_offset( *trigger, ref); } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/compound_events/src/compound_event_python_interface.cc b/models/vehicle_management/compound_events/src/compound_event_python_interface.cc index eee9d7ea..5e9714e5 100644 --- a/models/vehicle_management/compound_events/src/compound_event_python_interface.cc +++ b/models/vehicle_management/compound_events/src/compound_event_python_interface.cc @@ -12,6 +12,8 @@ PURPOSE: Provides the Python / SWIG-friendly interface for adding actions #include #include "../include/compound_event_python_interface.hh" +namespace cml { + /* Note: these are the ways in which an event can have an action added to it via the input file. But most of the action content can be redirected anyway, Available actions are: @@ -92,3 +94,6 @@ CompoundEventPythonInterface::add_action( std::string action_name) config.name = std::move(action_name); actions.push_back(config); } + + +} // namespace cml diff --git a/models/vehicle_management/compound_events/src/event_trigger.cc b/models/vehicle_management/compound_events/src/event_trigger.cc index ecbef556..b0f1e4d4 100644 --- a/models/vehicle_management/compound_events/src/event_trigger.cc +++ b/models/vehicle_management/compound_events/src/event_trigger.cc @@ -14,6 +14,8 @@ #include #include +namespace cml { + /***************************************************************************** apply_function_modifier Purpose: @@ -119,4 +121,6 @@ EventTriggerBase::set_new_reference() // No-op break; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/compound_events/src/event_trigger_set.cc b/models/vehicle_management/compound_events/src/event_trigger_set.cc index d86687a9..3c2e575b 100644 --- a/models/vehicle_management/compound_events/src/event_trigger_set.cc +++ b/models/vehicle_management/compound_events/src/event_trigger_set.cc @@ -18,6 +18,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/vehicle_management/events_manager/include/watch_values_base_core.hh" +namespace cml { + /***************************************************************************** Destructor *****************************************************************************/ @@ -108,4 +110,6 @@ EventTriggerSet::find_trigger( const std::string& trigger_name_in) CMLMessage::error( __FILE__,__LINE__, "Could not find a trigger named ", name,".\nReturning NULL.\n"); return nullptr; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/sample_sim_data.hh b/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/sample_sim_data.hh index 152d9d02..79d5c401 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/sample_sim_data.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/sample_sim_data.hh @@ -11,6 +11,8 @@ PURPOSE: ( ***********************************************************************/ #ifndef CML_SAMPLE_SIM_DATA_HH #define CML_SAMPLE_SIM_DATA_HH + +namespace cml { struct SampleSimData { double time; @@ -26,4 +28,8 @@ struct SampleSimData threshold(2.5) {} }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/verif_events_manager.hh b/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/verif_events_manager.hh index 80945cf9..228d6678 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/verif_events_manager.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_prebuilt_multitriggers/include/verif_events_manager.hh @@ -10,6 +10,8 @@ PROGRAMMERS: #include "../../../include/compound_event_manager.hh" #include "sample_sim_data.hh" +namespace cml { + class VerifCompoundEventsManager : public CompoundEventsManager { @@ -104,4 +106,8 @@ class VerifCompoundEventsManager : public CompoundEventsManager VerifCompoundEventsManager(const VerifCompoundEventsManager&) = delete; VerifCompoundEventsManager& operator=(const VerifCompoundEventsManager&) = delete; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/sample_sim_data.hh b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/sample_sim_data.hh index c1e8307e..9d893e20 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/sample_sim_data.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/sample_sim_data.hh @@ -11,6 +11,8 @@ PURPOSE: ( ***********************************************************************/ #ifndef CML_SAMPLE_SIM_DATA_HH #define CML_SAMPLE_SIM_DATA_HH + +namespace cml { struct SampleSimData { double time; @@ -18,4 +20,8 @@ struct SampleSimData bool sim_bool; bool action_assgt; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/verif_events_manager.hh b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/verif_events_manager.hh index 783881e2..c1296fda 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/verif_events_manager.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/include/verif_events_manager.hh @@ -10,6 +10,8 @@ PROGRAMMERS: #include "../../../include/compound_event_manager.hh" #include "sample_sim_data.hh" +namespace cml { + class VerifCompoundEventsManager : public CompoundEventsManager { @@ -47,4 +49,8 @@ class VerifCompoundEventsManager : public CompoundEventsManager VerifCompoundEventsManager(const VerifCompoundEventsManager&) = delete; VerifCompoundEventsManager& operator=(const VerifCompoundEventsManager&) = delete; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/input_config.cc b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/input_config.cc index bf9043a0..b7419f50 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/input_config.cc +++ b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test1/input_config.cc @@ -3,6 +3,8 @@ #include "trick/realtimesync_proto.h" #include "trick/external_application_c_intf.h" +namespace cml { + /***************************************************************************** run_* Purpose: Define the settings for each run. @@ -201,3 +203,6 @@ void run_1ah() { verif.manager.trigger_i.direction_limit = EventTriggerBase::Decreasing; } + + +} // namespace cml diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/sample_sim_data.hh b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/sample_sim_data.hh index c6aba717..be428abb 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/sample_sim_data.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/sample_sim_data.hh @@ -11,10 +11,16 @@ PURPOSE: ( ***********************************************************************/ #ifndef CML_SAMPLE_SIM_DATA_HH #define CML_SAMPLE_SIM_DATA_HH + +namespace cml { struct SampleSimData { double time; double sim_var; bool action_assgt; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/verif_events_manager.hh b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/verif_events_manager.hh index 773f6d11..2886cfb4 100644 --- a/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/verif_events_manager.hh +++ b/models/vehicle_management/compound_events/verif/SIM_verif_trigger_test2/include/verif_events_manager.hh @@ -10,6 +10,8 @@ PROGRAMMERS: #include "../../../include/compound_event_manager.hh" #include "sample_sim_data.hh" +namespace cml { + class VerifCompoundEventsManager : public CompoundEventsManager { @@ -38,4 +40,8 @@ class VerifCompoundEventsManager : public CompoundEventsManager VerifCompoundEventsManager(const VerifCompoundEventsManager&) = delete; VerifCompoundEventsManager& operator=(const VerifCompoundEventsManager&) = delete; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/dummy_vehicle_launcher/include/dummy_vehicle_launcher.hh b/models/vehicle_management/dummy_vehicle_launcher/include/dummy_vehicle_launcher.hh index fb844391..34611d78 100644 --- a/models/vehicle_management/dummy_vehicle_launcher/include/dummy_vehicle_launcher.hh +++ b/models/vehicle_management/dummy_vehicle_launcher/include/dummy_vehicle_launcher.hh @@ -27,6 +27,8 @@ PROGRAMMERS: #include "jeod/models/dynamics/mass/include/mass.hh" #include "jeod/models/dynamics/dyn_manager/include/dynamics_integration_group.hh" +namespace cml { + class DummyVehicleLauncher { public: @@ -78,4 +80,8 @@ class DummyVehicleLauncher void add_to_integ_group(); void process_inconsistent_setup(); }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/dummy_vehicle_launcher/src/dummy_vehicle_launcher.cc b/models/vehicle_management/dummy_vehicle_launcher/src/dummy_vehicle_launcher.cc index 651ba2e3..a8fb00a1 100644 --- a/models/vehicle_management/dummy_vehicle_launcher/src/dummy_vehicle_launcher.cc +++ b/models/vehicle_management/dummy_vehicle_launcher/src/dummy_vehicle_launcher.cc @@ -30,6 +30,8 @@ ASSUMPTIONS AND LIMITATIONS: #include "../include/dummy_vehicle_launcher.hh" +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -336,3 +338,6 @@ DummyVehicleLauncher::process_inconsistent_setup() current_integ_group->delete_dyn_body( body ); add_to_integ_group_at_launch = true; } + + +} // namespace cml diff --git a/models/vehicle_management/events_manager/include/event_action.hh b/models/vehicle_management/events_manager/include/event_action.hh index 39b56e90..a9f4b4ee 100644 --- a/models/vehicle_management/events_manager/include/event_action.hh +++ b/models/vehicle_management/events_manager/include/event_action.hh @@ -52,6 +52,8 @@ PROGRAMMERS: #include "event_action_base.hh" +namespace cml { + /***************************************************************************** EventActionSimStopNow Purpose: @@ -204,4 +206,8 @@ class EventActionLogNow : public EventActionBase { EventActionLogNow (const EventActionLogNow& rhs); EventActionLogNow& operator = (const EventActionLogNow& rhs); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/event_action_base.hh b/models/vehicle_management/events_manager/include/event_action_base.hh index 28509242..ff11b925 100644 --- a/models/vehicle_management/events_manager/include/event_action_base.hh +++ b/models/vehicle_management/events_manager/include/event_action_base.hh @@ -44,6 +44,8 @@ PROGRAMMERS: #ifndef CML_EVENT_ACTION_BASE_HH #define CML_EVENT_ACTION_BASE_HH +namespace cml { + /***************************************************************************** EventActionBase Purpose: @@ -55,4 +57,8 @@ class EventActionBase { virtual bool specific_execution() { return false;} virtual ~EventActionBase() = default; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/include/event_variable_assignment.hh b/models/vehicle_management/events_manager/include/event_variable_assignment.hh index 6dc26331..160a2d82 100644 --- a/models/vehicle_management/events_manager/include/event_variable_assignment.hh +++ b/models/vehicle_management/events_manager/include/event_variable_assignment.hh @@ -11,6 +11,8 @@ PROGRAMMERS: #ifndef CML_EVENT_VARIABLE_ASSIGNMENT_HH #define CML_EVENT_VARIABLE_ASSIGNMENT_HH +namespace cml { + /***************************************************************************** EventVariableAssignmentBase Purpoise:(Provides a convenient base class to support assignment operators @@ -67,4 +69,8 @@ class EventVariableAssignmentRef : public EventVariableAssignmentBase {} void make_assignment() override {variable = value;} }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/include/vehicle_events_manager.hh b/models/vehicle_management/events_manager/include/vehicle_events_manager.hh index e91d2619..ebf31a5b 100644 --- a/models/vehicle_management/events_manager/include/vehicle_events_manager.hh +++ b/models/vehicle_management/events_manager/include/vehicle_events_manager.hh @@ -28,6 +28,8 @@ PROGRAMMERS: #include "cml/models/vehicle_management/events_manager/include/watch_values_base_core.hh" +namespace cml { + /***************************************************************************** VehicleEventsManager Purpose:(Collection of all sets of watch-values.) @@ -56,4 +58,8 @@ class VehicleEventsManager void register_watch(WatchValuesBaseCore & watch) {all_watches.push_back(&watch);} }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/watch_values_base.hh b/models/vehicle_management/events_manager/include/watch_values_base.hh index 6c0839ca..121b2556 100644 --- a/models/vehicle_management/events_manager/include/watch_values_base.hh +++ b/models/vehicle_management/events_manager/include/watch_values_base.hh @@ -18,6 +18,8 @@ PROGRAMMERS: #include "watch_values_base_core.hh" +namespace cml { + /***************************************************************************** WatchValuesBase @@ -391,4 +393,8 @@ Purpose:(Generates the new reference value.) reference += variable_at_activation; } }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/watch_values_base_core.hh b/models/vehicle_management/events_manager/include/watch_values_base_core.hh index d8885b8b..fafbdcc6 100644 --- a/models/vehicle_management/events_manager/include/watch_values_base_core.hh +++ b/models/vehicle_management/events_manager/include/watch_values_base_core.hh @@ -25,6 +25,8 @@ PROGRAMMERS: #include "event_variable_assignment.hh" #include "event_action_base.hh" +namespace cml { + //Forward declaration class VehicleEventsManager; @@ -142,4 +144,8 @@ class WatchValuesBaseCore : public SubscriptionBase { virtual bool specific_execution(){ return false;} virtual void apply_complementary_changes(); }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/include/watch_values_base_multi.hh b/models/vehicle_management/events_manager/include/watch_values_base_multi.hh index ef372be6..8795a630 100644 --- a/models/vehicle_management/events_manager/include/watch_values_base_multi.hh +++ b/models/vehicle_management/events_manager/include/watch_values_base_multi.hh @@ -12,6 +12,8 @@ PROGRAMMERS: #include "watch_values_base_core.hh" #include +namespace cml { + template class WatchValuesBase2 : public WatchValuesBaseCore { @@ -120,4 +122,8 @@ Purpose:(Unsubscribe from watch_a and watch_b to deactivate them. WatchValuesBase2& operator = (const WatchValuesBase2& rhs); }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/include/watch_values_delay.hh b/models/vehicle_management/events_manager/include/watch_values_delay.hh index dfc1ef11..1124bcf8 100644 --- a/models/vehicle_management/events_manager/include/watch_values_delay.hh +++ b/models/vehicle_management/events_manager/include/watch_values_delay.hh @@ -14,13 +14,14 @@ PROGRAMMERS: #ifdef SWIG #ifndef CML_WATCH_VALUES_SWIG_TEMPLATES #define CML_WATCH_VALUES_SWIG_TEMPLATES -%template(WatchValuesBase_bool) WatchValuesBase; -%template(WatchValuesBase_int) WatchValuesBase; -%template(WatchValuesBase_double) WatchValuesBase; -%template(WatchValuesBase_unsigned_int) WatchValuesBase; +%template(WatchValuesBase_bool) cml::WatchValuesBase; +%template(WatchValuesBase_int) cml::WatchValuesBase; +%template(WatchValuesBase_double) cml::WatchValuesBase; +%template(WatchValuesBase_unsigned_int) cml::WatchValuesBase; #endif #endif +namespace cml { template class WatchValuesDelay : public WatchValuesBase @@ -106,4 +107,7 @@ Purpose: tests for the satisfaction of the trigger condition and the subsequent delay_offset = delay_offset_; } }; + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/watch_values_flipflop.hh b/models/vehicle_management/events_manager/include/watch_values_flipflop.hh index 2ea7d5a0..862f745a 100644 --- a/models/vehicle_management/events_manager/include/watch_values_flipflop.hh +++ b/models/vehicle_management/events_manager/include/watch_values_flipflop.hh @@ -38,6 +38,8 @@ PROGRAMMERS: #include "cml/models/vehicle_management/events_manager/include/event_action_base.hh" #include "watch_values_base_core.hh" +namespace cml { + /***************************************************************************** Name: WatchValuesFlipFlop Purpose: @@ -147,4 +149,8 @@ class WatchValuesFlipFlopDelayed : public WatchValuesFlipFlop protected: bool evaluate_delay() const; }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/include/watch_values_set.hh b/models/vehicle_management/events_manager/include/watch_values_set.hh index 7ca9d79f..6fdf3fcf 100644 --- a/models/vehicle_management/events_manager/include/watch_values_set.hh +++ b/models/vehicle_management/events_manager/include/watch_values_set.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include #include "watch_values_base_core.hh" +namespace cml { + /***************************************************************************** WatchValuesSet @@ -72,4 +74,8 @@ class WatchValuesSet : public WatchValuesBaseCore void activate() override; void deactivate() override; }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/watch_values_specific.hh b/models/vehicle_management/events_manager/include/watch_values_specific.hh index 71d7665e..0555f789 100644 --- a/models/vehicle_management/events_manager/include/watch_values_specific.hh +++ b/models/vehicle_management/events_manager/include/watch_values_specific.hh @@ -41,13 +41,15 @@ class WatchValues : public WatchValuesBase { #ifdef SWIG #ifndef CML_WATCH_VALUES_SWIG_TEMPLATES #define CML_WATCH_VALUES_SWIG_TEMPLATES -%template(WatchValuesBase_bool) WatchValuesBase; -%template(WatchValuesBase_int) WatchValuesBase; -%template(WatchValuesBase_double) WatchValuesBase; -%template(WatchValuesBase_unsigned_int) WatchValuesBase; +%template(WatchValuesBase_bool) cml::WatchValuesBase; +%template(WatchValuesBase_int) cml::WatchValuesBase; +%template(WatchValuesBase_double) cml::WatchValuesBase; +%template(WatchValuesBase_unsigned_int) cml::WatchValuesBase; #endif #endif +namespace cml { + /***************************************************************************/ // Stops the sim when a particular variable condition is satisfied template @@ -198,4 +200,8 @@ class WatchValuesLogNowPost : public WatchValuesBase { WatchValuesLogNowPost (const WatchValuesLogNowPost& rhs); WatchValuesLogNowPost& operator = (const WatchValuesLogNowPost& rhs); }; -#endif + + +} // namespace cml + +#endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/include/watch_values_specific__jeod.hh b/models/vehicle_management/events_manager/include/watch_values_specific__jeod.hh index 449905ed..adaa35e2 100644 --- a/models/vehicle_management/events_manager/include/watch_values_specific__jeod.hh +++ b/models/vehicle_management/events_manager/include/watch_values_specific__jeod.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include "watch_values_base.hh" #include "jeod/models/environment/gravity/include/spherical_harmonics_gravity_controls.hh" +namespace cml { + /***************************************************************************** WatchValuesGravityAdjust @@ -84,4 +86,8 @@ class WatchValuesGravityAdjust : public WatchValuesBase { WatchValuesGravityAdjust & operator = ( const WatchValuesGravityAdjust& rhs); }; + + +} // namespace cml + #endif \ No newline at end of file diff --git a/models/vehicle_management/events_manager/src/vehicle_events_manager.cc b/models/vehicle_management/events_manager/src/vehicle_events_manager.cc index ebe8d69b..42b01fd9 100644 --- a/models/vehicle_management/events_manager/src/vehicle_events_manager.cc +++ b/models/vehicle_management/events_manager/src/vehicle_events_manager.cc @@ -10,6 +10,8 @@ #include "../include/vehicle_events_manager.hh" #include +namespace cml { + /***************************************************************************** initialize Purpose:(initializes all of the watches) @@ -61,4 +63,6 @@ VehicleEventsManager::update() ++ii; } } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/events_manager/src/watch_values_base_core.cc b/models/vehicle_management/events_manager/src/watch_values_base_core.cc index e8f58f9e..cfa75c77 100644 --- a/models/vehicle_management/events_manager/src/watch_values_base_core.cc +++ b/models/vehicle_management/events_manager/src/watch_values_base_core.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/subscriptions/include/subscriptions.hh" #include +namespace cml { + /***************************************************************************** Constructor ******************************************************************************/ @@ -114,4 +116,6 @@ WatchValuesBaseCore::~WatchValuesBaseCore() for (auto & assgt : assignments) { delete assgt; } -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/events_manager/src/watch_values_flipflop.cc b/models/vehicle_management/events_manager/src/watch_values_flipflop.cc index ea6ca6c7..3532b179 100644 --- a/models/vehicle_management/events_manager/src/watch_values_flipflop.cc +++ b/models/vehicle_management/events_manager/src/watch_values_flipflop.cc @@ -22,6 +22,8 @@ LIBRARY DEPENDENCIES: #include #include +namespace cml { + /***************************************************************************** Constructor *****************************************************************************/ @@ -257,4 +259,6 @@ bool WatchValuesFlipFlopDelayed::evaluate_delay() const { return (std::abs( delay_variable - baseline_delay_value) >= delay_value); -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/events_manager/src/watch_values_set.cc b/models/vehicle_management/events_manager/src/watch_values_set.cc index 24f1818b..eb2efeaa 100644 --- a/models/vehicle_management/events_manager/src/watch_values_set.cc +++ b/models/vehicle_management/events_manager/src/watch_values_set.cc @@ -15,6 +15,8 @@ LIBRARY DEPENDENCIES: #include "cml/models/utilities/cml_message/include/cml_message.hh" #include "cml/models/utilities/subscriptions/include/subscriptions.hh" +namespace cml { + /***************************************************************************** add_trigger Purpose: @@ -155,4 +157,6 @@ WatchValuesSet::deactivate() trigger->unsubscribe(); } active = false; -} \ No newline at end of file +} + +} // namespace cml diff --git a/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager.hh b/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager.hh index 741eff75..eb29d469 100644 --- a/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager.hh +++ b/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager.hh @@ -16,6 +16,8 @@ PROGRAMMERS: #include "../../include/watch_values_flipflop.hh" #include "cml/models/utilities/trick_logging/include/trick_logging.hh" +namespace cml { + class VerifVehicleEventsManager : public VehicleEventsManager { public: @@ -82,4 +84,8 @@ class VerifVehicleEventsManager : public VehicleEventsManager VerifVehicleEventsManager& operator = (const VerifVehicleEventsManager& rhs); }; + + +} // namespace cml + #endif diff --git a/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager_with_actions.hh b/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager_with_actions.hh index a68efcb0..a8e6eb5f 100644 --- a/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager_with_actions.hh +++ b/models/vehicle_management/events_manager/verif/include/verif_vehicle_events_manager_with_actions.hh @@ -17,6 +17,8 @@ PROGRAMMERS: #include "../../include/event_action.hh" #include "cml/models/utilities/trick_logging/include/trick_logging.hh" +namespace cml { + class VerifVehicleEventsManager : public VehicleEventsManager { public: @@ -92,4 +94,8 @@ class VerifVehicleEventsManager : public VehicleEventsManager VerifVehicleEventsManager& operator = (const VerifVehicleEventsManager& rhs); }; + + +} // namespace cml + #endif diff --git a/utility/mocks/cml/cml_message_mock.cc b/utility/mocks/cml/cml_message_mock.cc index 2aa1e356..7fcd2c36 100644 --- a/utility/mocks/cml/cml_message_mock.cc +++ b/utility/mocks/cml/cml_message_mock.cc @@ -7,11 +7,11 @@ namespace { -CMLMessage::Mock* global_mock_ptr = nullptr; +cml::CMLMessage::Mock* global_mock_ptr = nullptr; } // namespace -namespace CMLMessage { +namespace cml::CMLMessage { Mock::Mock() { if (global_mock_ptr != nullptr) { @@ -35,4 +35,4 @@ void publish( } } -} // namespace CMLMessage +} // namespace CMLMessage \ No newline at end of file diff --git a/utility/mocks/cml/cml_message_mock.hh b/utility/mocks/cml/cml_message_mock.hh index 37bf7999..ca73ef73 100644 --- a/utility/mocks/cml/cml_message_mock.hh +++ b/utility/mocks/cml/cml_message_mock.hh @@ -6,7 +6,7 @@ #include "cml/models/utilities/cml_message/include/cml_message.hh" -namespace CMLMessage { +namespace cml::CMLMessage { // Mock interface to CML's CMLMessage class class Mock final { @@ -24,4 +24,4 @@ public: }; } // namespace CMLMessage -#endif +#endif \ No newline at end of file