void VelParaSetupHandler::GetAreaParaSetupUiData(AreaPara ¶) { AppSettings setting = ConfigManager::GetInstance()->AppSetting(); para.mine_area = setting.mine_area(); para.search_area = setting.search_area(); para.grid_step = setting.cell_step(); }
bool CalculateVelocityHandler::GetLocParPara(LocParPara ¶) { AppSettings setting = ConfigManager::GetInstance()->AppSetting(); para.grid.origin_x = setting.search_area().min_x; para.grid.origin_y = setting.search_area().min_y; para.grid.origin_z = setting.search_area().min_z; if (setting.cell_step() == 0) { return false; } para.grid.step_x = setting.cell_step(); para.grid.step_y = setting.cell_step(); para.grid.step_z = setting.cell_step(); para.grid.grid_num_x = (setting.search_area().max_x - setting.search_area().min_x) / para.grid.step_x; para.grid.grid_num_y = (setting.search_area().max_y - setting.search_area().min_y) / para.grid.step_y; para.grid.grid_num_z = (setting.search_area().max_z - setting.search_area().min_z) / para.grid.step_z; return true; }
bool CalculateVelocityHandler::GetTimeGridPara(TimeGridPara ¶, int channel_id) { AppSettings setting = ConfigManager::GetInstance()->AppSetting(); para.grid.origin_x = setting.mine_area().min_x; para.grid.origin_y = setting.mine_area().min_y; para.grid.origin_z = setting.mine_area().min_z; if (setting.cell_step() == 0) { return false; } para.grid.step_x = setting.cell_step(); para.grid.step_y = setting.cell_step(); para.grid.step_z = setting.cell_step(); para.grid.grid_num_x = (setting.mine_area().max_x - setting.mine_area().min_x) / para.grid.step_x; para.grid.grid_num_y = (setting.mine_area().max_y - setting.mine_area().min_y) / para.grid.step_y; para.grid.grid_num_z = (setting.mine_area().max_z - setting.mine_area().min_z) / para.grid.step_z; para.layer_list = setting.layer_info(); QList<ChannelInfo> list = channel_map_.values(); for (int i = 0; i < list.count(); i++) { ChannelInfo info = list.at(i); if (channel_id != 0) { if (info.id != channel_id) { continue; } } ChannelInfo cinfo; if (!GetChannelInfo(info.id, cinfo)) { return false; } StationInfo sinfo; if (!GetStationInfo(cinfo.station_id, sinfo)) { return false; } SCInfo scinfo; scinfo.name = sinfo.name + "_" + QString().sprintf("%d", cinfo.component); scinfo.channel_id = cinfo.id; scinfo.east = sinfo.point.east; scinfo.north = sinfo.point.north; scinfo.deep = sinfo.point.deep; para.scinfo_list.append(scinfo); } return true; }