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

Vary command validation issue

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: R2013a
    • Component/s: Vary Command (FRC-2)
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

      Description

      Created an attachment (id=589)
      ThisDoesntWork.script

      Build 12-10-07

      Description: The vary command does not handle including the coordinate system in the description of the parameter to be varied. This is illustrated in the attaches script called ThisDoesn'tWork. Here is the line that causes the issue

      Vary DefaultDC(DefaultSC.LunarMOP.VMAG = 2.445, {Perturbation .......

      This line works as expected though

      Vary DefaultDC(DefaultSC.VMAG = 2.445, {Perturbation .......

      This is really a design issue in my opinion. I think we eventually want to support this capability. However, until we address this, I'll classify this issue as a validation issue that should notify the user they made a syntax error.

      The script ThisDoesWork.script shows what we do support.

      When this bug is addressed, we should reclassify it as design rather than close it out!!!

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            djcinsb Darrel Conway added a comment -

            Are there any 2-dot variable types currently supported? If not, I have a fix that throws this exception any time a 2-dotted name is encountered (but with the right command line, of course!):

            1: **** ERROR **** Command Exception: Error scripting the variable in the Vary command: Coordinate systems and Central Bodies are not supported on the left hand side at this time in line:
               " 349:    Vary DefaultDC(DefaultSC.LunarMOP.VMAG = 2.445, {Perturbation = 0.0001, MaxStep = 0.1, Lower = 2.42, Upper = 2.46});"
            
            
            Show
            djcinsb Darrel Conway added a comment - Are there any 2-dot variable types currently supported? If not, I have a fix that throws this exception any time a 2-dotted name is encountered (but with the right command line, of course!): 1: **** ERROR **** Command Exception: Error scripting the variable in the Vary command: Coordinate systems and Central Bodies are not supported on the left hand side at this time in line: " 349: Vary DefaultDC(DefaultSC.LunarMOP.VMAG = 2.445, {Perturbation = 0.0001, MaxStep = 0.1, Lower = 2.42, Upper = 2.46});"
            Hide
            dcooley Steve Cooley added a comment -

            Use Steve's "This does not work" script. Just change the CoordinateSystem to EarthMJ2000Eq as I did below.

            Error message received in the situation where we use the following 2 GMAT commands (fo example, in Steve's attached scrpt)

            GMAT DefaultSC.CoordinateSystem = EarthMJ2000Eq;
            Vary DefaultDC(DefaultSC.LunarMOP.VMAG = 2.445,

            {Perturbation = 0.0001, MaxStep = 0.1, Lower = 2.42, Upper = 2.46}

            );

            is

            Currently GMAT cannot set DefaultSC.LunarMOP.VMAG; the spacecraft 'DefaultSC' requires values to be in the 'EarthMJ2000Eq' coordinate system (setting values in different coordinate systems will be implemented in future builds)

            We all still need to agree on a better phrasing for the error message.

            Show
            dcooley Steve Cooley added a comment - Use Steve's "This does not work" script. Just change the CoordinateSystem to EarthMJ2000Eq as I did below. Error message received in the situation where we use the following 2 GMAT commands (fo example, in Steve's attached scrpt) GMAT DefaultSC.CoordinateSystem = EarthMJ2000Eq; Vary DefaultDC(DefaultSC.LunarMOP.VMAG = 2.445, {Perturbation = 0.0001, MaxStep = 0.1, Lower = 2.42, Upper = 2.46} ); is Currently GMAT cannot set DefaultSC.LunarMOP.VMAG; the spacecraft 'DefaultSC' requires values to be in the 'EarthMJ2000Eq' coordinate system (setting values in different coordinate systems will be implemented in future builds) We all still need to agree on a better phrasing for the error message.
            Hide
            djcinsb Darrel Conway added a comment -

            The message is actually posted from the Parameter class OrbitData. I'll add a catch for it to Vary, and post the message shown above unless a better suggestion is made.

            Show
            djcinsb Darrel Conway added a comment - The message is actually posted from the Parameter class OrbitData. I'll add a catch for it to Vary, and post the message shown above unless a better suggestion is made.
            Hide
            djcinsb Darrel Conway added a comment - - edited

            I set a run-time exception when the variable is not defined compatibly. Let me know if a different message is selected for this; that's easy to update.

            Look for this 12/7 or later

            Show
            djcinsb Darrel Conway added a comment - - edited I set a run-time exception when the variable is not defined compatibly. Let me know if a different message is selected for this; that's easy to update. Look for this 12/7 or later
            Hide
            dcooley Steve Cooley added a comment -

            Updated expected error message for test, Vary_Validation_Different_SC_CoordinateSystems, which now passes.

            Show
            dcooley Steve Cooley added a comment - Updated expected error message for test, Vary_Validation_Different_SC_CoordinateSystems, which now passes.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: