Skip to content

Commit

Permalink
fix: ForceSensor in Translational
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed Jun 24, 2024
1 parent 35a3947 commit 6545345
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Mechanical/Translational/sensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ Linear 1D force sensor, measures the force between two flanges.
"""
@mtkmodel ForceSensor begin
@components begin
flange = MechanicalPort()
flange_a = MechanicalPort()
flange_b = MechanicalPort()
output = RealOutput()
end

@equations begin
flange.f ~ -output.u
flange_a.v ~ flange_b.v
flange_a.f + flange_b.f ~ 0.0
output.u ~ flange_a.f
end
end

Expand Down

0 comments on commit 6545345

Please sign in to comment.