Hi there I am trying to analyze drag effect on LEO satellite.When I plot it, of course the altitude get decreased.
Yet, we have a problem here. Since there is flattening of earth, altitude changes about 20 km from equator to polar, where the inclination is 90 degrees. But when I do it 0 degree, which is equatorial, the altitude still changes as 20 km. It is not normal. It shouldnt oscillate, it should only get down with time. Please check it. I just attached the file. If I have a mistake let me know please. How can I stop it oscillating? Thanks Kadir [image: Ekran görüntüsü 2025-02-18 001529.png]
%General Mission Analysis Tool(GMAT) Script %Created: 2025-02-17 22:49:52 %---------------------------------------- %---------- Spacecraft %---------------------------------------- Create Spacecraft DefaultSC; GMAT DefaultSC.DateFormat = UTCGregorian; GMAT DefaultSC.Epoch = '01 Jan 2000 11:59:28.000'; GMAT DefaultSC.CoordinateSystem = EarthMJ2000Eq; GMAT DefaultSC.DisplayStateType = Keplerian; GMAT DefaultSC.SMA = 6677.999999999996; GMAT DefaultSC.ECC = 2.38175004414415e-16; GMAT DefaultSC.INC = 0; GMAT DefaultSC.RAAN = 0; GMAT DefaultSC.AOP = 0; GMAT DefaultSC.TA = 0.6931030628374474; GMAT DefaultSC.DryMass = 10; GMAT DefaultSC.Cd = 2.2; GMAT DefaultSC.Cr = 1.8; GMAT DefaultSC.DragArea = 0.06; GMAT DefaultSC.SRPArea = 1; GMAT DefaultSC.SPADDragScaleFactor = 1; GMAT DefaultSC.SPADSRPScaleFactor = 1; GMAT DefaultSC.AtmosDensityScaleFactor = 1; GMAT DefaultSC.ExtendedMassPropertiesModel = 'None'; GMAT DefaultSC.NAIFId = -10000001; GMAT DefaultSC.NAIFIdReferenceFrame = -9000001; GMAT DefaultSC.OrbitColor = Red; GMAT DefaultSC.TargetColor = Teal; GMAT DefaultSC.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 DefaultSC.CdSigma = 1e+70; GMAT DefaultSC.CrSigma = 1e+70; GMAT DefaultSC.Id = 'SatId'; GMAT DefaultSC.Attitude = CoordinateSystemFixed; GMAT DefaultSC.SPADSRPInterpolationMethod = Bilinear; GMAT DefaultSC.SPADSRPScaleFactorSigma = 1e+70; GMAT DefaultSC.SPADDragInterpolationMethod = Bilinear; GMAT DefaultSC.SPADDragScaleFactorSigma = 1e+70; GMAT DefaultSC.AtmosDensityScaleFactorSigma = 1e+70; GMAT DefaultSC.ModelFile = 'aura.3ds'; GMAT DefaultSC.ModelOffsetX = 0; GMAT DefaultSC.ModelOffsetY = 0; GMAT DefaultSC.ModelOffsetZ = 0; GMAT DefaultSC.ModelRotationX = 0; GMAT DefaultSC.ModelRotationY = 0; GMAT DefaultSC.ModelRotationZ = 0; GMAT DefaultSC.ModelScale = 1; GMAT DefaultSC.AttitudeDisplayStateType = 'Quaternion'; GMAT DefaultSC.AttitudeRateDisplayStateType = 'AngularVelocity'; GMAT DefaultSC.AttitudeCoordinateSystem = EarthMJ2000Eq; GMAT DefaultSC.EulerAngleSequence = '321'; %---------------------------------------- %---------- ForceModels %---------------------------------------- Create ForceModel DefaultProp_ForceModel; GMAT DefaultProp_ForceModel.CentralBody = Earth; GMAT DefaultProp_ForceModel.PrimaryBodies = {Earth}; GMAT DefaultProp_ForceModel.SRP = On; GMAT DefaultProp_ForceModel.RelativisticCorrection = Off; GMAT DefaultProp_ForceModel.ErrorControl = RSSStep; GMAT DefaultProp_ForceModel.GravityField.Earth.Degree = 10; GMAT DefaultProp_ForceModel.GravityField.Earth.Order = 10; GMAT DefaultProp_ForceModel.GravityField.Earth.StmLimit = 100; GMAT DefaultProp_ForceModel.GravityField.Earth.PotentialFile = 'JGM2.cof'; GMAT DefaultProp_ForceModel.GravityField.Earth.TideModel = 'None'; GMAT DefaultProp_ForceModel.Drag.AtmosphereModel = JacchiaRoberts; GMAT DefaultProp_ForceModel.Drag.HistoricWeatherSource = 'ConstantFluxAndGeoMag'; GMAT DefaultProp_ForceModel.Drag.PredictedWeatherSource = 'ConstantFluxAndGeoMag'; GMAT DefaultProp_ForceModel.Drag.CSSISpaceWeatherFile = 'SpaceWeather-All-v1.2.txt'; GMAT DefaultProp_ForceModel.Drag.SchattenFile = 'SchattenPredict.txt'; GMAT DefaultProp_ForceModel.Drag.F107 = 150; GMAT DefaultProp_ForceModel.Drag.F107A = 150; GMAT DefaultProp_ForceModel.Drag.MagneticIndex = 3; GMAT DefaultProp_ForceModel.Drag.SchattenErrorModel = 'Nominal'; GMAT DefaultProp_ForceModel.Drag.SchattenTimingModel = 'NominalCycle'; GMAT DefaultProp_ForceModel.Drag.DragModel = 'Spherical'; GMAT DefaultProp_ForceModel.SRP.Flux = 1367; GMAT DefaultProp_ForceModel.SRP.SRPModel = Spherical; GMAT DefaultProp_ForceModel.SRP.Nominal_Sun = 149597870.691; %---------------------------------------- %---------- Propagators %---------------------------------------- Create Propagator DefaultProp; GMAT DefaultProp.FM = DefaultProp_ForceModel; GMAT DefaultProp.Type = RungeKutta89; GMAT DefaultProp.InitialStepSize = 60; GMAT DefaultProp.Accuracy = 9.999999999999999e-12; GMAT DefaultProp.MinStep = 0.001; GMAT DefaultProp.MaxStep = 2700; GMAT DefaultProp.MaxStepAttempts = 50; GMAT DefaultProp.StopIfAccuracyIsViolated = true; %---------------------------------------- %---------- Solvers %---------------------------------------- Create DifferentialCorrector DC1; GMAT DC1.ShowProgress = true; GMAT DC1.ReportStyle = Normal; GMAT DC1.ReportFile = 'DifferentialCorrectorDC1.data'; GMAT DC1.MaximumIterations = 25; GMAT DC1.DerivativeMethod = ForwardDifference; GMAT DC1.Algorithm = NewtonRaphson; %---------------------------------------- %---------- Subscribers %---------------------------------------- Create OrbitView DefaultOrbitView; GMAT DefaultOrbitView.SolverIterations = Current; GMAT DefaultOrbitView.UpperLeft = [ 0.2505882352941177 0.5533742331288344 ]; GMAT DefaultOrbitView.Size = [ 0.1658823529411765 0.2049079754601227 ]; GMAT DefaultOrbitView.RelativeZOrder = 352; GMAT DefaultOrbitView.Maximized = true; GMAT DefaultOrbitView.Add = {DefaultSC, Earth}; GMAT DefaultOrbitView.CoordinateSystem = EarthMJ2000Eq; GMAT DefaultOrbitView.DrawObject = [ true true ]; GMAT DefaultOrbitView.DataCollectFrequency = 1; GMAT DefaultOrbitView.UpdatePlotFrequency = 50; GMAT DefaultOrbitView.NumPointsToRedraw = 0; GMAT DefaultOrbitView.ShowPlot = true; GMAT DefaultOrbitView.MaxPlotPoints = 20000; GMAT DefaultOrbitView.ShowLabels = true; GMAT DefaultOrbitView.ViewPointReference = Earth; GMAT DefaultOrbitView.ViewPointVector = [ 30000 0 0 ]; GMAT DefaultOrbitView.ViewDirection = Earth; GMAT DefaultOrbitView.ViewScaleFactor = 1; GMAT DefaultOrbitView.ViewUpCoordinateSystem = EarthMJ2000Eq; GMAT DefaultOrbitView.ViewUpAxis = Z; GMAT DefaultOrbitView.EclipticPlane = Off; GMAT DefaultOrbitView.XYPlane = On; GMAT DefaultOrbitView.WireFrame = Off; GMAT DefaultOrbitView.Axes = On; GMAT DefaultOrbitView.Grid = Off; GMAT DefaultOrbitView.SunLine = Off; GMAT DefaultOrbitView.UseInitialView = On; GMAT DefaultOrbitView.StarCount = 7000; GMAT DefaultOrbitView.EnableStars = On; GMAT DefaultOrbitView.EnableConstellations = On; Create GroundTrackPlot DefaultGroundTrackPlot; GMAT DefaultGroundTrackPlot.SolverIterations = Current; GMAT DefaultGroundTrackPlot.UpperLeft = [ 0.4370588235294118 0.4466257668711656 ]; GMAT DefaultGroundTrackPlot.Size = [ 0.1658823529411765 0.2049079754601227 ]; GMAT DefaultGroundTrackPlot.RelativeZOrder = 22; GMAT DefaultGroundTrackPlot.Maximized = false; GMAT DefaultGroundTrackPlot.Add = {DefaultSC}; GMAT DefaultGroundTrackPlot.DataCollectFrequency = 1; GMAT DefaultGroundTrackPlot.UpdatePlotFrequency = 50; GMAT DefaultGroundTrackPlot.NumPointsToRedraw = 0; GMAT DefaultGroundTrackPlot.ShowPlot = true; GMAT DefaultGroundTrackPlot.MaxPlotPoints = 20000; GMAT DefaultGroundTrackPlot.CentralBody = Earth; GMAT DefaultGroundTrackPlot.TextureMap = 'ModifiedBlueMarble.jpg'; Create ReportFile ReportFile1; GMAT ReportFile1.SolverIterations = All; GMAT ReportFile1.UpperLeft = [ 0 0 ]; GMAT ReportFile1.Size = [ 0 0 ]; GMAT ReportFile1.RelativeZOrder = 0; GMAT ReportFile1.Maximized = false; GMAT ReportFile1.Filename = 'alt_vs_time.txt'; GMAT ReportFile1.Precision = 16; GMAT ReportFile1.Add = {DefaultSC.ElapsedSecs, DefaultSC.Earth.Altitude}; GMAT ReportFile1.WriteHeaders = true; GMAT ReportFile1.LeftJustify = On; GMAT ReportFile1.ZeroFill = Off; GMAT ReportFile1.FixedWidth = true; GMAT ReportFile1.Delimiter = ' '; GMAT ReportFile1.ColumnWidth = 23; GMAT ReportFile1.WriteReport = true; Create XYPlot XYPlot1; GMAT XYPlot1.SolverIterations = Current; GMAT XYPlot1.UpperLeft = [ 0.03352941176470588 0.5006134969325153 ]; GMAT XYPlot1.Size = [ 0.4976470588235294 0.445398773006135 ]; GMAT XYPlot1.RelativeZOrder = 392; GMAT XYPlot1.Maximized = false; GMAT XYPlot1.XVariable = DefaultSC.ElapsedSecs; GMAT XYPlot1.YVariables = {DefaultSC.Earth.Altitude}; GMAT XYPlot1.ShowGrid = true; GMAT XYPlot1.ShowPlot = true; %---------------------------------------- %---------- Mission Sequence %---------------------------------------- BeginMissionSequence; Propagate DefaultProp(DefaultSC) {DefaultSC.ElapsedDays = 10};
_______________________________________________ GMAT-developers mailing list GMAT-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gmat-developers