Skip to content

Commit

Permalink
Fix FixedTranslation
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Mar 29, 2024
1 parent 2784b0b commit 9f7d4b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ Can be though of as a massless rod. For a massive rod, see [`BodyShape`](@ref) o
@component function FixedTranslation(; name, r)
@named frame_a = Frame()
@named frame_b = Frame()
@parameters r(t)[1:3]=r [
@parameters r[1:3]=r [
description = "position vector from frame_a to frame_b, resolved in frame_a",
]
r = collect(r)
fa = frame_a.f |> collect
fb = frame_b.f |> collect
taua = frame_a.tau |> collect
taub = frame_b.tau |> collect
eqs = Equation[(collect(frame_b.r_0) ~ collect(frame_a.r_0) + resolve1(ori(frame_a), r))
eqs = Equation[(collect(frame_b.r_0) .~ collect(frame_a.r_0) + resolve1(ori(frame_a), r))
(ori(frame_b) ~ ori(frame_a))
(0 ~ fa + fb)
(0 ~ taua + taub + cross(r, fb))]
(0 .~ fa + fb)
(0 .~ taua + taub + cross(r, fb))]
compose(ODESystem(eqs, t; name), frame_a, frame_b)
end

Expand Down

0 comments on commit 9f7d4b8

Please sign in to comment.