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

For Loop numerical diff. from straight prop.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      There seems to be an error in for loop propagation. For an Earth Moon L2 orbit I'm getting very different results with and without for loop propagation. I've attached the script to this bug.

      Here are the final position vector states for the Earth Moon L2 AllPlanets test case (GMAT release 1.0):
      (All have integrator tolerances of 1e-13 and the numbers below are in km)

      Using RSSState, no For Loop, and Override Time System checked
      -308883.3788117321 -306399.6864364018 -150356.5882379661
      Using RSSState, no For Loop, and Override Time System unchecked
      -308883.492238578 -306399.754436648 -150356.6171130495
      Using RSSStep, no For Loop, and Override Time System checked
      -308883.3788403962 -306399.6864533593 -150356.5882449114
      Using RSSStep, no For Loop, and Override Time System unchecked
      -308883.4921739086 -306399.7543996003 -150356.6170970566

      Using RSSState, For Loop, and Override Time System checked
      -308658.0297198109 -306258.6681392685 -150297.7684587897
      Using RSSState, For Loop, and Override Time System unchecked
      -308608.869362031 -306234.9470862754 -150285.646231368
      Using RSSStep, For Loop, and Override Time System checked
      -308829.0574187836 -306367.5224973172 -150342.7573048955
      Using RSSStep, For Loop, and Override Time System unchecked
      -308816.1157354724 -306359.9122561714 -150339.4524902653

      The RSSState/RSSStep, no For Loop, and Override Time System checked cases compare the best with STK's results.
      STK's Final State using relative to state
      -308883.3788190030 -306399.68644114392 -150356.58823942862

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              shughes Steven Hughes added a comment -

              Attachment PropSyncNumericTest.script has been added with description: DifferenceAfterAFewSteps.script

              Show
              shughes Steven Hughes added a comment - Attachment PropSyncNumericTest.script has been added with description: DifferenceAfterAFewSteps.script
              Hide
              djcinsb Darrel Conway added a comment -

              The "DifferenceAfterAFewSteps" script can be made to give identical results is the initialization in the Propagate::PrepareToPropagate() is set to use identical code for subsequent calls as it uses the first time through. Even with that setting, the Deep Space test shows differences of 1000's of km and the ESL2_AllPlanets test 100's of km, though. This change does fix the "AfterAFewSteps" test case, though. (So it looks like there are several issues in this bug that need resolution.)

              Show
              djcinsb Darrel Conway added a comment - The "DifferenceAfterAFewSteps" script can be made to give identical results is the initialization in the Propagate::PrepareToPropagate() is set to use identical code for subsequent calls as it uses the first time through. Even with that setting, the Deep Space test shows differences of 1000's of km and the ESL2_AllPlanets test 100's of km, though. This change does fix the "AfterAFewSteps" test case, though. (So it looks like there are several issues in this bug that need resolution.)
              Hide
              djcinsb Darrel Conway added a comment -

              The issue is in the DE405 file reader. If I use DE405 and throw away the outer planets (Jupiter outwards), the Deep Space test gives these states:

              Straight prop:
              Epoch: 23737.00037076831
              Position: 35229656.11745524 530026.133806409 2699415.796548248 Velocity: -0.4481065347665907 6.571849231340503 2.910874468955879

              For loop:
              Epoch: 23737.00037076839
              Position: 35232056.97150666 530883.4544694923 2699795.58657302
              Velocity: -0.447862100428522 6.572306864724192 2.911080968586948

              (Thousands of km different.) Changing to SPICE planetary ephemerides (that's why I threw away the outer bodies), the same settings give:

              Straight prop:
              Epoch: 23737.00037076831
              Position: 35229664.98674205 530025.9066709154 2699415.535659882
              Velocity: -0.4481064400079655 6.571850921007537 2.910875201953468

              For loop:
              Epoch: 23737.00037076831
              Position: 35229664.98672554 530025.9066716465 2699415.535660184
              Velocity: -0.4481064400080901 6.571850921004231 2.910875201951987

              (cm level differences.)

              One additional note: I'm also seeing a 3.9 cm discontinuity in the Earth-centered Moon position every 7 msec from the DE file reader. This may be the issue for this bug, and for the wonky step size control when we try to integrate a Moon-centered orbit with Earth as the force model body of origin.

              Show
              djcinsb Darrel Conway added a comment - The issue is in the DE405 file reader. If I use DE405 and throw away the outer planets (Jupiter outwards), the Deep Space test gives these states: Straight prop: Epoch: 23737.00037076831 Position: 35229656.11745524 530026.133806409 2699415.796548248 Velocity: -0.4481065347665907 6.571849231340503 2.910874468955879 For loop: Epoch: 23737.00037076839 Position: 35232056.97150666 530883.4544694923 2699795.58657302 Velocity: -0.447862100428522 6.572306864724192 2.911080968586948 (Thousands of km different.) Changing to SPICE planetary ephemerides (that's why I threw away the outer bodies), the same settings give: Straight prop: Epoch: 23737.00037076831 Position: 35229664.98674205 530025.9066709154 2699415.535659882 Velocity: -0.4481064400079655 6.571850921007537 2.910875201953468 For loop: Epoch: 23737.00037076831 Position: 35229664.98672554 530025.9066716465 2699415.535660184 Velocity: -0.4481064400080901 6.571850921004231 2.910875201951987 (cm level differences.) One additional note: I'm also seeing a 3.9 cm discontinuity in the Earth-centered Moon position every 7 msec from the DE file reader. This may be the issue for this bug, and for the wonky step size control when we try to integrate a Moon-centered orbit with Earth as the force model body of origin.
              Hide
              djcinsb Darrel Conway added a comment -

              Fixed 9/9/2010

              Updated the DE file reader so that epoch calculations do not need to go through the full Julian date

              Show
              djcinsb Darrel Conway added a comment - Fixed 9/9/2010 Updated the DE file reader so that epoch calculations do not need to go through the full Julian date
              Hide
              jjkparker Joel Parker added a comment -

              Closing all issues with "Resolved" status in Bugzilla

              Show
              jjkparker Joel Parker added a comment - Closing all issues with "Resolved" status in Bugzilla

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: