Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-3745

Ephemeris files sometimes miss last data line in a chunk before a new event

    Details

      Description

      I will add more information later today.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            shughes Steven Hughes added a comment - - edited

            There is still an issue. Here is how to duplicate it but note that you will need the SPICE toolkit

            1) Run the script named CreateSPKStressTest.script
            2) Run the spacit SPICE utility on the kernel produced by GMAT
            3) Below is what I see from the utility.

            The second to last segment has this end time:
            UTC Stop Time : 2000 JAN 04 13:38:34.066
            The last segment has this start time:
            UTC Start Time : 2000 JAN 04 13:39:34.066

            Notice they are different by one minute but should should be the same.

            ********************************************************************************
             
            Summary for SPK file: SPICEStressTest22.bsp
            Leapseconds File    : naif0010.tls
            Summary Type        : Entire File
             
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 01 11:59:28.000
               UTC Stop Time  : 2000 JAN 02 03:29:45.600
               ET Start Time  : 2000 JAN 01 12:00:32.183
               ET Stop time   : 2000 JAN 02 03:30:49.783
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 02 03:29:45.600
               UTC Stop Time  : 2000 JAN 02 15:29:02.400
               ET Start Time  : 2000 JAN 02 03:30:49.783
               ET Stop time   : 2000 JAN 02 15:30:06.583
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 02 15:29:02.400
               UTC Stop Time  : 2000 JAN 03 12:16:24.549
               ET Start Time  : 2000 JAN 02 15:30:06.583
               ET Stop time   : 2000 JAN 03 12:17:28.733
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 03 12:16:24.549
               UTC Stop Time  : 2000 JAN 04 05:12:34.066
               ET Start Time  : 2000 JAN 03 12:17:28.733
               ET Stop time   : 2000 JAN 04 05:13:38.249
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 04 05:13:34.066
               UTC Stop Time  : 2000 JAN 04 11:12:34.066
               ET Start Time  : 2000 JAN 04 05:14:38.249
               ET Stop time   : 2000 JAN 04 11:13:38.249
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 04 11:13:34.066
               UTC Stop Time  : 2000 JAN 04 12:35:54.066
               ET Start Time  : 2000 JAN 04 11:14:38.249
               ET Stop time   : 2000 JAN 04 12:36:58.249
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 04 12:36:54.066
               UTC Stop Time  : 2000 JAN 04 13:38:34.066
               ET Start Time  : 2000 JAN 04 12:37:58.249
               ET Stop time   : 2000 JAN 04 13:39:38.249
            --------------------------------------------------------------------------------
            --------------------------------------------------------------------------------
               Segment ID     : SPK_SEGMENT
               Target Body    : Body -123456789
               Center Body    : Body 399, EARTH
               Reference frame: Frame 1, J2000
               SPK Data Type  : Type 13
                  Description : Discrete States, Unevenly Spaced, Hermite Interpolation
               UTC Start Time : 2000 JAN 04 13:39:34.066
               UTC Stop Time  : 2000 JAN 04 14:53:34.066
               ET Start Time  : 2000 JAN 04 13:40:38.249
               ET Stop time   : 2000 JAN 04 14:54:38.249
            --------------------------------------------------------------------------------
             
            ********************************************************************************
            
            Show
            shughes Steven Hughes added a comment - - edited There is still an issue. Here is how to duplicate it but note that you will need the SPICE toolkit 1) Run the script named CreateSPKStressTest.script 2) Run the spacit SPICE utility on the kernel produced by GMAT 3) Below is what I see from the utility. The second to last segment has this end time: UTC Stop Time : 2000 JAN 04 13:38:34.066 The last segment has this start time: UTC Start Time : 2000 JAN 04 13:39:34.066 Notice they are different by one minute but should should be the same. ******************************************************************************** Summary for SPK file: SPICEStressTest22.bsp Leapseconds File : naif0010.tls Summary Type : Entire File -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 01 11:59:28.000 UTC Stop Time : 2000 JAN 02 03:29:45.600 ET Start Time : 2000 JAN 01 12:00:32.183 ET Stop time : 2000 JAN 02 03:30:49.783 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 02 03:29:45.600 UTC Stop Time : 2000 JAN 02 15:29:02.400 ET Start Time : 2000 JAN 02 03:30:49.783 ET Stop time : 2000 JAN 02 15:30:06.583 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 02 15:29:02.400 UTC Stop Time : 2000 JAN 03 12:16:24.549 ET Start Time : 2000 JAN 02 15:30:06.583 ET Stop time : 2000 JAN 03 12:17:28.733 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 03 12:16:24.549 UTC Stop Time : 2000 JAN 04 05:12:34.066 ET Start Time : 2000 JAN 03 12:17:28.733 ET Stop time : 2000 JAN 04 05:13:38.249 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 04 05:13:34.066 UTC Stop Time : 2000 JAN 04 11:12:34.066 ET Start Time : 2000 JAN 04 05:14:38.249 ET Stop time : 2000 JAN 04 11:13:38.249 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 04 11:13:34.066 UTC Stop Time : 2000 JAN 04 12:35:54.066 ET Start Time : 2000 JAN 04 11:14:38.249 ET Stop time : 2000 JAN 04 12:36:58.249 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 04 12:36:54.066 UTC Stop Time : 2000 JAN 04 13:38:34.066 ET Start Time : 2000 JAN 04 12:37:58.249 ET Stop time : 2000 JAN 04 13:39:38.249 -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Segment ID : SPK_SEGMENT Target Body : Body -123456789 Center Body : Body 399, EARTH Reference frame: Frame 1, J2000 SPK Data Type : Type 13 Description : Discrete States, Unevenly Spaced, Hermite Interpolation UTC Start Time : 2000 JAN 04 13:39:34.066 UTC Stop Time : 2000 JAN 04 14:53:34.066 ET Start Time : 2000 JAN 04 13:40:38.249 ET Stop time : 2000 JAN 04 14:54:38.249 -------------------------------------------------------------------------------- ********************************************************************************
            Hide
            djcinsb Darrel Conway added a comment -

            This looked like an issue when the interpolator was restarted for a change in maneuvering state. I added a flag so that a maneuver state change forces a write of the initial trajectory point, and the reported issue looks like it is fixed. The committed tests scripts all run successfully as well. This change would benefit from some additional checks made by a user playing with written ephem files – both CCSDS and SPICE based – to be sure that I haven't introduced some unwanted feature.

            In other words, it looks good to me, but I might not know what to look for!

            Show
            djcinsb Darrel Conway added a comment - This looked like an issue when the interpolator was restarted for a change in maneuvering state. I added a flag so that a maneuver state change forces a write of the initial trajectory point, and the reported issue looks like it is fixed. The committed tests scripts all run successfully as well. This change would benefit from some additional checks made by a user playing with written ephem files – both CCSDS and SPICE based – to be sure that I haven't introduced some unwanted feature. In other words, it looks good to me, but I might not know what to look for!
            Hide
            shughes Steven Hughes added a comment -

            The second to last chunk in CCSDS file created from this script is missing the last line.

            Show
            shughes Steven Hughes added a comment - The second to last chunk in CCSDS file created from this script is missing the last line.
            Hide
            djcinsb Darrel Conway added a comment -

            One additional issue: in the code change, line 4111 reads

               justManeuvered == false;
            

            but should be

               justManeuvered = false;
            

            Since this seems to not be a release issue, I'll commit the change after the R2013a code is tagged. (Note: This might be the issue that reopened the bug)

            Show
            djcinsb Darrel Conway added a comment - One additional issue: in the code change, line 4111 reads justManeuvered == false; but should be justManeuvered = false; Since this seems to not be a release issue, I'll commit the change after the R2013a code is tagged. (Note: This might be the issue that reopened the bug)
            Hide
            gmatloj Linda Jun added a comment -

            Fixed to finish up writing when propagator changes. Correctly set the first time writing flag for SPICE file so that data can be written continuously.

            Show
            gmatloj Linda Jun added a comment - Fixed to finish up writing when propagator changes. Correctly set the first time writing flag for SPICE file so that data can be written continuously.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 3 hours
                  2d 3h