Skip to content
New issue

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

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

Already on GitHub? # to your account

Possible issue with pki function when dy is non-zero causes gauge to calculate arc path wrong #73

Closed
devmonkey22 opened this issue Jul 24, 2013 · 3 comments

Comments

@devmonkey22
Copy link

I am using version dated 31/07/2012 version 1,0.

I think I found an issue where the pki function miscalculates the Yo and Yi values when dy is non-zero. For example, Yo's calculation is "h - (h - Cy) + dy - Ro * Math.sin(alpha)" however I believe that dy should be removed because Cy already translates Cy by dy, so Yo was being double translated by dy in effect. Same goes for Yi.

Thanks,
Mike Dearman

@toorshia
Copy link
Owner

Wow. Nice catch...
Before I warm up my forgotten math skills and dive into code, can you demonstrate the issue? :)

Thanks!

@devmonkey22
Copy link
Author

Ya, it took some time to dig into the math for us too..
I created two sample files – one with the issue, one with it fixed (which includes the fixed js file).
I'm not sure how to get the samples over to you though.

As a synopsis, I used the auto-adjust.htm sample, changed g1's height to 375px.
To fix, I removed the "+ dy" part when calculating Yo and Yi.

Mike

@toorshia
Copy link
Owner

#245

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

No branches or pull requests

2 participants