Skip to content

Commit 5b846f2

Browse files
committed
fix: explicit
1 parent 5923f2c commit 5b846f2

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

core/include/openballistics/ballistics.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace openballistics
5656
0.0,
5757
time_of_flight);
5858

59-
return x.head<3>();
59+
return x.template head<3>();
6060
}
6161

6262
[[nodiscard]] std::vector<vector3> compute_trajectory_impl(
@@ -89,7 +89,7 @@ namespace openballistics
8989
{
9090
state x;
9191
interpolate(x, accumulator);
92-
trajectory.emplace_back(x.head<3>());
92+
trajectory.emplace_back(x.template head<3>());
9393
accumulator += sample_interval;
9494
}
9595
});

core/include/openballistics/trajectory_model/modified_point_mass.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ namespace openballistics::trajectory_model
140140
dudt_ = GF_ / m;
141141
}
142142

143-
dydt.head<3>() = u_;
144-
dydt.segment<3>(3) = dudt_;
143+
dydt.template head<3>() = u_;
144+
dydt.template segment<3>(3) = dudt_;
145145
dydt(6) = (0.5 * rho * v * S * d * d * p * C_spin) / I_x;
146146
}
147147
};

core/include/openballistics/trajectory_model/point_mass.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define OPENBALLISTICS_TRAJECTORY_MODEL_POINT_MASS_HPP
33

44
#include "../types.hpp"
5+
#include "../numbers.hpp"
56
#include <Eigen/Dense>
67

78
namespace openballistics::trajectory_model
@@ -63,10 +64,10 @@ namespace openballistics::trajectory_model
6364

6465
const scalar C_D_eff = C_D_0 * i * f_D;
6566

66-
const scalar S = 0.25 * numbers::pi<double> * d * d;
67+
const scalar S = 0.25 * numbers::pi<scalar> * d * d;
6768

68-
dydt.head<3>() = u_;
69-
dydt.tail<3>() = g_ - 0.5 * rho * S * C_D_eff / m * v * v_;
69+
dydt.template head<3>() = u_;
70+
dydt.template tail<3>() = g_ - 0.5 * rho * S * C_D_eff / m * v * v_;
7071
}
7172
};
7273
}

0 commit comments

Comments
 (0)