Skip to content

Commit ea34177

Browse files
committed
Fixed bug in the solver. Rotation must be around the cm
1 parent 6772c57 commit ea34177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function solve!(m::Model; reltol=1e-8, abstol=1e-8, solver=ODE.Tsit5())
6464
# Evolution of angular momentum
6565
m.momentum = t -> solution(t)[5:end]
6666
# Store solution on model
67-
m.inertialframe = t -> map(x -> rotate(x, m.rotation(t)), m.bodyframe(t))
67+
m.inertialframe = t -> map(x -> rotate(x, m.rotation(t), center_of_mass(m.bodyframe(t))), m.bodyframe(t))
6868
return m.inertialframe, m.rotation, m.momentum
6969
end
7070

0 commit comments

Comments
 (0)