Airspace-Encounter-Models / em-core

Software and data used by multiple repositories in the Aerospace Encounter Models organization.
BSD 2-Clause "Simplified" License
2 stars 8 forks source link

[ENHANCEMENT] Replace #define constants with const variables in run_dynamics_fast #10

Open aweinert-MIT opened 2 years ago

aweinert-MIT commented 2 years ago

Relation

The MATLAB mex function, run_dynamics_fast is used by multiple repositories, including em-model-manned-bayes to simulate aircraft trajectories with a 6DOF physics model. There are various #define statements that define constants.

Description

Per the Google C++ Style Guide for preprocessor macros:

Instead of using a macro to store a constant, use a const variable.

Alternatives

Using const instead of #define is a good best practice and should be implemented.

Additional

While the contributing guidelines does not define a style guide for C++, we currently recommend the Google C++ Style Guide for this issue.