Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Rne is the same matlab version #404

Open
yanlong658 opened this issue Oct 25, 2023 · 0 comments
Open

Python Rne is the same matlab version #404

yanlong658 opened this issue Oct 25, 2023 · 0 comments

Comments

@yanlong658
Copy link

Check here first

Common issues

Describe the bug
Hi, I find the python_rne in not the same the matlab version.

The following cod is the segment.

if self.mdh:
if j == (n - 1):
R = np.eye(3, dtype=dtype)
pstar = np.zeros((3,), dtype=dtype)
else:
R = Rm[j + 1]
pstar = pstarm[:, j + 1]

  f_ = R @ f + Fm[:, j]
  nn_ = (
      R @ nn
      + _cross(pstar, R @ f)
      + _cross(pstar, Fm[:, j])   =>bug is here.
      + Nm[:, j]
  )
  f = f_
  nn = nn_

I think the correct version is the following.

The fllowing cod is the segment.

if self.mdh:
if j == (n - 1):
R = np.eye(3, dtype=dtype)
pstar = np.zeros((3,), dtype=dtype)
else:
R = Rm[j + 1]
pstar = pstarm[:, j + 1]

  f_ = R @ f + Fm[:, j]
  nn_ = (
      R @ nn
      + _cross(pstar, R @ f)
      + _cross("COM position", Fm[:, j])  => fixed.
      + Nm[:, j]
  )
  f = f_
  nn = nn_

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant