diff options
| author | Jacob Palecki <[email protected]> | 2020-09-19 21:24:59 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-19 21:24:59 -0700 |
| commit | 7622f542daa27db332334d0af25faa9651a1c831 (patch) | |
| tree | a10bce066ea6454ccec60309c5af2adec0a9aa4e /grapher | |
| parent | Fix chart scaling for DPIs < 1200 (diff) | |
| download | rawaccel-7622f542daa27db332334d0af25faa9651a1c831.tar.xz rawaccel-7622f542daa27db332334d0af25faa9651a1c831.zip | |
log sigmoid sens done
Diffstat (limited to 'grapher')
| -rw-r--r-- | grapher/Layouts/ExperimentOneLayout.cs | 26 | ||||
| -rw-r--r-- | grapher/Layouts/LayoutBase.cs | 1 | ||||
| -rw-r--r-- | grapher/Models/Calculations/AccelCalculator.cs | 1 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 1 | ||||
| -rw-r--r-- | grapher/Models/Serialized/DriverSettings.cs | 2 | ||||
| -rw-r--r-- | grapher/grapher.csproj | 1 |
6 files changed, 31 insertions, 1 deletions
diff --git a/grapher/Layouts/ExperimentOneLayout.cs b/grapher/Layouts/ExperimentOneLayout.cs new file mode 100644 index 0000000..1853fbc --- /dev/null +++ b/grapher/Layouts/ExperimentOneLayout.cs @@ -0,0 +1,26 @@ +using grapher.Models.Serialized; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace grapher.Layouts +{ + public class ExperimentOneLayout : LayoutBase + { + public ExperimentOneLayout() + : base() + { + Name = "Experiment 1"; + Index = (int)AccelMode.experimentone; + + AccelLayout = new OptionLayout(true, Acceleration); + CapLayout = new OptionLayout(false, string.Empty); + WeightLayout = new OptionLayout(true, Weight); + OffsetLayout = new OptionLayout(false, string.Empty); + LimExpLayout = new OptionLayout(true, Motility); + MidpointLayout = new OptionLayout(true, Midpoint); + } + } +} diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 6ed8fee..067ce44 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -10,6 +10,7 @@ namespace grapher.Layouts public const string Exponent = "Exponent"; public const string Limit = "Limit"; public const string Midpoint = "Midpoint"; + public const string Motility = "Motility"; public const string Offset = "Offset"; public const string Cap = "Cap"; public const string Weight = "Weight"; diff --git a/grapher/Models/Calculations/AccelCalculator.cs b/grapher/Models/Calculations/AccelCalculator.cs index 4627732..7293681 100644 --- a/grapher/Models/Calculations/AccelCalculator.cs +++ b/grapher/Models/Calculations/AccelCalculator.cs @@ -74,6 +74,7 @@ namespace grapher.Models.Calculations var output = accel.Accelerate(magnitudeDatum.x, magnitudeDatum.y, MeasurementTime); var outMagnitude = Magnitude(output.Item1, output.Item2); + var ratio = magnitudeDatum.magnitude > 0 ? outMagnitude / magnitudeDatum.magnitude : starter; var inDiff = magnitudeDatum.magnitude - lastInputMagnitude; diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 917ac5c..6f547cd 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -21,6 +21,7 @@ namespace grapher new LogarithmLayout(), new NaturalGainLayout(), new SigmoidGainLayout(), + new ExperimentOneLayout(), new OffLayout() }.ToDictionary(k => k.Name); diff --git a/grapher/Models/Serialized/DriverSettings.cs b/grapher/Models/Serialized/DriverSettings.cs index d42187c..03c5687 100644 --- a/grapher/Models/Serialized/DriverSettings.cs +++ b/grapher/Models/Serialized/DriverSettings.cs @@ -8,7 +8,7 @@ namespace grapher.Models.Serialized public enum AccelMode { - linear, classic, natural, naturalgain, sigmoidgain, power, logarithm, noaccel + linear, classic, natural, naturalgain, sigmoidgain, power, logarithm, experimentone, noaccel } #endregion Enumerations diff --git a/grapher/grapher.csproj b/grapher/grapher.csproj index 8f5eeda..b81a310 100644 --- a/grapher/grapher.csproj +++ b/grapher/grapher.csproj @@ -54,6 +54,7 @@ </ItemGroup> <ItemGroup> <Compile Include="Constants\Constants.cs" /> + <Compile Include="Layouts\ExperimentOneLayout.cs" /> <Compile Include="Layouts\LogarithmLayout.cs" /> <Compile Include="Layouts\NaturalGainLayout.cs" /> <Compile Include="Layouts\SigmoidGainLayout.cs" /> |