<% body_density = 1500 body_radius = 0.3 body_length = 2.6 body_volume = body_length*Math::PI*body_radius**2 spacer_radius = 0.0933402 spacer_length = 0.127211 mass = body_density*(body_volume) body_ixx = mass/12.0 * (3*body_radius**2 + body_length**2 ) body_iyy = mass/12.0 * (3*body_radius**2 + body_length**2 ) body_izz = mass/2.0 * body_radius**2 blade_dx = 0.5 blade_dy = 0.154178 blade_dz = 0.05455 blade_volume = blade_dx * blade_dy * blade_dz blade_mass = blade_volume * body_density total_blade_mass = 4*blade_mass blade_ixx = total_blade_mass/12.0 * (blade_dx**2 + blade_dz**2) blade_iyy = total_blade_mass/12.0 * (blade_dz**2 + blade_dx**2) blade_izz = total_blade_mass/12.0 * (blade_dx**2 + blade_dx**2) blade_angle = 45 * Math::PI/180 fluid_density = 999.1026 material_block = ' ' %> 0 0 <%= blade_dx + 1.0 %> <%= Math::PI/2%> 0 0 0 0 -1.07935 0 0 0 <%= mass %> <%= body_ixx %> 0 0 <%= body_iyy %> 0 <%= body_izz %> <% body_geometry = ' '+ body_radius.to_s + ' '+ body_length.to_s + ' ' %> <%= body_geometry%> <%= material_block%> <%= body_geometry%> <% spacer_geometry_pose = '0 0 ' + (0.299196 + 1.07935).to_s + ' 0 0 0 '+ spacer_radius.to_s + ' '+ spacer_length.to_s + ' ' %> <%= spacer_geometry_pose%> <%= material_block%> 0 0 0.3455 3.14159 0 0 <%= total_blade_mass %> <%= blade_ixx %> 0 0 <%= blade_iyy %> 0 <%= blade_izz %> <% for i in 1..4 x = (i%2)*(spacer_radius + blade_dx/2)*(if i > 2 then -1 else 1 end) y = ((i+1)%2)*(spacer_radius + blade_dx/2)*(if i > 2 then -1 else 1 end) roll = blade_angle*(if i > 2 then -1 else 1 end) yaw = ((i+1)%2)*Math::PI/2 geometry_pose = '' + x.to_s + ' ' + y.to_s + ' 0 ' + roll.to_s + ' 0 ' + yaw.to_s + ' ' + blade_dx.to_s + ' ' + blade_dy.to_s + ' ' + blade_dz.to_s + ' ' %> > <%= geometry_pose %> <%= material_block%> > <%= geometry_pose %> <% end %> body propeller 0 0 1 1 -1e+12 1e+12 -1 -1 1 <% lift_drag_properties = "" + fluid_density.to_s + "\n" + " " + (1.75/1.396).to_s + "\n" + " " + (-0.25/0.1745).to_s + "\n" + " 0\n" + " " + (2/1.396).to_s + "\n" + " " + 1.396.to_s + "\n" + " 0\n" %> <%= fluid_density%>