namespace MultiWheelC.TrajectoryPlanning.PathSmoothing;

/// <summary>局部 G2 五次过渡窗口、候选数量和改进阈值的可配置快照；长度单位为 m，曲率跳变单位为 1/m。</summary>
public sealed class LocalG2QuinticOptions
{
    /// <summary>允许候选窗口的最小弧长，单位 m。</summary>
    public double MinimumWindowLengthMeters { get; set; } = 0.20d;
    /// <summary>优先尝试的窗口弧长，单位 m。</summary>
    public double PreferredWindowLengthMeters { get; set; } = 0.50d;
    /// <summary>允许候选窗口的最大弧长，单位 m。</summary>
    public double MaximumWindowLengthMeters { get; set; } = 0.80d;
    /// <summary>候选相对原始路径允许的最大几何偏移，单位 m。</summary>
    public double MaximumDeviationMeters { get; set; } = 0.10d;
    /// <summary>识别曲率跳变的绝对下限，单位 1/m。</summary>
    public double AbsoluteCurvatureJumpFloorPerMeter { get; set; } = 0.001d;
    /// <summary>曲率跳变相对车辆最大允许曲率的比例阈值。</summary>
    public double CurvatureJumpRatioOfMaximum { get; set; } = 0.05d;
    /// <summary>接受候选所需的峰值曲率导数最小改善比例。</summary>
    public double MinimumPeakGradientImprovementRatio { get; set; } = 0.20d;
    /// <summary>候选相对原路径允许的曲率变化代价最大退化比例。</summary>
    public double MaximumVariationCostRegressionRatio { get; set; } = 0.02d;
    /// <summary>每个局部区域允许评估的候选数量上限。</summary>
    public int MaximumCandidatesPerRegion { get; set; } = 12;
}
