Skip to content

Conversation

@dforbush2
Copy link
Contributor

This fixes issue #824
Previously the mask initialization of the cable block used some 'eval()' syntax for setting the drag body mass. This fails when using multiple cables because this syntax will always try to read cable(1).cableNum, which is always 1, while the desired operation is to read cable(N).cableNum, which is always N.

This has been replaced with
'set_param(h,'Value', num2str(cable.bodyMass));'
for each the follower and the base drag body.

This is the only intended change. Tested on 2021b R1.

@kmruehl
Copy link
Collaborator

kmruehl commented Mar 15, 2022

Thanks @dforbush2

@kmruehl kmruehl added Bug bug in WEC-Sim source, high priority Cable Class Cable Class (cableClass.m) labels Mar 15, 2022
@kmruehl kmruehl self-requested a review March 15, 2022 20:19
@kmruehl
Copy link
Collaborator

kmruehl commented Mar 15, 2022

@dforbush2 thank you! I'll pull this into PR #822 as well

@kmruehl kmruehl merged commit a5fd638 into WEC-Sim:master Mar 15, 2022
kmruehl added a commit to kmruehl/WEC-Sim that referenced this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug bug in WEC-Sim source, high priority Cable Class Cable Class (cableClass.m)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants