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

Setup Editor #21

Open
RiddleTime opened this issue Apr 29, 2022 · 2 comments
Open

Setup Editor #21

RiddleTime opened this issue Apr 29, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@RiddleTime
Copy link
Owner

For this to work, every setup conversion requires minimum, maximum and incremental values for each of their fields. A LUT (look up table) works as well.

@RiddleTime RiddleTime self-assigned this Apr 29, 2022
@RiddleTime RiddleTime added enhancement New feature or request help wanted Extra attention is needed labels May 1, 2022
@RiddleTime
Copy link
Owner Author

The Porsche 911 II GT3 R was the first car which has gained the ISetupChanger type. (see code below for implementation).

Since the caster and wheel rate look up tables have already been completed all we need is the maximum values for each setup property.

ITyreSetupChanger ISetupChanger.TyreSetupChanger => new TyreSetupChanger();
IElectronicsSetupChanger ISetupChanger.ElectronicsSetupChanger => new ElectronicsSetupChanger();
IMechanicalSetupChanger ISetupChanger.MechanicalSetupChanger => new MechSetupChanger();
IAeroSetupChanger ISetupChanger.AeroSetupChanger => new AeroSetupChanger();
IDamperSetupChanger ISetupChanger.DamperSetupChanger => new DamperSetupChanger();

private class TyreSetupChanger : ITyreSetupChanger
{
	public SetupDoubleRange TyrePressures => TyrePressuresGT3;
	public SetupDoubleRange CamberFront => new SetupDoubleRange(-4, -1.5, 0.1);
	public SetupDoubleRange CamberRear => new SetupDoubleRange(-3.5, -1, 0.1);
	public SetupDoubleRange ToeFront => new SetupDoubleRange(-0.4, 0.4, 0.01);
	public SetupDoubleRange ToeRear => ToeFront;
	public SetupDoubleRange Caster => new SetupDoubleRange(casters);
}

private class ElectronicsSetupChanger : IElectronicsSetupChanger
{
	public SetupIntRange TractionControl => new SetupIntRange(0, 11, 1);
	public SetupIntRange ABS => new SetupIntRange(0, 11, 1);
	public SetupIntRange EcuMap => new SetupIntRange(1, 10, 1);
	public SetupIntRange TractionControlCut => new SetupIntRange(0, 11, 1);
}

private class MechSetupChanger : IMechanicalSetupChanger
{
	public SetupIntRange AntiRollBarFront => new SetupIntRange(0, 6, 1);
	public SetupIntRange AntiRollBarRear => AntiRollBarFront;
	public SetupDoubleRange BrakeBias => new SetupDoubleRange(43.0, 64.0, 0.2);
	public SetupIntRange PreloadDifferential => new SetupIntRange(20, 300, 10);
	public SetupIntRange BrakePower => new SetupIntRange(80, 100, 1);
	public SetupDoubleRange SteeringRatio => new SetupDoubleRange(11, 17, 1);
	public SetupIntRange WheelRateFronts => new SetupIntRange(wheelRateFronts);
	public SetupIntRange WheelRateRears => new SetupIntRange(wheelRateRears);
	public SetupIntRange BumpstopRate => new SetupIntRange(300, 2500, 100);
	public SetupIntRange BumpstopRangeFronts => new SetupIntRange(0, 49, 1);
	public SetupIntRange BumpstopRangeRears => new SetupIntRange(0, 50, 1);
}

private class AeroSetupChanger : IAeroSetupChanger
{
	public SetupIntRange RideHeightFront => new SetupIntRange(53, 85, 1);
	public SetupIntRange RideHeightRear => new SetupIntRange(55, 90, 1);
	public SetupIntRange BrakeDucts => new SetupIntRange(0, 6, 1);
	public SetupIntRange Splitter => new SetupIntRange(0, 5, 1);
	public SetupIntRange RearWing => new SetupIntRange(0, 12, 1);
}

private class DamperSetupChanger : IDamperSetupChanger
{
	public SetupIntRange BumpSlow => new SetupIntRange(0, 17, 1);
	public SetupIntRange BumpFast => new SetupIntRange(0, 12, 1);
	public SetupIntRange ReboundSlow => BumpSlow;
	public SetupIntRange ReboundFast => BumpFast;
}

@RiddleTime RiddleTime removed the help wanted Extra attention is needed label Aug 20, 2022
@RiddleTime
Copy link
Owner Author

The new grouped configs might make the original ui from code obsolete

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

No branches or pull requests

1 participant