-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CODAP] Angle Stability using negative numbers #356
Labels
Comments
Noting that the more stable, the more negative the number, which seems to be oposite the intended behavior. |
In this code, we actually get the value of launcherStandardDeviationAngle and, after a linear transform, rename it to
This was implemented in #234. I'm not sure how to proceed. |
@matthew-blackman recommended this patch: Subject: [PATCH] Avoid grunt, see https://github.com/phetsims/chipper/issues/1436
---
Index: repos/projectile-data-lab/wrappers/codap/codapWrapper.html
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/repos/projectile-data-lab/wrappers/codap/codapWrapper.html b/repos/projectile-data-lab/wrappers/codap/codapWrapper.html
--- a/repos/projectile-data-lab/wrappers/codap/codapWrapper.html (revision 5e758c1641c02fb5b2bce3bf3efe8a42a9b79104)
+++ b/repos/projectile-data-lab/wrappers/codap/codapWrapper.html (date 1731358977956)
@@ -300,7 +300,12 @@
const launcherMechanismName = projectile.launcherMechanism.phetioID.substring( projectile.launcherMechanism.phetioID.lastIndexOf( '.' ) + 1 );
const launcherMechanism = launcherName === 'custom' ? launcherMechanismName : '?';
- const angleStabilitySliderValue = ( 5 - 0.2 ) / ( 5 - 0.2 ) * ( projectile.launcherStandardDeviationAngle - 5 ) + 0.2;
+
+ // Determine the angle stability from the launcher standard deviation angle
+ const launcherStandardDeviationAngle = projectile.launcherStandardDeviationAngle;
+ const linear = ( a1, a2, b1, b2, a3 ) => ( b2 - b1 ) / ( a2 - a1 ) * ( a3 - a1 ) + b1;
+ const angleStabilitySliderValue = linear( 5, 0.2, 0, 1, launcherStandardDeviationAngle );
+
const angleStabilityRounded = valueRoundedToThousandths( angleStabilitySliderValue );
const angleStability = launcherName === 'custom' ? angleStabilityRounded : '?';
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test device
Win 11 Desktop
Operating System
Win 11 23H2
Browser
Firefox 131.0.3
Problem description
From phetsims/qa#1157 Angle Stability goes into the negative.
Steps to reproduce
N/A
Visuals
The text was updated successfully, but these errors were encountered: