#pragma once

namespace juefx {

struct CeresVoxelMatcherOption
{
    float T_weight_xy = 0.2f;           // loss weight of T_xy movement in ceres
    float T_weight_z = 0.2f;            // loss weight of T_z movement in ceres
    float R_weight_pitchroll = 50;      // loss weight of R_roll & R_pitch movement in ceres
    float R_weight_yaw = 100;           // loss weight of R_yaw movement in ceres
    float high_space_weight = 2.5f;     // loss weight of "voxel mismatch in the high-resolution cloud" in ceres
    float high_intensity_weight = 2;    // loss weight of "intensity mismatch in the high-resolution cloud" in ceres
    float low_space_weight = 4;         // loss weight of "voxel mismatch in the low-resolution cloud" in ceres
    int threads_num = 4;
};

struct FastVoxelMatcherOption
{
    float imu_height = 1.3f;                    // divide clouds into ground & above_ground
    float init_XYZ_scale = 8.f;                 // INIT_MODE, enlarge XYZ search window by times
    float init_Yaw_scale = 4.f;                 // INIT_MODE, enlarge yaw search window by times
    float XY_search_window = 0.7f;              // HARD LIMIT of search window in xy, m, < 9cm * 8
    float Z_search_window = 0.7f;               // HARD LIMIT of search window in z, m < 9cm * 8
    float Yaw_search_window = 1.f / 180 * M_PI; // HARD LIMIT of search window in yaw, rad
    float min_Yaw_search_step = 0.004f;         // = atan(9cm / 22m), = 1/4 degree
    int32_t low_resolution_depth = 2;           // 9cm * pow(2, 2) = 36cm, low resultion 
    float accepted_low_score = 0.55f;
    float accepted_score = 0.45f;
};

}