Skip to content

Commit

Permalink
fix: symbol shadowing error on clang-16 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed May 29, 2024
1 parent 9c4a87e commit 1d1057a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ int main()

print_header(initial_guess);
state next = initial_guess;
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const state& previous = next;
const quantity gain = 1. / index * one;
const state current = state_update(previous, m, gain);
const state current = state_update(previous, measurement, gain);
next = current;
print(index++, gain, m, current, next);
print(index++, gain, measurement, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ int main()

print_header(initial);
state next = state_extrapolation(initial, interval);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const state& previous = next;
const state current = state_update(previous, m, gain, interval);
const state current = state_update(previous, measurement, gain, interval);
next = state_extrapolation(current, interval);
print(index++, m, current, next);
print(index++, measurement, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ int main()

print_header(initial);
state next = state_extrapolation(initial, interval);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const state& previous = next;
const state current = state_update(previous, m, gain, interval);
const state current = state_update(previous, measurement, gain, interval);
next = state_extrapolation(current, interval);
print(index++, m, current, next);
print(index++, measurement, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ int main()

print_header(initial);
state next = state_extrapolation(initial, interval);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const state& previous = next;
const state current = state_update(previous, m, gain, interval);
const state current = state_update(previous, measurement, gain, interval);
next = state_extrapolation(current, interval);
print(index++, m, current, next);
print(index++, measurement, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ int main()

print_header(initial);
estimate next = predict(initial);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const estimate& previous = next;
const quantity gain = kalman::kalman_gain(previous.variance(), measurement_variance);
const estimate current = state_estimate_update(previous, m, gain);
const estimate current = state_estimate_update(previous, measurement, gain);
next = predict(current);
print(index++, m, gain, current, next);
print(index++, measurement, gain, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ int main()

print_header(initial);
estimate next = predict(initial);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const estimate& previous = next;
const quantity gain = kalman::kalman_gain(previous.variance(), measurement_variance);
const estimate current = state_estimate_update(previous, m, gain);
const estimate current = state_estimate_update(previous, measurement, gain);
next = predict(current);
print(index++, m, gain, current, next);
print(index++, measurement, gain, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ int main()

print_header(initial);
estimate next = predict(initial);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const estimate& previous = next;
const quantity gain = kalman::kalman_gain(previous.variance(), measurement_variance);
const estimate current = state_estimate_update(previous, m, gain);
const estimate current = state_estimate_update(previous, measurement, gain);
next = predict(current);
print(index++, m, gain, current, next);
print(index++, measurement, gain, current, next);
}
}
6 changes: 3 additions & 3 deletions example/kalman_filter/kalman_filter-example_8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ int main()

print_header(initial);
estimate next = predict(initial);
for (int index = 1; const auto& m : measurements) {
for (int index = 1; const auto& measurement : measurements) {
const estimate& previous = next;
const quantity gain = kalman::kalman_gain(previous.variance(), measurement_variance);
const estimate current = state_estimate_update(previous, m, gain);
const estimate current = state_estimate_update(previous, measurement, gain);
next = predict(current);
print(index++, m, gain, current, next);
print(index++, measurement, gain, current, next);
}
}

0 comments on commit 1d1057a

Please sign in to comment.