@@ -41,7 +41,7 @@ std::array<double, 3> rotate_vector_3d(std::array<double, 3> vector,
4141 std::array<double , 3 > axis,
4242 double angle_in_degrees) {
4343 // Convert the angle from degrees to radians
44- double angle_in_radians = angle_in_degrees * M_PI / 180.0 ;
44+ double angle_in_radians = angle_in_degrees * CH_DEG_TO_RAD ;
4545
4646 // Normalize the axis vector
4747 axis = normalize (axis);
@@ -64,7 +64,7 @@ std::array<double, 3> add_vectors(std::array<double, 3> v1, std::array<double, 3
6464int main (int argc, char * argv[]) {
6565 std::vector<double > periods = {4.0 , 6.0 , 8.0 , 10.0 , 12.0 , 14.0 , 16.0 , 18.0 ,
6666 18.5 , 19.0 , 19.25 , 19.5 , 20.0 , 21.0 , 22.0 , 24.0 };
67- int reg_wave_num_max = periods.size ();
67+ int reg_wave_num_max = ( int ) periods.size ();
6868
6969 for (int reg_wave_num = 1 ; reg_wave_num <= reg_wave_num_max; ++reg_wave_num) {
7070 std::cout << " Chrono version: " << CHRONO_VERSION << " \n\n " ;
@@ -111,9 +111,8 @@ int main(int argc, char* argv[]) {
111111 std::array<double , 3 > origin_to_hinge = {0 , 0 , -8.9 };
112112 std::array<double , 3 > hinge_to_cg = {0 , 0 , 5 };
113113 std::array<double , 3 > axis = {0 , 1 , 0 };
114- double angle_in_degrees = 0.0 ;
115114
116- // std::array<double, 3> rotated_hinge_to_cg = rotate_vector_3d(hinge_to_cg, axis, angle_in_degrees );
115+ // std::array<double, 3> rotated_hinge_to_cg = rotate_vector_3d(hinge_to_cg, axis, 0 );
117116
118117 // std::array<double, 3> new_cg = add_vectors(origin_to_hinge, rotated_hinge_to_cg);
119118
@@ -142,10 +141,9 @@ int main(int argc, char* argv[]) {
142141 // define the float's initial conditions
143142 system.Add (flap_body);
144143 flap_body->SetName (" body1" );
145- auto ang_rad = CH_PI / 18.0 ;
146144 // flap_body->SetPos(ChVector3d(new_cg[0], new_cg[1], new_cg[2]));
147145 flap_body->SetPos (ChVector3d (0.0 , 0.0 , -3.9 ));
148- // flap_body->SetRot(QuatFromAngleY(ang_rad ));
146+ // flap_body->SetRot(QuatFromAngleY(CH_PI / 18.0 ));
149147 flap_body->SetMass (127000.0 );
150148 flap_body->SetInertiaXX (ChVector3d (1.85e6 , 1.85e6 , 1.85e6 ));
151149 // notes: mass and inertia added to added mass and system mass correctly.
0 commit comments