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

CG calculation error #641

Closed
neilweinstock opened this issue May 1, 2020 · 4 comments
Closed

CG calculation error #641

neilweinstock opened this issue May 1, 2020 · 4 comments
Assignees
Labels

Comments

@neilweinstock
Copy link
Contributor

neilweinstock commented May 1, 2020

CG is sometimes shown off-axis in 3D Finished view. See attached design.

Side view:
image

3D Finished view:
image

Tested on latest unstable build.

cg_render_bug.ork.zip

This issue was previously glommed onto #387, I've separated it out here.

@teyrana
Copy link
Member

teyrana commented May 2, 2020

Notes:

  1. The 2d view ignores the y,z components of the CG and CP:
    RocketPanel.java#L634
  2. This is a calculation issue.
  3. Thank you for the example file ^^

@teyrana teyrana changed the title CG shown off-axis CG calculation error May 2, 2020
@teyrana teyrana added the bug label May 2, 2020
@teyrana teyrana self-assigned this May 2, 2020
@neilweinstock
Copy link
Contributor Author

Interesting. Is it a bug that the 2d view ignores Y and Z? I'm not sure why it should.

@JoePfeiffer
Copy link
Contributor

I'm guessing it should not. CP is forced to be on-axis because its calculation with individual fins in a FinSet (instead of calculating the FinSet as a whole) erroneously calculates an off-axis CP (I've spent some time this morning trying to find where we concluded that, and haven't been able to locate the discussion nor the PR that does it. I know I'm just looking in the wrong place). I'll hazard a guess that before we forced the CP calculation, the side view rendering did it instead and what Dan is finding there is an artifact.

CG off axis seems like it has to be an error in the calculation, which was being masked in the side view rendering.

(all this is speculation and memory, of course)

@teyrana
Copy link
Member

teyrana commented May 4, 2020

Is it a bug that the 2d view ignores Y and Z? I'm not sure why it should.

I interpret it as a bug, certainly. It's an optimization which makes sense when everything is on one axis, but it should be updated.

Why?: it's simply ignored at display: check it out:

extraCP.setPosition(cpx, 0);
extraCG.setPosition(cgx, 0);

I can add that particular change to PR #649

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

No branches or pull requests

3 participants