namespace MultiWheelC.TrajectoryPlanning.EMPlanner;

public sealed class LongitudinalConfiguration
{
    public double MaximumForwardSpeedMetersPerSecond { get; set; }
    public double MaximumReverseSpeedMetersPerSecond { get; set; }
    public double MaximumAccelerationMetersPerSecondSquared { get; set; }
    public double MaximumDecelerationMetersPerSecondSquared { get; set; }
    public double MaximumJerkMetersPerSecondCubed { get; set; }
    public double MaximumLateralAccelerationMetersPerSecondSquared { get; set; }
    public double MaximumCurvatureRatePerMeterPerSecond { get; set; }
    public double StopSpeedToleranceMetersPerSecond { get; set; }
    public double ZeroSpeedHoldSeconds { get; set; }
    public LongitudinalWeights Weights { get; set; }

    internal LongitudinalConfiguration Copy()
    {
        return new LongitudinalConfiguration
        {
            MaximumForwardSpeedMetersPerSecond = MaximumForwardSpeedMetersPerSecond,
            MaximumReverseSpeedMetersPerSecond = MaximumReverseSpeedMetersPerSecond,
            MaximumAccelerationMetersPerSecondSquared = MaximumAccelerationMetersPerSecondSquared,
            MaximumDecelerationMetersPerSecondSquared = MaximumDecelerationMetersPerSecondSquared,
            MaximumJerkMetersPerSecondCubed = MaximumJerkMetersPerSecondCubed,
            MaximumLateralAccelerationMetersPerSecondSquared = MaximumLateralAccelerationMetersPerSecondSquared,
            MaximumCurvatureRatePerMeterPerSecond = MaximumCurvatureRatePerMeterPerSecond,
            StopSpeedToleranceMetersPerSecond = StopSpeedToleranceMetersPerSecond,
            ZeroSpeedHoldSeconds = ZeroSpeedHoldSeconds,
            Weights = Weights == null ? null : Weights.Copy(),
        };
    }
}
