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

Empty Brackets Behavior Confusing

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: R2014a, R2015a, R2016a, R2017a, R2018A
    • Fix Version/s: Someday
    • Component/s: Script Language
    • Labels:
      None

      Description

      GMAT's behavior parsing empty brackets is very confusing, and potentially object specific. I would expect the script below to result in no primary bodies and no Point mass bodies (which is not allowed, i am trying to write a validatin test). However, this script propagates because it apparently uses default of Earth for PrimaryBody.

      We need to document at minimum and make an attempt at consistency accross objects.

      Create Spacecraft aSat;

      Create ForceModel aForceModel;
      %aForceModel.CentralBody = Earth;
      aForceModel.PrimaryBodies = {}
      aForceModel.PointMasses = {};

      Create Propagator aProp;
      aProp.FM = aForceModel;

      BeginMissionSequence

      Propagate aProp(aSat,

      {aSat.ElapsedDays = .2}

      );

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              shughes Steven Hughes created issue -
              shughes Steven Hughes made changes -
              Field Original Value New Value
              Description
              GMAT's behavior parsing empty brackets is very confusing, and potentially object specific. I would expect the script below to result in no primary bodies and no Point mass bodies (which is not allowed, i am trying to write a validatin test). However, this script propagates because it apparently uses default of Earth for PrimaryBody.

              We need to document at minimum and make an attempt at consistency accross objects.


              Create Spacecraft aSat;

              Create ForceModel aForceModel;
              %aForceModel.CentralBody = Earth;
              aForceModel.PrimaryBodies = {}
              aForceModel.PointMasses = {};

              Create Propagator aProp;
              aProp.FM = aForceModel;

              BeginMissionSequence

              Propagate aProp(aSat, {aSat.ElapsedDays = .2});
              GMAT's behavior parsing empty brackets is very confusing, and potentially object specific. I would expect the script below to result in no primary bodies and no Point mass bodies (which is not allowed, i am trying to write a validatin test). However, this script propagates because it apparently uses default of Earth for PrimaryBody.

              We need to document at minimum and make an attempt at consistency accross objects.


              Create Spacecraft aSat;

              Create ForceModel aForceModel;
              %aForceModel.CentralBody = Earth;
              aForceModel.PrimaryBodies = {}
              aForceModel.PointMasses = {};

              Create Propagator aProp;
              aProp.FM = aForceModel;

              BeginMissionSequence

              Propagate aProp(aSat, {aSat.ElapsedDays = .2});
              Priority P2 [ 3 ] P1 [ 1 ]
              Fix Version/s 2013a [ 10201 ]
              Assignee Steven Hughes [ shughes ] Linda Jun [ gmatloj ]
              gmatloj Linda Jun made changes -
              Component/s Script Language [ 10583 ]
              gmatloj Linda Jun made changes -
              Assignee Linda Jun [ gmatloj ] Joel Parker [ jjkparker ]
              jjkparker Joel Parker made changes -
              Link This issue is duplicated by GMT-3341 [ GMT-3341 ]
              jjkparker Joel Parker made changes -
              Fix Version/s R2013a [ 10201 ]
              shughes Steven Hughes made changes -
              Fix Version/s R2013a [ 10201 ]
              jjkparker Joel Parker made changes -
              Status Open [ 1 ] In Progress [ 3 ]
              jjkparker Joel Parker made changes -
              Priority P1 [ 1 ] P3 [ 5 ]
              Fix Version/s R2013a [ 10201 ]
              Fix Version/s Someday [ 10200 ]
              jjkparker Joel Parker made changes -
              Status In Progress [ 3 ] Open [ 1 ]
              shughes Steven Hughes made changes -
              Affects Version/s R2013c [ 10500 ]
              shughes Steven Hughes made changes -
              Affects Version/s R2015a [ 10600 ]
              shughes Steven Hughes made changes -
              Affects Version/s R2016a [ 10800 ]
              shughes Steven Hughes made changes -
              Affects Version/s R2017a [ 11000 ]
              shughes Steven Hughes made changes -
              Affects Version/s R2018A [ 11104 ]

                People

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

                  Dates

                  • Created:
                    Updated: