%General Mission Analysis Tool(GMAT) Script %Created: 2020-07-27 12:40:00 - PA0DLO %---------------------------------------- %---------- Spacecraft %---------------------------------------- Create Spacecraft EMM; GMAT EMM.DateFormat = TDBGregorian; GMAT EMM.Epoch = '12 Aug 2020 00:00:00.000'; GMAT EMM.CoordinateSystem = SolarSysBarycenter; GMAT EMM.DisplayStateType = Cartesian; GMAT EMM.X = 1.206560764263367E+08; GMAT EMM.Y = -9.473106213472818E+07; GMAT EMM.Z = 2.473335701363940E+06; GMAT EMM.VX = 2.192134958763183E+01; GMAT EMM.VY = 2.371274757370796E+01; GMAT EMM.VZ = 1.148353934792638E+00; GMAT EMM.DryMass = 900; GMAT EMM.Cd = 2.2; GMAT EMM.Cr = 1; GMAT EMM.DragArea = 30; GMAT EMM.SRPArea = 30; GMAT EMM.SPADDragScaleFactor = 1; GMAT EMM.SPADSRPScaleFactor = 1; GMAT EMM.NAIFId = -10000001; GMAT EMM.NAIFIdReferenceFrame = -9000001; GMAT EMM.OrbitColor = [255 106 0]; GMAT EMM.TargetColor = Teal; GMAT EMM.OrbitErrorCovariance = [ 1e+70 0 0 0 0 0 ; 0 1e+70 0 0 0 0 ; 0 0 1e+70 0 0 0 ; 0 0 0 1e+70 0 0 ; 0 0 0 0 1e+70 0 ; 0 0 0 0 0 1e+70 ]; GMAT EMM.CdSigma = 1e+70; GMAT EMM.CrSigma = 1e+70; GMAT EMM.Id = 'SatId'; GMAT EMM.Attitude = CoordinateSystemFixed; GMAT EMM.SPADSRPInterpolationMethod = Bilinear; GMAT EMM.SPADSRPScaleFactorSigma = 1e+70; GMAT EMM.SPADDragInterpolationMethod = Bilinear; GMAT EMM.SPADDragScaleFactorSigma = 1e+70; GMAT EMM.ModelFile = 'aura.3ds'; GMAT EMM.ModelOffsetX = 0; GMAT EMM.ModelOffsetY = 0; GMAT EMM.ModelOffsetZ = 0; GMAT EMM.ModelRotationX = 0; GMAT EMM.ModelRotationY = 0; GMAT EMM.ModelRotationZ = 0; GMAT EMM.ModelScale = 1; GMAT EMM.AttitudeDisplayStateType = 'Quaternion'; GMAT EMM.AttitudeRateDisplayStateType = 'AngularVelocity'; GMAT EMM.AttitudeCoordinateSystem = SunICRF; GMAT EMM.EulerAngleSequence = '321'; %---------------------------------------- %---------- GroundStations %---------------------------------------- Create GroundStation New_York_City; GMAT New_York_City.OrbitColor = Thistle; GMAT New_York_City.TargetColor = DarkGray; GMAT New_York_City.CentralBody = Earth; GMAT New_York_City.StateType = Spherical; GMAT New_York_City.HorizonReference = Ellipsoid; GMAT New_York_City.Location1 = 40.7715; GMAT New_York_City.Location2 = 286.2282; GMAT New_York_City.Location3 = 0.05; GMAT New_York_City.Id = 'NYC'; GMAT New_York_City.IonosphereModel = 'None'; GMAT New_York_City.TroposphereModel = 'None'; GMAT New_York_City.DataSource = 'Constant'; GMAT New_York_City.Temperature = 295.1; GMAT New_York_City.Pressure = 1013.5; GMAT New_York_City.Humidity = 55; GMAT New_York_City.MinimumElevationAngle = 0; %---------------------------------------- %---------- ForceModels %---------------------------------------- Create ForceModel Prop_ForceModel; GMAT Prop_ForceModel.CentralBody = Sun; GMAT Prop_ForceModel.PointMasses = {Mars, Jupiter, Neptune, Saturn, Sun, Uranus, Venus}; GMAT Prop_ForceModel.Drag = None; GMAT Prop_ForceModel.SRP = On; GMAT Prop_ForceModel.RelativisticCorrection = Off; GMAT Prop_ForceModel.ErrorControl = RSSStep; GMAT Prop_ForceModel.SRP.Flux = 1367; GMAT Prop_ForceModel.SRP.SRPModel = Spherical; GMAT Prop_ForceModel.SRP.Nominal_Sun = 149597870.691; Create ODEModel InternalODEModel; GMAT InternalODEModel.CentralBody = Earth; GMAT InternalODEModel.PrimaryBodies = {Earth}; GMAT InternalODEModel.Drag = None; GMAT InternalODEModel.SRP = Off; GMAT InternalODEModel.RelativisticCorrection = Off; GMAT InternalODEModel.ErrorControl = RSSStep; GMAT InternalODEModel.GravityField.Earth.Degree = 4; GMAT InternalODEModel.GravityField.Earth.Order = 4; GMAT InternalODEModel.GravityField.Earth.StmLimit = 100; GMAT InternalODEModel.GravityField.Earth.PotentialFile = 'JGM2.cof'; GMAT InternalODEModel.GravityField.Earth.TideModel = 'None'; %---------------------------------------- %---------- Propagators %---------------------------------------- Create Propagator Prop; GMAT Prop.FM = Prop_ForceModel; GMAT Prop.Type = PrinceDormand78; GMAT Prop.InitialStepSize = 600; GMAT Prop.Accuracy = 1e-12; GMAT Prop.MinStep = 600; GMAT Prop.MaxStep = 600; GMAT Prop.MaxStepAttempts = 50; GMAT Prop.StopIfAccuracyIsViolated = true; Create Propagator TenMinuteProp; GMAT TenMinuteProp.FM = InternalODEModel; GMAT TenMinuteProp.Type = PrinceDormand78; GMAT TenMinuteProp.InitialStepSize = 60; GMAT TenMinuteProp.Accuracy = 9.999999999999999e-12; GMAT TenMinuteProp.MinStep = 0.001; GMAT TenMinuteProp.MaxStep = 2700; GMAT TenMinuteProp.MaxStepAttempts = 50; GMAT TenMinuteProp.StopIfAccuracyIsViolated = true; %---------------------------------------- %---------- Coordinate Systems %---------------------------------------- Create CoordinateSystem stationTopo; GMAT stationTopo.Origin = New_York_City; GMAT stationTopo.Axes = Topocentric; Create CoordinateSystem SunICRF; GMAT SunICRF.Origin = Sun; GMAT SunICRF.Axes = ICRF; Create CoordinateSystem SolarSysBarycenter; GMAT SolarSysBarycenter.Origin = SolarSystemBarycenter; GMAT SolarSysBarycenter.Axes = MJ2000Ec; %---------------------------------------- %---------- EventLocators %---------------------------------------- Create ContactLocator ContactLocator; GMAT ContactLocator.Target = EMM; GMAT ContactLocator.Filename = 'ContactLocator1.txt'; GMAT ContactLocator.OccultingBodies = {Luna}; GMAT ContactLocator.InputEpochFormat = 'TAIModJulian'; GMAT ContactLocator.InitialEpoch = '21545'; GMAT ContactLocator.StepSize = 600; GMAT ContactLocator.FinalEpoch = '21545.138'; GMAT ContactLocator.UseLightTimeDelay = true; GMAT ContactLocator.UseStellarAberration = true; GMAT ContactLocator.WriteReport = true; GMAT ContactLocator.RunMode = Automatic; GMAT ContactLocator.UseEntireInterval = true; GMAT ContactLocator.Observers = {New_York_City}; GMAT ContactLocator.LightTimeDirection = Receive; %---------------------------------------- %---------- Subscribers %---------------------------------------- Create EphemerisFile EphemerisFile; GMAT EphemerisFile.UpperLeft = [ 0.2336538461538462 0.04020100502512563 ]; GMAT EphemerisFile.Size = [ 0.9942307692307693 0.9560301507537688 ]; GMAT EphemerisFile.RelativeZOrder = 24; GMAT EphemerisFile.Maximized = true; GMAT EphemerisFile.Spacecraft = EMM; GMAT EphemerisFile.Filename = 'EphemerisFile1.oem'; GMAT EphemerisFile.FileFormat = CCSDS-OEM; GMAT EphemerisFile.EpochFormat = UTCGregorian; GMAT EphemerisFile.InitialEpoch = InitialSpacecraftEpoch; GMAT EphemerisFile.FinalEpoch = FinalSpacecraftEpoch; GMAT EphemerisFile.StepSize = IntegratorSteps; GMAT EphemerisFile.Interpolator = Lagrange; GMAT EphemerisFile.InterpolationOrder = 7; GMAT EphemerisFile.CoordinateSystem = SunICRF; GMAT EphemerisFile.OutputFormat = LittleEndian; GMAT EphemerisFile.WriteEphemeris = true; Create ReportFile ReportFile2; GMAT ReportFile2.SolverIterations = Current; GMAT ReportFile2.UpperLeft = [ 0.2336538461538462 0.04020100502512563 ]; GMAT ReportFile2.Size = [ 0.9942307692307693 0.9560301507537688 ]; GMAT ReportFile2.RelativeZOrder = 18; GMAT ReportFile2.Maximized = true; GMAT ReportFile2.Filename = 'ReportFile2.txt'; GMAT ReportFile2.Precision = 16; GMAT ReportFile2.Add = {EMM.UTCGregorian, EMM.EarthMJ2000Eq.RA, EMM.EarthMJ2000Eq.DEC, EMM.Earth.RMAG}; GMAT ReportFile2.WriteHeaders = true; GMAT ReportFile2.LeftJustify = On; GMAT ReportFile2.ZeroFill = Off; GMAT ReportFile2.FixedWidth = true; GMAT ReportFile2.Delimiter = ' '; GMAT ReportFile2.ColumnWidth = 23; GMAT ReportFile2.WriteReport = true; Create ReportFile ReportFile1; GMAT ReportFile1.SolverIterations = Current; GMAT ReportFile1.UpperLeft = [ 0.2336538461538462 0.04020100502512563 ]; GMAT ReportFile1.Size = [ 0.9942307692307693 0.9560301507537688 ]; GMAT ReportFile1.RelativeZOrder = 12; GMAT ReportFile1.Maximized = true; GMAT ReportFile1.Filename = 'ReportFile1.txt'; GMAT ReportFile1.Precision = 16; GMAT ReportFile1.Add = {EMM.UTCGregorian, EMM.stationTopo.PlanetodeticLON, EMM.stationTopo.PlanetodeticLAT, EMM.stationTopo.PlanetodeticRMAG, EMM.A1ModJulian}; GMAT ReportFile1.WriteHeaders = false; GMAT ReportFile1.LeftJustify = On; GMAT ReportFile1.ZeroFill = Off; GMAT ReportFile1.FixedWidth = true; GMAT ReportFile1.Delimiter = ' '; GMAT ReportFile1.ColumnWidth = 30; GMAT ReportFile1.WriteReport = true; Create OrbitView SolarSystemView; GMAT SolarSystemView.SolverIterations = None; GMAT SolarSystemView.UpperLeft = [ 0.2336538461538462 0.04020100502512563 ]; GMAT SolarSystemView.Size = [ 0.9942307692307693 0.9560301507537688 ]; GMAT SolarSystemView.RelativeZOrder = 32; GMAT SolarSystemView.Maximized = true; GMAT SolarSystemView.Add = {EMM, Earth, Mars, Sun}; GMAT SolarSystemView.CoordinateSystem = SunICRF; GMAT SolarSystemView.DrawObject = [ true true true true ]; GMAT SolarSystemView.DataCollectFrequency = 1; GMAT SolarSystemView.UpdatePlotFrequency = 50; GMAT SolarSystemView.NumPointsToRedraw = 0; GMAT SolarSystemView.ShowPlot = true; GMAT SolarSystemView.MaxPlotPoints = 40000; GMAT SolarSystemView.ShowLabels = true; GMAT SolarSystemView.ViewPointReference = Sun; GMAT SolarSystemView.ViewPointVector = [ 0 0 600000000 ]; GMAT SolarSystemView.ViewDirection = Sun; GMAT SolarSystemView.ViewScaleFactor = 1; GMAT SolarSystemView.ViewUpCoordinateSystem = SunICRF; GMAT SolarSystemView.ViewUpAxis = X; GMAT SolarSystemView.EclipticPlane = Off; GMAT SolarSystemView.XYPlane = On; GMAT SolarSystemView.WireFrame = Off; GMAT SolarSystemView.Axes = On; GMAT SolarSystemView.Grid = Off; GMAT SolarSystemView.SunLine = Off; GMAT SolarSystemView.UseInitialView = On; GMAT SolarSystemView.StarCount = 7000; GMAT SolarSystemView.EnableStars = On; GMAT SolarSystemView.EnableConstellations = On; %---------------------------------------- %---------- Mission Sequence %---------------------------------------- BeginMissionSequence; Propagate Prop(EMM) {EMM.ElapsedSecs = 69.183}; Propagate Prop(EMM) {EMM.Mars.Periapsis};