%---------------------------------------- %---------- Spacecraft %---------------------------------------- Create Spacecraft Sat1 Sat1Copy; GMAT Sat1.DateFormat = UTCGregorian; GMAT Sat1.Epoch = '01 Jul 2005 14:59:28.000'; GMAT Sat1.CoordinateSystem = EarthMJ2000Eq; GMAT Sat1.DisplayStateType = Keplerian; GMAT Sat1.SMA = 8191.93881762901; GMAT Sat1.ECC = 0.02454974900598161; GMAT Sat1.INC = 12.85008005658097; GMAT Sat1.RAAN = 306.6148021947984; GMAT Sat1.AOP = 314.1905515359913; GMAT Sat1.TA = 99.88774933204955; GMAT Sat1.DryMass = 850; GMAT Sat1.Cd = 2.2; GMAT Sat1.Cr = 1.8; GMAT Sat1.DragArea = 15; GMAT Sat1.SRPArea = 1; GMAT Sat1Copy.DateFormat = UTCGregorian; GMAT Sat1Copy.Epoch = '01 Jul 2005 14:59:28.000'; GMAT Sat1Copy.CoordinateSystem = EarthMJ2000Eq; GMAT Sat1Copy.DisplayStateType = Keplerian; GMAT Sat1Copy.SMA = 8191.93881762901; GMAT Sat1Copy.ECC = 0.02454974900598161; GMAT Sat1Copy.INC = 12.85008005658097; GMAT Sat1Copy.RAAN = 306.6148021947984; GMAT Sat1Copy.AOP = 314.1905515359913; GMAT Sat1Copy.TA = 99.88774933204955; GMAT Sat1Copy.DryMass = 850; GMAT Sat1Copy.Cd = 2.2; GMAT Sat1Copy.Cr = 1.8; GMAT Sat1Copy.DragArea = 15; GMAT Sat1Copy.SRPArea = 1; %---------------------------------------- %---------- Propagators %---------------------------------------- Create ForceModel DefaultProp_ForceModel2; GMAT DefaultProp_ForceModel2.CentralBody = Earth; GMAT DefaultProp_ForceModel2.PointMasses = {Earth,Sun,Luna}; GMAT DefaultProp_ForceModel2.Drag = None; GMAT DefaultProp_ForceModel2.SRP = On; GMAT DefaultProp_ForceModel2.ErrorControl = RSSStep; Create ForceModel DefaultProp_ForceModel; GMAT DefaultProp_ForceModel.CentralBody = Earth; GMAT DefaultProp_ForceModel.PrimaryBodies = {Earth}; GMAT DefaultProp_ForceModel.PointMasses = {Luna, Sun}; GMAT DefaultProp_ForceModel.Drag = MSISE90; GMAT DefaultProp_ForceModel.SRP = On; GMAT DefaultProp_ForceModel.ErrorControl = RSSStep; GMAT DefaultProp_ForceModel.GravityField.Earth.Degree = 4; GMAT DefaultProp_ForceModel.GravityField.Earth.Order = 4; GMAT DefaultProp_ForceModel.GravityField.Earth.PotentialFile = 'JGM2.cof'; Create Propagator Prop1; GMAT Prop1.FM = DefaultProp_ForceModel; GMAT Prop1.Type = RungeKutta89; GMAT Prop1.InitialStepSize = 100; GMAT Prop1.Accuracy = 1e-012; GMAT Prop1.MinStep = 0.001; GMAT Prop1.MaxStep = 2700; GMAT Prop1.MaxStepAttempts = 50; Create Variable I Case Create ReportFile rf; %---------------------------------------- %---------- Mission Sequence %---------------------------------------- Sat1Copy = Sat1; Report rf Sat1.UTCModJulian Sat1.X Sat1.Y Sat1.Z; Report rf Sat1Copy.UTCModJulian Sat1Copy.X Sat1Copy.Y Sat1Copy.Z; Case = 0; If Case == 0 Propagate Prop1(Sat1) {Sat1.ElapsedSecs = 300}; Propagate Prop1(Sat1Copy) {Sat1Copy.ElapsedSecs = 300}; Propagate Prop1(Sat1) {Sat1.ElapsedSecs = 300}; Propagate Prop1(Sat1Copy) {Sat1Copy.ElapsedSecs = 300}; Else For I = 1:2 Propagate Prop1(Sat1) {Sat1.ElapsedSecs = 300}; Propagate Prop1(Sat1Copy) {Sat1Copy.ElapsedSecs = 300}; EndFor; EndIf Report rf Sat1.UTCModJulian Sat1.X Sat1.Y Sat1.Z; Report rf Sat1Copy.UTCModJulian Sat1Copy.X Sat1Copy.Y Sat1Copy.Z;