diff options
| author | a1xd <[email protected]> | 2021-01-22 23:41:13 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-22 23:41:13 -0500 |
| commit | e2a09a3f63a1ced1c4821bd531a4e4cf12b130cf (patch) | |
| tree | 642b97d07c42451df1ed44787371e787129002bc | |
| parent | Merge pull request #67 from JacobPalecki/graph_fix (diff) | |
| parent | fix last mouse move - swapped axes (diff) | |
| download | rawaccel-e2a09a3f63a1ced1c4821bd531a4e4cf12b130cf.tar.xz rawaccel-e2a09a3f63a1ced1c4821bd531a4e4cf12b130cf.zip | |
Merge pull request #69 from JacobPalecki/FixByComponentv1.4.1
Fix by component
| -rw-r--r-- | grapher/Constants/Constants.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/Calculations/AccelCalculator.cs | 9 | ||||
| -rw-r--r-- | grapher/Models/Charts/AccelCharts.cs | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs index d58c5cf..446f5fa 100644 --- a/grapher/Constants/Constants.cs +++ b/grapher/Constants/Constants.cs @@ -44,7 +44,7 @@ namespace grapher public const int DropDownLeftSeparation = 10; /// <summary> Height of sensitivity chart when displayed alone. </summary> - public const int SensitivityChartAloneHeight = 450; + public const int SensitivityChartAloneHeight = 455; /// <summary> Height of sensitivity chart when displayed alongside Velocity and Gain charts. </summary> public const int SensitivityChartTogetherHeight = 328; diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index 6a4c46f..1c42c76 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -381,7 +381,7 @@ namespace grapher.Models range, wholeCheckBox, byComponentCheckBox, - 245); + 260); var applyOptions = new ApplyOptions( byComponentXYLock, diff --git a/grapher/Models/Calculations/AccelCalculator.cs b/grapher/Models/Calculations/AccelCalculator.cs index 60c6eaa..d641873 100644 --- a/grapher/Models/Calculations/AccelCalculator.cs +++ b/grapher/Models/Calculations/AccelCalculator.cs @@ -136,6 +136,11 @@ namespace grapher.Models.Calculations var ratio = outMagnitude / simulatedInputDatum.velocity; var slope = inDiff > 0 ? outDiff / inDiff : starter; + if (slope < lastSlope) + { + Console.WriteLine(); + } + if (ratio > maxRatio) { maxRatio = ratio; @@ -398,8 +403,8 @@ namespace grapher.Models.Calculations var timeFactor = ceil / i; mouseInputData.x = 0; mouseInputData.y = ceil; - mouseInputData.time = MeasurementTime; - mouseInputData.velocity = Velocity(0, i, mouseInputData.time); + mouseInputData.time = MeasurementTime*timeFactor; + mouseInputData.velocity = Velocity(0, ceil, mouseInputData.time); mouseInputData.angle = Math.PI / 2; magnitudes.Add(mouseInputData); } diff --git a/grapher/Models/Charts/AccelCharts.cs b/grapher/Models/Charts/AccelCharts.cs index 2369432..65c636b 100644 --- a/grapher/Models/Charts/AccelCharts.cs +++ b/grapher/Models/Charts/AccelCharts.cs @@ -31,8 +31,8 @@ namespace grapher gainChart, accelCalculator, estimated, - estimatedY, - estimatedX); + estimatedX, + estimatedY); ContainingForm = form; EnableVelocityAndGain = enableVelocityAndGain; |