namespace MultiWheelC.TrajectoryPlanning.PathSmoothing;

/// <summary>Local G2 路径平滑管线共享配置；所有距离单位为 m，曲率相关限制使用 1/m。</summary>
public sealed class PathSmoothingConfiguration
{
    /// <summary>创建采用首版安全采样、碰撞步长、净空和曲率容差默认值的可编辑配置。</summary>
    public PathSmoothingConfiguration()
    {
        OutputSpacingMeters = 0.025d;
        MaximumCollisionCheckStepMeters = 0.025d;
        MinimumClearanceReserveMeters = 0d;
        CurvatureLimitRadiusToleranceMeters = 0.002d;
    }

    /// <summary>发布路径沿弧长的目标采样间距，单位 m；必须为有限正数。</summary>
    public double OutputSpacingMeters { get; set; }

    /// <summary>连续车体扫掠复核允许的最大中心步长，单位 m；较大值会降低碰撞检查分辨率。</summary>
    public double MaximumCollisionCheckStepMeters { get; set; }

    /// <summary>除无碰撞外还要求保留的最小额外净空，单位 m。</summary>
    public double MinimumClearanceReserveMeters { get; set; }

    /// <summary>曲率上限复核时允许相对名义最小转弯半径的缩减容差，单位 m。</summary>
    public double CurvatureLimitRadiusToleranceMeters { get; set; }

    /// <summary>局部 G2 五次过渡窗口与候选筛选选项；返回同一配置对象的可编辑子配置。</summary>
    public LocalG2QuinticOptions LocalG2Quintic { get; } = new LocalG2QuinticOptions();
}
