diff --git a/grss/fit/fit_radar.py b/grss/fit/fit_radar.py index 935a4e4c..b2806820 100644 --- a/grss/fit/fit_radar.py +++ b/grss/fit/fit_radar.py @@ -71,7 +71,6 @@ def add_radar_obs(obs_df, t_min_tdb=None, t_max_tdb=None, verbose=False): print(f"Read in {num_obs} radar observations from JPL radar API.") data = raw_data['data'] time_range_count = 0 - pre1972_count = 0 for i in range(num_obs): obs = data[num_obs-i-1] date = Time(obs[1], format='iso', scale='utc') @@ -105,14 +104,6 @@ def add_radar_obs(obs_df, t_min_tdb=None, t_max_tdb=None, verbose=False): obs_df.loc[idx,'frq'] = freq obs_df.loc[idx,'sigDelay'] = obs_sigma if delay else np.nan obs_df.loc[idx,'sigDoppler'] = obs_sigma if doppler else np.nan - if date.utc.mjd < 41317: - pre1972_count += 1 - obs_df.loc[idx,'selAst'] = 'd' - if pre1972_count > 0: - print(f"\tWARNING: {pre1972_count} radar observations were taken before 1972.\n" - "\t\tThese residuals cannot be reliably computed because high-accuracy Earth " - "orientation kernels are not available for this time period.\n" - "\t\tForce deleting them...") if verbose: print(f"\tFiltered to {num_obs-time_range_count} observations that satisfy the " "time range constraints.") diff --git a/grss/kernels/get_kernels.py b/grss/kernels/get_kernels.py index 817af211..c9c03490 100644 --- a/grss/kernels/get_kernels.py +++ b/grss/kernels/get_kernels.py @@ -37,26 +37,26 @@ # get the earth orientation binary spice kernels and their comments if they are not already present # latest earth pck -latest_earth_pck_exists = os.path.exists(f'{script_dir}/earth_latest_high_prec.bpc') +latest_earth_pck_exists = os.path.exists(f'{script_dir}/earth_latest.bpc') latest_earth_pck_old = (latest_earth_pck_exists and - time.time() - os.path.getmtime(f'{script_dir}/earth_latest_high_prec.bpc') + time.time() - os.path.getmtime(f'{script_dir}/earth_latest.bpc') > 86400) if not latest_earth_pck_exists or latest_earth_pck_old: print('Downloading latest Earth binary PCK...') - os.system((f'curl --silent --show-error -o {script_dir}/earth_latest_high_prec.bpc ' + os.system((f'curl --silent --show-error -o {script_dir}/earth_latest.bpc ' f'{NAIF_SITE}/pck/earth_latest_high_prec.bpc')) # historical earth pck -historical_earth_pck_exists = os.path.exists(f'{script_dir}/earth_720101_230601.bpc') +historical_earth_pck_exists = os.path.exists(f'{script_dir}/earth_historic.bpc') if not historical_earth_pck_exists: - print('Downloading historical Earth binary PCK...') - os.system((f'curl --silent --show-error -o {script_dir}/earth_720101_230601.bpc ' - f'{NAIF_SITE}/pck/earth_720101_230601.bpc')) + print('Downloading historic Earth binary PCK...') + os.system((f'curl --silent --show-error -o {script_dir}/earth_historic.bpc ' + f'{NAIF_SITE}/pck/earth_620120_240827.bpc')) # predicted earth pck -predicted_earth_pck_exists = os.path.exists(f'{script_dir}/earth_200101_990825_predict.bpc') +predicted_earth_pck_exists = os.path.exists(f'{script_dir}/earth_predict.bpc') if not predicted_earth_pck_exists: print('Downloading predicted Earth binary PCK...') - os.system((f'curl --silent --show-error -o {script_dir}/earth_200101_990825_predict.bpc ' - f'{NAIF_SITE}/pck/earth_200101_990825_predict.bpc')) + os.system((f'curl --silent --show-error -o {script_dir}/earth_predict.bpc ' + f'{NAIF_SITE}/pck/earth_200101_990827_predict.bpc')) # generic frame kernels generic_frame_kernel_exists = os.path.exists(f'{script_dir}/pck00011.tpc') if not generic_frame_kernel_exists: diff --git a/grss/version.txt b/grss/version.txt index 078bf8b7..ec87108d 100644 --- a/grss/version.txt +++ b/grss/version.txt @@ -1 +1 @@ -4.2.2 \ No newline at end of file +4.2.3 \ No newline at end of file diff --git a/src/simulation.cpp b/src/simulation.cpp index 7aa038d6..39dcd48c 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -21,9 +21,10 @@ void get_baseBodyFrame(const int &spiceId, const real &tMjdTDB, break; case 399: baseBodyFrame = "ITRF93"; - // High precision frame is not defined before 1972 JAN 01 - // 00:00:42.183 TDB or after 2099 AUG 25 00:01:09.182 TDB - if (tMjdTDB < 41317.000488239L || tMjdTDB > 87940.000800717L) { + // High precision frame is not defined + // before 1962 JAN 20 00:00:41.184 TDB or + // after 2099 AUG 27 00:01:09.182 TDB + if (tMjdTDB < 37684.0004767L || tMjdTDB > 87942.0008007L) { baseBodyFrame = "IAU_EARTH"; } break; @@ -691,9 +692,9 @@ PropSimulation::PropSimulation(std::string name, real t0, } this->spkEphem.mbPath = kernel_mb; this->spkEphem.sbPath = kernel_sb; - this->pckEphem.histPckPath = DEkernelPath + "earth_720101_230601.bpc"; - this->pckEphem.latestPckPath = DEkernelPath + "earth_latest_high_prec.bpc"; - this->pckEphem.predictPckPath = DEkernelPath + "earth_200101_990825_predict.bpc"; + this->pckEphem.histPckPath = DEkernelPath + "earth_historic.bpc"; + this->pckEphem.latestPckPath = DEkernelPath + "earth_latest.bpc"; + this->pckEphem.predictPckPath = DEkernelPath + "earth_predict.bpc"; } /** diff --git a/tests/cpp/prop/pck_map.cpp b/tests/cpp/prop/pck_map.cpp index f1facd3a..301c6d53 100644 --- a/tests/cpp/prop/pck_map.cpp +++ b/tests/cpp/prop/pck_map.cpp @@ -12,8 +12,8 @@ int main(){ std::random_device rd; // Will be used to obtain a seed for the random number engine std::mt19937 gen(rd()); // Standard mersenne_twister_engine seeded with rd() // limits of distribution are dictated by the time span of - // earth_720101_230601.bpc and earth_200101_990825_predict.bpc - std::uniform_real_distribution<> dis(41317.0005, 87940.0008); + // earth_620120_240827.bpc and earth_200101_990827_predict.bpc + std::uniform_real_distribution<> dis(37684.0004767L, 87942.0008007L); std::cout << "/////////////////////// PCK map accuracy test ///////////////////////" @@ -24,9 +24,9 @@ int main(){ std::string from = "ITRF93"; std::string to = "J2000"; std::string pck_text = "../../../grss/kernels/pck00011.tpc"; - std::string pck_hist = "../../../grss/kernels/earth_720101_230601.bpc"; - std::string pck_latest = "../../../grss/kernels/earth_latest_high_prec.bpc"; - std::string pck_predict = "../../../grss/kernels/earth_200101_990825_predict.bpc"; + std::string pck_hist = "../../../grss/kernels/earth_historic.bpc"; + std::string pck_latest = "../../../grss/kernels/earth_latest.bpc"; + std::string pck_predict = "../../../grss/kernels/earth_predict.bpc"; //////////// GRSS //////////// PckEphemeris pckEphem;