📄 ppf_pointing_valid.c
字号:
/* Input parameters */ /* ---------------- */ sta[0] = res[3]; sta[1] = res[5]; sta[2] = res[6]; sta[3] = 10; /* Call stavis */ /* ----------- */ local_status = stavis(mjdp,pos,vel,acc,aocs,att,datt,sta,res_cf,ierr_cf); CHECK_STATUS("stavis status", local_status) func_id = PP_STAVIS_ID; local_status = PP_Vector_Msg(&func_id, ierr_cf, &n_msg, msg); local_status = PP_Print_Msg(&n_msg, msg); /* Compare results */ /* --------------- */ CHECK_PAR("target/stavis: target/station to satellite range .", res[7], res_cf[0], 0.1) CHECK_PAR("target/stavis: target/station to satellite azimuth .", res[8], res_cf[1], 0.1) CHECK_PAR("target/stavis: target/station to satellite elevation .", res[9], res_cf[2], 0.1) CHECK_PAR("target/stavis: satellite to target/station azimuth .", res[12], res_cf[3], 0.1) CHECK_PAR("target/stavis: satellite to target/station elevation .", res[13], res_cf[4], 0.1) CHECK_PAR("target/stavis: target/station to satellite range-rate .", res[37], res_cf[5], 1) CHECK_PAR("target/stavis: target/station to satellite azimuth-rate .", res[38], res_cf[6], 1e-4) CHECK_PAR("target/stavis: target/station to satellite elevation-rate.", res[39], res_cf[7], 1e-4) CHECK_PAR("target/stavis: satellite to target/station azimuth-rate .", res[42], res_cf[8], 1e-4) CHECK_PAR("target/stavis: satellite to target/station elevation-rate.", res[43], res_cf[9], 1e-4) CHECK_PAR("target/stavis: satellite pitch angle .", res[45], res_cf[15], 0.1) CHECK_PAR("target/stavis: satellite roll angle .", res[46], res_cf[16], 0.1) CHECK_PAR("target/stavis: satellite yaw angle .", res[47], res_cf[17], 0.1) CHECK_PAR("target/stavis: satellite pitch angle rate .", res[48], res_cf[18], 0.1) CHECK_PAR("target/stavis: satellite roll angle rate .", res[49], res_cf[19], 0.1) CHECK_PAR("target/stavis: satellite yaw angle rate .", res[50], res_cf[20], 0.1) CHECK_PAR("target/stavis: cartesian position of target/station [x] .", res[0], res_cf[25], 1) CHECK_PAR("target/stavis: cartesian position of target/station [y] .", res[1], res_cf[26], 1) CHECK_PAR("target/stavis: cartesian position of target/station [z] .", res[2], res_cf[27], 1)END_CHECK/***************************************************************************************** * * --------- * Test case * --------- * * Test number : VT-10 * ****************************************************************************************/START_CHECK("Cross check between drsvis and stavis") /* Compute DRS position */ /* -------------------- */ local_status = genstate_drs(mjdrs,&longdrs,pos_cf,vel_cf,ierr_cf); CHECK_STATUS("genstate_drs status", local_status) func_id = PP_GENSTATE_DRS_ID; local_status = PP_Vector_Msg(&func_id, ierr_cf, &n_msg, msg); local_status = PP_Print_Msg(&n_msg, msg); /* Call drsvis */ /* ----------- */ local_status = drsvis(mjdp,pos,vel,acc,aocs,att,datt,mjdrs,pos_cf,vel_cf,resdrs_cf,ierr_cf); CHECK_STATUS("drsvis status", local_status) func_id = PP_DRSVIS_ID; local_status = PP_Vector_Msg(&func_id, ierr_cf, &n_msg, msg); local_status = PP_Print_Msg(&n_msg, msg); /* Calculate longitude, latitude and elevation of DRS and set it as 'station' position */ /* ----------------------------------------------------------------------------------- */ for (n_msg = 0; n_msg<3; n_msg++) res_cf[n_msg]=0; /* derivative to 0 */ local_status = pl_car_geo(&(resdrs_cf[25]),res_cf, &(sta[0]),&(sta[1]),&(sta[2]), &(res_cf[0]),&(res_cf[1]),&(res_cf[2])); CHECK_STATUS("pl_car_geo status", local_status) sta[3] = -90; /* Call stavis */ /* ----------- */ local_status = stavis(mjdp,pos,vel,acc,aocs,att,datt,sta,res_cf,ierr_cf); CHECK_STATUS("stavis status", local_status) func_id = PP_STAVIS_ID; local_status = PP_Vector_Msg(&func_id, ierr_cf, &n_msg, msg); local_status = PP_Print_Msg(&n_msg, msg); /* Compare results */ /* --------------- */ CHECK_PAR("drsvis/stavis: drs/station to satellite range .", resdrs_cf[0], res_cf[0], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite azimuth .", resdrs_cf[1], res_cf[1], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite elevation .", resdrs_cf[2], res_cf[2], 1e-4) CHECK_PAR("drsvis/stavis: satellite to drs/station azimuth .", resdrs_cf[3], res_cf[3], 1e-4) CHECK_PAR("drsvis/stavis: satellite to drs/station elevation .", resdrs_cf[4], res_cf[4], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite range-rate .", resdrs_cf[5], res_cf[5], 0.1) CHECK_PAR("drsvis/stavis: drs/station to satellite azimuth-rate .", resdrs_cf[6], res_cf[6], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite elevation-rate .", resdrs_cf[7], res_cf[7], 1e-4) CHECK_PAR("drsvis/stavis: satellite to drs/station azimuth-rate .", resdrs_cf[8], res_cf[8], 1e-4) CHECK_PAR("drsvis/stavis: satellite to drs/station elevation-rate .", resdrs_cf[9], res_cf[9], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite range-rate-rate .", resdrs_cf[10], res_cf[10], 1e-4) CHECK_PAR("drsvis/stavis: drs/station to satellite azimuth-rate-rate .", resdrs_cf[11], res_cf[11], 1e-6) CHECK_PAR("drsvis/stavis: drs/station to satellite elevation-rate-rate.", resdrs_cf[12], res_cf[12], 1e-6) CHECK_PAR("drsvis/stavis: satellite to drs/station azimuth-rate-rate .", resdrs_cf[13], res_cf[13], 1e-6) CHECK_PAR("drsvis/stavis: satellite to drs/station elevation-rate-rate.", resdrs_cf[14], res_cf[14], 1e-6) CHECK_PAR("drsvis/stavis: satellite pitch angle .", resdrs_cf[15], res_cf[15], 0.1) CHECK_PAR("drsvis/stavis: satellite roll angle .", resdrs_cf[16], res_cf[16], 0.1) CHECK_PAR("drsvis/stavis: satellite yaw angle .", resdrs_cf[17], res_cf[17], 0.1) CHECK_PAR("drsvis/stavis: satellite pitch angle rate .", resdrs_cf[18], res_cf[18], 1e-4) CHECK_PAR("drsvis/stavis: satellite roll angle rate .", resdrs_cf[19], res_cf[19], 1e-4) CHECK_PAR("drsvis/stavis: satellite yaw angle rate .", resdrs_cf[20], res_cf[20], 1e-4) CHECK_PAR("drsvis/stavis: satellite pitch angle rate rate .", resdrs_cf[21], res_cf[21], 1e-6) CHECK_PAR("drsvis/stavis: satellite roll angle rate rate .", resdrs_cf[22], res_cf[22], 1e-6) CHECK_PAR("drsvis/stavis: satellite yaw angle rate rate .", resdrs_cf[23], res_cf[23], 1e-6) CHECK_PAR("drsvis/stavis: geocentric distance of drv/station .", resdrs_cf[24], res_cf[24], 0.1) CHECK_PAR("drsvis/stavis: cartesian position of drs/station [x] .", resdrs_cf[25], res_cf[25], 0.1) CHECK_PAR("drsvis/stavis: cartesian position of drs/station [y] .", resdrs_cf[26], res_cf[26], 0.1) CHECK_PAR("drsvis/stavis: cartesian position of drs/station [z] .", resdrs_cf[27], res_cf[27], 0.1) CHECK_PAR("drsvis/stavis: satellite osculating true latitude .", resdrs_cf[28], res_cf[28], 0.1) CHECK_PAR("drsvis/stavis: satellite osculating true latitude rate .", resdrs_cf[29], res_cf[29], 1e-4) CHECK_PAR("drsvis/stavis: satellite osculating true latitude rate-rate.", resdrs_cf[30], res_cf[30], 1e-6)END_CHECK/***************************************************************************************** * * --------- * Test case * --------- * * Test number : VT-11 * ****************************************************************************************/START_CHECK("Cross check between target with ray-tracing mode = PP_PRED_REF and PP_LUT_REF") /* Input parameters */ /* ---------------- */ idir_ini = PP_TAR_LUT_INIT; idir_lut = PP_TAN; iray_lut = PP_LUT_REF + 1; freq_lut = 3.0e14; ieres_lut = PP_TARG_RES_SAT2TARG; iray_pred = PP_US76_REF; dir_lut[0] = 180.0; dir_lut[1] = 15.0; dir_lut[4] = 0.0; dir_lut[5] = 0.0; /* Set enviroment variable for defining output converter filename */ /* -------------------------------------------------------------- */ strcpy(atm_var,"PP_USER_REF_CONV_FILE_NAME=");#ifndef PL_WINDOWS strcat(atm_var,"../example/data/REFRACT_1976.OUT_conv");#else strcat(atm_var,"..\\example\\data\\REFRACT_1976.OUT_conv");#endif if ((put=putenv(atm_var))!=0){ printf("ERROR in setting enviroment variable"); return(PP_ERR); } /* System call for running converter */ /* --------------------------------- */ printf("-----------------------------------------------------------------------\n"); printf("Converter execution in progress. It will take about one hour and a half\n"); printf("-----------------------------------------------------------------------\n");#ifdef SOLARIS system("../lib/SOLARIS/pp_converter -cif ../example/data/REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#elif AIX system("../lib/AIX/pp_converter -cif ../example/data/REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#elif LINUX system("../lib/LINUX/pp_converter -cif ../example/data/REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#elif MACOS system("../lib/MACOS/pp_converter -cif ../example/data/REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#elif IRIX system("../lib/IRIX/pp_converter -cif ../example/data/REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#elif PL_WINDOWS system("..\\lib\\windows\\pp_converter -cif ..\\example\\data\\REFRACT_1976.DAT_conv -min_az 160.0 -max_az 200.0 -min_freq 2.05e7 -max_freq 1.25e9");#endif /* Initialize pp_target with PP_TAR_LUT_INIT */ /* ----------------------------------------- */ local_status = target(mjdp, pos, vel, acc, aocs, att, datt, &idir_ini, dir_lut, &iray_lut, &freq_lut, &ieres_lut, res_lut, status); CHECK_STATUS("target status", local_status) /* Call pp_target with iray=PP_PRED_REF(US76_REF) */ /* ---------------------------------------------- */ local_status = target(mjdp, pos, vel, acc, aocs, att, datt, &idir_lut, dir_lut, &iray_pred, &freq_lut, &ieres_lut, res_pred, status); CHECK_STATUS("target status", local_status) /* Call pp_target with iray=PP_LUT_REF */ /* ----------------------------------- */ local_status = target(mjdp, pos, vel, acc, aocs, att, datt, &idir_lut, dir_lut, &iray_lut, &freq_lut, &ieres_lut, res_lut, status); CHECK_STATUS("target status", local_status) /* Results comparation */ /* ------------------- */ CHECK_VEC("results vector", res_lut, res_pred, 0, 13, 1.e-3)END_CHECK END_VALIDATION
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -