void VelParaSetupHandler::GetPSVelSetupUiData(PSVelSetupPara ¶) { AppSettings setting = ConfigManager::GetInstance()->AppSetting(); para.p_start = setting.p_start(); para.p_end = setting.p_end(); para.s_start = setting.s_start(); para.s_end = setting.s_end(); para.plus_per = setting.plus_per(); para.minus_per = setting.minus_per(); para.layer_info = setting.layer_info(); para.p_step = setting.p_step(); para.s_step = setting.s_step(); para.p_divide_by_s = setting.p_divide_by_s(); }
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; }