From f2253009e05e14c56dd29f1b388206b24c576190 Mon Sep 17 00:00:00 2001 From: ginan-release-bot Date: Wed, 5 Apr 2023 03:18:31 +0000 Subject: [PATCH] Release v1.5.3 --- CHANGELOG.md | 11 +++++++++++ README.md | 4 ++-- docker/run-aux.sh | 4 ++-- docker/tags | 2 +- src/fortran/m_eop_igu.f95 | 16 +++++++++++++--- src/fortran/m_orbitIC.f95 | 25 ++++++++++++++++++++----- src/fortran/m_pod_gnss.f95 | 30 ++++++++++++++++++++++++++---- 7 files changed, 75 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aab036f2..e62c80841 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +# [1.5.3] 2023-04-04 +### Added +### Changed +### Fixed +POD crash using initial conditions file when the first satellite is excluded +POD to use IC ERP data when not enough supplied by standard ERP file. + +### Deprecated +### Removed +### Security + # [1.5.2] 2022-12-28 ### Added ### Changed diff --git a/README.md b/README.md index c85abc64f..5b6a5f53d 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ : This script will install all dependencies, clone the Ginan repo into the current directory and build the Ginan toolkit. -#### `Ginan v1.5.2 release` +#### `Ginan v1.5.3 release` ## Overview @@ -56,7 +56,7 @@ Ginan is supported on the following platforms You can quickly download a ready-to-run Ginan environment using docker by running: - docker run -it -v /data:/data gnssanalysis/ginan:v1.5.2 bash + docker run -it -v /data:/data gnssanalysis/ginan:v1.5.3 bash This command connects the `/data` directory on the host (your pc), with the `/data` directory in the container, to allow file access between the two systems, and opens a command line (`bash`) for executing commands. diff --git a/docker/run-aux.sh b/docker/run-aux.sh index acba77303..06d22d1cf 100644 --- a/docker/run-aux.sh +++ b/docker/run-aux.sh @@ -12,7 +12,7 @@ shopt -s extglob function diffex() { for file in $@; do - diffutil.py -i $file -o solutions/$file -a $ATOL - diffutil.py -i $file -o solutions/$file + ../scripts/diffutil.py -i $file -o solutions/$file -a $ATOL + ../scripts/diffutil.py -i $file -o solutions/$file done } \ No newline at end of file diff --git a/docker/tags b/docker/tags index 8e0fb667c..064094c5a 100644 --- a/docker/tags +++ b/docker/tags @@ -1,2 +1,2 @@ -PEA="73bbcff" +PEA="2c7eb4a" POD="0c8627b" diff --git a/src/fortran/m_eop_igu.f95 b/src/fortran/m_eop_igu.f95 index 4db10fe2f..a2cdcd1a6 100644 --- a/src/fortran/m_eop_igu.f95 +++ b/src/fortran/m_eop_igu.f95 @@ -57,6 +57,7 @@ SUBROUTINE eop_igu (mjd, ERP_fname, ERP_days, EOP_days, EOP_Nint, EOP_int) USE mdl_precision USE mdl_num use pod_yaml + use mdl_eop, only : ERP_day_IC IMPLICIT NONE ! ---------------------------------------------------------------------- @@ -108,7 +109,16 @@ SUBROUTINE eop_igu (mjd, ERP_fname, ERP_days, EOP_days, EOP_Nint, EOP_int) end if ERP_read_data(i,:) = ERP_days(i, :) end do - ! print *, "saved_row_count = ", saved_row_count + if (saved_row_count < EOP_Nint) then + if (ERP_day_IC(1,1) .ne. 0.d0) then + saved_row_count = size(ERP_day_IC, DIM=1) + Deallocate (ERP_Read_data) + Allocate(ERP_read_data(saved_row_count, EOP_MAX_ARRAY), stat=Allocate_status) + ERP_read_data(1:saved_row_count, 1:4) = ERP_day_IC(1:saved_row_count, 1:4) + ERP_read_data(1:saved_row_count, 5:EOP_MAX_ARRAY) = 0.d0 + end if + end if + !print *, "saved_row_count = ", saved_row_count, ", EOP_Nint =", EOP_Nint DO i = 1, saved_row_count - 1 if (i == 1) erp_spacing = ERP_read_data(2, EOP_MJD) - ERP_read_data(1, EOP_MJD) if ((ERP_read_data(i, EOP_MJD) <= mjd) .and. (mjd <= ERP_read_data(i+1, EOP_MJD))) then @@ -128,8 +138,8 @@ SUBROUTINE eop_igu (mjd, ERP_fname, ERP_days, EOP_days, EOP_Nint, EOP_int) ERP_igu_data = ERP_read_data(lo:hi, :) EOP_Nint_used = EOP_Nint else if (i <= EOP_nint/2) then - ERP_igu_data = ERP_read_data(1:EOP_Nint,:) - EOP_Nint_used = EOP_nint + ERP_igu_data = ERP_read_data(1:EOP_Nint,:) + EOP_Nint_used = EOP_nint else if (i >= (saved_row_count - EOP_Nint/2)) then ERP_igu_data = ERP_read_data(saved_row_count - EOP_Nint + 1:saved_row_count, :) EOP_nint_used = EOP_Nint diff --git a/src/fortran/m_orbitIC.f95 b/src/fortran/m_orbitIC.f95 index bf2f13c76..a16300268 100644 --- a/src/fortran/m_orbitIC.f95 +++ b/src/fortran/m_orbitIC.f95 @@ -80,14 +80,17 @@ SUBROUTINE orbitIC (fname, IC_matrix, PRNmatrix) CHARACTER (LEN=3) :: PRN_i CHARACTER (LEN=1) :: char1 CHARACTER (LEN=6) :: PRi, PTi, PNi - INTEGER (KIND = prec_int8) :: mjd_i + CHARACTER (LEN=12) :: not_estimated + INTEGER (KIND = prec_int8) :: mjd_i, parms_read, parms_read_old REAL (KIND = prec_q) :: sec00_i, xo, yo, zo, Vxo, Vyo, Vzo REAL (KIND = prec_q) :: ERP_OFF_ic(4), ERP_RATE_ic(4), t_off - logical erp_offs_read, erp_rates_read + logical erp_offs_read, erp_rates_read, found ! ---------------------------------------------------------------------- erp_offs_read = .false. erp_rates_read = .false. +not_estimated = "Nparam: 0 -" +parms_read = 0 UNIT_IN = 9 ! ---------------------------------------------------------------------- @@ -166,18 +169,29 @@ SUBROUTINE orbitIC (fname, IC_matrix, PRNmatrix) !#IC_INFO PRN: G01 SVN: 63 BLK_TYP: GPS-IIF MASS: 1633.0000 SRP: CBALL ECOM2 Nparam: 15 - X Y Z XV YV ZV D0 Y0 B0 BC BS D2C D2S D4C D4S !OR !#IC_INFO PRN: G04 SVN: 36 ----> UNHEALTHY <---- +! next line returns positive if substring is found + parms_read = Index(trim(line_ith), not_estimated) READ (line_ith, * , IOSTAT=ios_data) word_i, word_i, PRN_i, word_i, word_i , & word_i, healthy, word_i, word_i, word_i, word_i, word_i, word_i, Nparam_isat - if (len(trim(line_ith)) .le. 96 .and. trim(healthy) .ne. 'UNHEALTHY' ) then + if ((parms_read .gt. 0) .or. (len(trim(line_ith)) .le. 96 .and. trim(healthy) .ne. 'UNHEALTHY') ) then print *, "WARNING - PRN: ", PRN_i, " not estimated by PEA" - cycle + found = .false. + do j = 1, yml_exclude_prn_count + if (yml_exclude_prns(j)%prn_name == PRN_i) found = .true. + end do + if (.not. found) then + yml_exclude_prn_count = yml_exclude_prn_count + 1 + yml_exclude_prns(yml_exclude_prn_count)%prn_name = trim(PRN_i) + end if endif if ( trim(healthy) .ne. 'UNHEALTHY') then isat = isat + 1 - If (Nparam_isat > Nparam) Nparam = Nparam_isat + If ((parms_read .eq. 0) .and. (Nparam_isat > Nparam)) Nparam = Nparam_isat else + if (trim(healthy) .eq. 'UNHEALTHY') then ! UNHEALTHY status is a second line. Don't add to the count now PRINT *, "WARNING - PRN: ", PRN_i, " set ", trim(healthy), " by PEA" + endif endif !PRINT *, "Nparam_isat: ", Nparam_isat !PRINT *, "Nparam: ", word1_ln @@ -228,6 +242,7 @@ SUBROUTINE orbitIC (fname, IC_matrix, PRNmatrix) PRINT *, "Error: Not enough memory" PRINT *, "Error: SUBROUTINE orbitIC in module m_orbitIC.f03" PRINT *, "Error: Allocatable Array: IC_matrix" +! PRINT *, "Requested size = ", Nsat, " * ", Nparam+2 ! STOP "*** Not enough memory ***" END IF IC_matrix = 0.d0 diff --git a/src/fortran/m_pod_gnss.f95 b/src/fortran/m_pod_gnss.f95 index c142d3dc1..f72a24f81 100644 --- a/src/fortran/m_pod_gnss.f95 +++ b/src/fortran/m_pod_gnss.f95 @@ -260,8 +260,16 @@ SUBROUTINE pod_gnss (EQMfname, VEQfname, PRNmatrix, orbpara_sigma, orbits_partia !print *,"IC_matrix_glb(1,1)", IC_matrix_glb(1,1) -mjd0 = IC_matrix_glb(1,1) -Sec_00 = IC_matrix_glb(1,2) +sz1 = SIZE(IC_matrix_glb, DIM=1) +do idx = 1, sz1 +mjd0 = IC_matrix_glb(idx,1) +Sec_00 = IC_matrix_glb(idx,2) +if (mjd0 == 0.d0) then + cycle +else + exit +endif +end do jd0 = 2400000.5D0 mjd = mjd0 + Sec_00 / 86400.0D0 @@ -363,7 +371,18 @@ SUBROUTINE pod_gnss (EQMfname, VEQfname, PRNmatrix, orbpara_sigma, orbits_partia ! Precise Orbit Determination :: Multi-GNSS multi-satellites POD loop ! ---------------------------------------------------------------------- ! read the (eop? and) sinex files to load up memory before starting the satellite loop -PRN_isat = PRNmatrix(1) +do idx = 1, Nsat + jfound = .false. + do j = 1, yml_exclude_prn_count + if (trim(yml_exclude_prns(j)%prn_name) == PRNmatrix(idx)) then + jfound = .true. + exit + end if + end do + if (.not. jfound) exit +end do + +PRN_isat = PRNmatrix(idx) CALL read_satsnx(yml_satsinex_filename, Iyear, DOY, SEC_00, PRN_isat) ! ---------------------------------------------------------------------- @@ -420,7 +439,10 @@ SUBROUTINE pod_gnss (EQMfname, VEQfname, PRNmatrix, orbpara_sigma, orbits_partia if (.not. docycle .and. jfound) docycle = .true. !forcefully excluded end if -if (docycle) cycle +if (docycle) then + print *, "PRN ", PRN_isat, " excluded" + cycle +end if yml_satellites(isat) = .true. !print *,"Satellite: ", PRNmatrix(isat) ! isat