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

State conversion errors for a certain non-default orbit

    Details

      Description

      Load the default mission and open up DefaultSC. Set the Cartesian state to:

      X: -60072.4832989428
      Y: -4091.93458626603
      Z: -16258.9236962179
      VX: 1.49641430481871
      VY: -1.03625797448493
      VZ: 0.0014375710307264

      Hit apply and change the state type to Keplerian. There is an error in the SMA. The expected SMA = 42095
      But the value GMAT outputs SMA = 42095.00001108487.
      This leaves an error of 0.00001108487 which is outside the error tolerance of 1e-5.

      Then change the state type to Modified Keplerian. There is an error in RadApo. The expected RadApo = 76536.3628709998
      But the value GMAT outputs RadApo = 76536.3628869933
      This leave an error of 0.000015993500710465014 which is outside the error tolerance of 1e-5.

      Finally change the state type to Equinoctial. There is an error in the SMA that is the same as the Keplerian state type error.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            gmat_wcs Wendy Shoan added a comment -

            This error occurs in the CartesianToKeplerian method of the conversion utility.

            Debug (for conversion from Cartesian to Keplerian):

            CartesianToKeplerian() pos = -60072.4832989428 -4091.93458626603 -16258.9236962179 and vel = 1.49641430481871 -1.03625797448493 0.0014375710307264
            StateConversionUtil::ComputeCartToKepl called ...
            grav = 398600.4415000000
            KEP_ECC_TOL = 0.0000001000
            in ComputeCartToKepl, pos = -60072.48329894280323 -4091.93458626602978 -16258.92369621790021
            in ComputeCartToKepl, vel = 1.49641430481871 -1.03625797448493 0.00143757103073
            in ComputeCartToKepl, angMomentum = -16854.3217833686 -24243.7275382420 68373.8193149132
            in ComputeCartToKepl, h = 74476.8800060411
            in ComputeCartToKepl, nodeVec = 24243.7275382420 -16854.3217833686 0.0000000000
            in ComputeCartToKepl, n = 29526.7080407865
            in ComputeCartToKepl, posMag = 62368.2593802287
            in ComputeCartToKepl, velMag = 1.8201891187
            in ComputeCartToKepl, eccVec = 0.7855231965 -0.1911385626 0.1258603011
            in ComputeCartToKepl, e = 0.8181817999
            in ComputeCartToKepl, zeta = -4.7345342843
            in ComputeCartToKepl, Abs(1.0 - e) = 0.1818182001
            in ComputeCartToKepl, sma = 42095.0000110849
            returning 42095.00001108487 0.8181817999011519 23.35672999999996 325.1928420499999 22.83086998346587 198.2830900165342

            I have compared the code to the spec and it looks like it matches.

            Show
            gmat_wcs Wendy Shoan added a comment - This error occurs in the CartesianToKeplerian method of the conversion utility. Debug (for conversion from Cartesian to Keplerian): CartesianToKeplerian() pos = -60072.4832989428 -4091.93458626603 -16258.9236962179 and vel = 1.49641430481871 -1.03625797448493 0.0014375710307264 StateConversionUtil::ComputeCartToKepl called ... grav = 398600.4415000000 KEP_ECC_TOL = 0.0000001000 in ComputeCartToKepl, pos = -60072.48329894280323 -4091.93458626602978 -16258.92369621790021 in ComputeCartToKepl, vel = 1.49641430481871 -1.03625797448493 0.00143757103073 in ComputeCartToKepl, angMomentum = -16854.3217833686 -24243.7275382420 68373.8193149132 in ComputeCartToKepl, h = 74476.8800060411 in ComputeCartToKepl, nodeVec = 24243.7275382420 -16854.3217833686 0.0000000000 in ComputeCartToKepl, n = 29526.7080407865 in ComputeCartToKepl, posMag = 62368.2593802287 in ComputeCartToKepl, velMag = 1.8201891187 in ComputeCartToKepl, eccVec = 0.7855231965 -0.1911385626 0.1258603011 in ComputeCartToKepl, e = 0.8181817999 in ComputeCartToKepl, zeta = -4.7345342843 in ComputeCartToKepl, Abs(1.0 - e) = 0.1818182001 in ComputeCartToKepl, sma = 42095.0000110849 returning 42095.00001108487 0.8181817999011519 23.35672999999996 325.1928420499999 22.83086998346587 198.2830900165342 I have compared the code to the spec and it looks like it matches.
            Hide
            shughes Steven Hughes added a comment -

            I suspect this is an error in the truth data because in STK I get GMAT's results:

            sma: 42095.0000110849000000 km
            radapo: 76536.3628869934

            Shawn, I know I sent you truth data but can you show me the report so we can make sure any other errors are addressed?

            Show
            shughes Steven Hughes added a comment - I suspect this is an error in the truth data because in STK I get GMAT's results: sma: 42095.0000110849000000 km radapo: 76536.3628869934 Shawn, I know I sent you truth data but can you show me the report so we can make sure any other errors are addressed?
            Hide
            shughes Steven Hughes added a comment -

            CCB: P1 2013a. I believe this is bad truth data and we need to simply rewrite the test with new truth.

            Show
            shughes Steven Hughes added a comment - CCB: P1 2013a. I believe this is bad truth data and we need to simply rewrite the test with new truth.
            Hide
            shughes Steven Hughes added a comment -

            I confirmed this is a truth data problem. For the state above, here is the correct output

            SMA 42095.0000110849
            ECC 0.818181799901152
            INC 23.35673
            AOP 22.8308699834659
            RAAN 325.19284205
            TA 198.283090016534

            Shawn, can you use this truth data instead?

            Show
            shughes Steven Hughes added a comment - I confirmed this is a truth data problem. For the state above, here is the correct output SMA 42095.0000110849 ECC 0.818181799901152 INC 23.35673 AOP 22.8308699834659 RAAN 325.19284205 TA 198.283090016534 Shawn, can you use this truth data instead?
            Hide
            shoffman Shawn Hoffman added a comment -

            Spreadsheet updated

            Show
            shoffman Shawn Hoffman added a comment - Spreadsheet updated
            Hide
            shoffman Shawn Hoffman added a comment -

            Tests pass

            Show
            shoffman Shawn Hoffman added a comment - Tests pass

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: