Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and simplify interpolator #251

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Conversation

ltoenning
Copy link
Contributor

No description provided.

The aircraft number should always be positive
clear() was only required by a unittest to execute two tests directly
after another. This can also be done in a cleaner way by creating a new
CInterpolator instead of requiring a separate method for resetting the interpolator.
Avoid requiring a do {} while(false) with nested if & break by using a simple if()
The forward-declared classes are already included directly
This allows each interpolant to specify on its own which PBH
interpolator should be used. Currently only the linear PBH interpolator
is available, but another PBH interpolator will be added for velocity.

This removes some protected data from the IInterpolator interface as well,
which conforms to C++ Core Guideline C.113 ("Avoid protected data").
This makes it clearer what an IInterpolant and Interpolator must
implemented.
But it should be checked if using virtual here is okay performance-wise.
@ltoenning ltoenning self-assigned this Jan 21, 2024
@ltoenning ltoenning marked this pull request as ready for review January 21, 2024 19:25
@ltoenning ltoenning added the simplify Reduce application complexity label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simplify Reduce application complexity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant