Untitled
unknown
matlab
a year ago
7.6 kB
193
Indexable
Create Spacecraft ExampleSat; GMAT ExampleSat.DateFormat = UTCGregorian; GMAT ExampleSat.Epoch = '01 Jan 2000 11:59:28.000'; GMAT ExampleSat.CoordinateSystem = EarthMJ2000Eq; GMAT ExampleSat.DisplayStateType = Cartesian; GMAT ExampleSat.X = 7100; GMAT ExampleSat.Y = 0; GMAT ExampleSat.Z = 1300; GMAT ExampleSat.VX = 0; GMAT ExampleSat.VY = 7.35; GMAT ExampleSat.VZ = 1; GMAT ExampleSat.DryMass = 850; GMAT ExampleSat.Cd = 2.2; GMAT ExampleSat.Cr = 1.8; GMAT ExampleSat.DragArea = 15; GMAT ExampleSat.SRPArea = 1; GMAT ExampleSat.SPADDragScaleFactor = 1; GMAT ExampleSat.SPADSRPScaleFactor = 1; GMAT ExampleSat.AtmosDensityScaleFactor = 1; GMAT ExampleSat.ExtendedMassPropertiesModel = 'None'; GMAT ExampleSat.Tanks = {ChemicalTank1}; GMAT ExampleSat.Thrusters = {ChemicalThruster1}; GMAT ExampleSat.EphemerisName = '../samples/SupportFiles/Ex_R2022a_TLE_Propagation_TLE.txt'; GMAT ExampleSat.NAIFId = -10003001; GMAT ExampleSat.NAIFIdReferenceFrame = -9003001; GMAT ExampleSat.OrbitColor = Red; GMAT ExampleSat.TargetColor = Teal; GMAT ExampleSat.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 ExampleSat.CdSigma = 1e+70; GMAT ExampleSat.CrSigma = 1e+70; GMAT ExampleSat.Id = 'ExampleSat'; GMAT ExampleSat.Attitude = CoordinateSystemFixed; GMAT ExampleSat.SPADSRPInterpolationMethod = Bilinear; GMAT ExampleSat.SPADSRPScaleFactorSigma = 1e+70; GMAT ExampleSat.SPADDragInterpolationMethod = Bilinear; GMAT ExampleSat.SPADDragScaleFactorSigma = 1e+70; GMAT ExampleSat.AtmosDensityScaleFactorSigma = 1e+70; GMAT ExampleSat.ModelFile = 'aura.3ds'; GMAT ExampleSat.ModelOffsetX = 0; GMAT ExampleSat.ModelOffsetY = 0; GMAT ExampleSat.ModelOffsetZ = 0; GMAT ExampleSat.ModelRotationX = 0; GMAT ExampleSat.ModelRotationY = 0; GMAT ExampleSat.ModelRotationZ = 0; GMAT ExampleSat.ModelScale = 1; GMAT ExampleSat.AttitudeDisplayStateType = 'Quaternion'; GMAT ExampleSat.AttitudeRateDisplayStateType = 'AngularVelocity'; GMAT ExampleSat.AttitudeCoordinateSystem = EarthMJ2000Eq; GMAT ExampleSat.EulerAngleSequence = '321'; %---------------------------------------- %---------- Hardware Components %---------------------------------------- Create ChemicalTank ChemicalTank1; GMAT ChemicalTank1.AllowNegativeFuelMass = false; GMAT ChemicalTank1.FuelMass = 756; GMAT ChemicalTank1.Pressure = 1500; GMAT ChemicalTank1.Temperature = 20; GMAT ChemicalTank1.RefTemperature = 20; GMAT ChemicalTank1.Volume = 0.75; GMAT ChemicalTank1.FuelDensity = 1260; GMAT ChemicalTank1.PressureModel = PressureRegulated; Create ChemicalThruster ChemicalThruster1; GMAT ChemicalThruster1.CoordinateSystem = Local; GMAT ChemicalThruster1.Origin = Earth; GMAT ChemicalThruster1.Axes = MJ2000Eq; GMAT ChemicalThruster1.ThrustDirection1 = 1; GMAT ChemicalThruster1.ThrustDirection2 = 0; GMAT ChemicalThruster1.ThrustDirection3 = 0; GMAT ChemicalThruster1.DutyCycle = 1; GMAT ChemicalThruster1.ThrustScaleFactor = 1; GMAT ChemicalThruster1.DecrementMass = true; GMAT ChemicalThruster1.Tank = {ChemicalTank1}; GMAT ChemicalThruster1.MixRatio = [ 1 ]; GMAT ChemicalThruster1.GravitationalAccel = 9.81; GMAT ChemicalThruster1.C1 = 10; GMAT ChemicalThruster1.C2 = 0; GMAT ChemicalThruster1.C3 = 0; GMAT ChemicalThruster1.C4 = 0; GMAT ChemicalThruster1.C5 = 0; GMAT ChemicalThruster1.C6 = 0; GMAT ChemicalThruster1.C7 = 0; GMAT ChemicalThruster1.C8 = 0; GMAT ChemicalThruster1.C9 = 0; GMAT ChemicalThruster1.C10 = 0; GMAT ChemicalThruster1.C11 = 0; GMAT ChemicalThruster1.C12 = 0; GMAT ChemicalThruster1.C13 = 0; GMAT ChemicalThruster1.C14 = 0; GMAT ChemicalThruster1.C15 = 0; GMAT ChemicalThruster1.C16 = 0; GMAT ChemicalThruster1.K1 = 300; GMAT ChemicalThruster1.K2 = 0; GMAT ChemicalThruster1.K3 = 0; GMAT ChemicalThruster1.K4 = 0; GMAT ChemicalThruster1.K5 = 0; GMAT ChemicalThruster1.K6 = 0; GMAT ChemicalThruster1.K7 = 0; GMAT ChemicalThruster1.K8 = 0; GMAT ChemicalThruster1.K9 = 0; GMAT ChemicalThruster1.K10 = 0; GMAT ChemicalThruster1.K11 = 0; GMAT ChemicalThruster1.K12 = 0; GMAT ChemicalThruster1.K13 = 0; GMAT ChemicalThruster1.K14 = 0; GMAT ChemicalThruster1.K15 = 0; GMAT ChemicalThruster1.K16 = 0; %---------------------------------------- %---------- Propagators %---------------------------------------- Create Propagator TLEProp; GMAT TLEProp.Type = SPICESGP4; GMAT TLEProp.InitialStepSize = 60; %---------------------------------------- %---------- Burns %---------------------------------------- Create FiniteBurn FiniteBurn1; GMAT FiniteBurn1.Thrusters = {ChemicalThruster1}; GMAT FiniteBurn1.ThrottleLogicAlgorithm = 'MaxNumberOfThrusters'; %---------------------------------------- %---------- Subscribers %---------------------------------------- Create ReportFile rf; GMAT rf.SolverIterations = Current; GMAT rf.UpperLeft = [ 0 0 ]; GMAT rf.Size = [ 0 0 ]; GMAT rf.RelativeZOrder = 0; GMAT rf.Maximized = false; GMAT rf.Filename = 'Ex_R2022a_TLE_Propagation.txt'; GMAT rf.Precision = 16; GMAT rf.Add = {ExampleSat.UTCGregorian, ExampleSat.X, ExampleSat.Y, ExampleSat.Z, ExampleSat.VX, ExampleSat.VY, ExampleSat.VZ}; GMAT rf.WriteHeaders = true; GMAT rf.LeftJustify = On; GMAT rf.ZeroFill = Off; GMAT rf.FixedWidth = true; GMAT rf.Delimiter = ' '; GMAT rf.ColumnWidth = 23; GMAT rf.WriteReport = true; Create OrbitView OrbitView1; GMAT OrbitView1.SolverIterations = Current; GMAT OrbitView1.UpperLeft = [ 0 0 ]; GMAT OrbitView1.Size = [ 0.8 0.8497109826589595 ]; GMAT OrbitView1.RelativeZOrder = 828; GMAT OrbitView1.Maximized = false; GMAT OrbitView1.Add = {ExampleSat, Earth}; GMAT OrbitView1.CoordinateSystem = EarthMJ2000Eq; GMAT OrbitView1.DrawObject = [ true true ]; GMAT OrbitView1.DataCollectFrequency = 1; GMAT OrbitView1.UpdatePlotFrequency = 50; GMAT OrbitView1.NumPointsToRedraw = 0; GMAT OrbitView1.ShowPlot = true; GMAT OrbitView1.MaxPlotPoints = 20000; GMAT OrbitView1.ShowLabels = true; GMAT OrbitView1.ViewPointReference = Earth; GMAT OrbitView1.ViewPointVector = [ 0 0 30000 ]; GMAT OrbitView1.ViewDirection = Earth; GMAT OrbitView1.ViewScaleFactor = 1; GMAT OrbitView1.ViewUpCoordinateSystem = EarthMJ2000Eq; GMAT OrbitView1.ViewUpAxis = Z; GMAT OrbitView1.EclipticPlane = Off; GMAT OrbitView1.XYPlane = On; GMAT OrbitView1.WireFrame = Off; GMAT OrbitView1.Axes = On; GMAT OrbitView1.Grid = Off; GMAT OrbitView1.SunLine = Off; GMAT OrbitView1.UseInitialView = On; GMAT OrbitView1.StarCount = 7000; GMAT OrbitView1.EnableStars = On; GMAT OrbitView1.EnableConstellations = On; Create XYPlot XYPlot1; GMAT XYPlot1.SolverIterations = Current; GMAT XYPlot1.UpperLeft = [ 0.1411764705882353 0.3132947976878613 ]; GMAT XYPlot1.Size = [ 0.5 0.4497109826589595 ]; GMAT XYPlot1.RelativeZOrder = 836; GMAT XYPlot1.Maximized = false; GMAT XYPlot1.XVariable = ExampleSat.A1ModJulian; GMAT XYPlot1.YVariables = {ExampleSat.Earth.Altitude}; GMAT XYPlot1.ShowGrid = true; GMAT XYPlot1.ShowPlot = true; %---------------------------------------- %---------- Arrays, Variables, Strings %---------------------------------------- Create Variable I; %---------------------------------------- %---------- Mission Sequence %---------------------------------------- BeginMissionSequence; BeginFiniteBurn FiniteBurn1(ExampleSat); Propagate TLEProp(ExampleSat) {ExampleSat.ElapsedSecs = 36000}; EndFiniteBurn FiniteBurn1(ExampleSat); Propagate TLEProp(ExampleSat) {ExampleSat.ElapsedDays = 1};
Editor is loading...