forked from tom-etchells/PowerCubeSat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrbitScript.script
More file actions
155 lines (140 loc) · 6.23 KB
/
OrbitScript.script
File metadata and controls
155 lines (140 loc) · 6.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
%General Mission Analysis Tool(GMAT) Script
%Created: 2017-03-16 01:55:06
%----------------------------------------
%---------- Spacecraft
%----------------------------------------
Create Spacecraft DefaultSC;
GMAT DefaultSC.DateFormat = UTCGregorian;
GMAT DefaultSC.Epoch = '01 Jan 2000 12:00:00.000';
GMAT DefaultSC.CoordinateSystem = EarthMJ2000Eq;
GMAT DefaultSC.DisplayStateType = Keplerian;
GMAT DefaultSC.SMA = 6771;
GMAT DefaultSC.ECC = 0;
GMAT DefaultSC.INC = 50;
GMAT DefaultSC.RAAN = 0;
GMAT DefaultSC.AOP = 0;
GMAT DefaultSC.TA = 0;
GMAT DefaultSC.DryMass = 850;
GMAT DefaultSC.Cd = 2.2;
GMAT DefaultSC.Cr = 1.8;
GMAT DefaultSC.DragArea = 15;
GMAT DefaultSC.SRPArea = 1;
GMAT DefaultSC.NAIFId = -10000001;
GMAT DefaultSC.NAIFIdReferenceFrame = -9000001;
GMAT DefaultSC.OrbitColor = Red;
GMAT DefaultSC.TargetColor = Teal;
GMAT DefaultSC.OrbitErrorCovariance = [ 1e+070 0 0 0 0 0 ; 0 1e+070 0 0 0 0 ; 0 0 1e+070 0 0 0 ; 0 0 0 1e+070 0 0 ; 0 0 0 0 1e+070 0 ; 0 0 0 0 0 1e+070 ];
GMAT DefaultSC.CdSigma = 1e+070;
GMAT DefaultSC.CrSigma = 1e+070;
GMAT DefaultSC.Id = 'SatId';
GMAT DefaultSC.Attitude = CoordinateSystemFixed;
GMAT DefaultSC.SPADSRPScaleFactor = 1;
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.Drag = None;
GMAT DefaultProp_ForceModel.SRP = Off;
GMAT DefaultProp_ForceModel.RelativisticCorrection = Off;
GMAT DefaultProp_ForceModel.ErrorControl = RSSStep;
GMAT DefaultProp_ForceModel.GravityField.Earth.Degree = 0;
GMAT DefaultProp_ForceModel.GravityField.Earth.Order = 0;
GMAT DefaultProp_ForceModel.GravityField.Earth.StmLimit = 100;
GMAT DefaultProp_ForceModel.GravityField.Earth.PotentialFile = 'JGM2.cof';
GMAT DefaultProp_ForceModel.GravityField.Earth.TideModel = 'None';
%----------------------------------------
%---------- Propagators
%----------------------------------------
Create Propagator DefaultProp;
GMAT DefaultProp.FM = DefaultProp_ForceModel;
GMAT DefaultProp.Type = RungeKutta89;
GMAT DefaultProp.InitialStepSize = 60;
GMAT DefaultProp.Accuracy = 9.999999999999999e-012;
GMAT DefaultProp.MinStep = 0.001;
GMAT DefaultProp.MaxStep = 2700;
GMAT DefaultProp.MaxStepAttempts = 50;
GMAT DefaultProp.StopIfAccuracyIsViolated = true;
%----------------------------------------
%---------- Subscribers
%----------------------------------------
Create OrbitView DefaultOrbitView;
GMAT DefaultOrbitView.SolverIterations = Current;
GMAT DefaultOrbitView.UpperLeft = [ 0 0 ];
GMAT DefaultOrbitView.Size = [ 0.4994117647058823 1.082954545454546 ];
GMAT DefaultOrbitView.RelativeZOrder = 41;
GMAT DefaultOrbitView.Maximized = false;
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 ReportFile ReportFile;
GMAT ReportFile.SolverIterations = Current;
GMAT ReportFile.UpperLeft = [ 0.0111764705882353 0.025 ];
GMAT ReportFile.Size = [ 0.5952941176470589 0.79 ];
GMAT ReportFile.RelativeZOrder = 232;
GMAT ReportFile.Maximized = false;
GMAT ReportFile.Filename = './GMAT_Report.txt';
GMAT ReportFile.Precision = 16;
GMAT ReportFile.Add = {DefaultSC.A1Gregorian, DefaultSC.EarthMJ2000Eq.X, DefaultSC.EarthMJ2000Eq.Y, DefaultSC.EarthMJ2000Eq.Z, DefaultSC.EarthMJ2000Eq.VX, DefaultSC.EarthMJ2000Eq.VY, DefaultSC.EarthMJ2000Eq.VZ, Sun.EarthMJ2000Eq.X, Sun.EarthMJ2000Eq.Y, Sun.EarthMJ2000Eq.Z};
GMAT ReportFile.WriteHeaders = true;
GMAT ReportFile.LeftJustify = On;
GMAT ReportFile.ZeroFill = Off;
GMAT ReportFile.FixedWidth = true;
GMAT ReportFile.Delimiter = ' ';
GMAT ReportFile.ColumnWidth = 23;
GMAT ReportFile.WriteReport = true;
Create GroundTrackPlot GroundTrackPlot1;
GMAT GroundTrackPlot1.SolverIterations = Current;
GMAT GroundTrackPlot1.UpperLeft = [ 0.4852941176470588 0 ];
GMAT GroundTrackPlot1.Size = [ 0.4994117647058823 1.082954545454546 ];
GMAT GroundTrackPlot1.RelativeZOrder = 33;
GMAT GroundTrackPlot1.Maximized = false;
GMAT GroundTrackPlot1.Add = {DefaultSC};
GMAT GroundTrackPlot1.DataCollectFrequency = 1;
GMAT GroundTrackPlot1.UpdatePlotFrequency = 50;
GMAT GroundTrackPlot1.NumPointsToRedraw = 0;
GMAT GroundTrackPlot1.ShowPlot = true;
GMAT GroundTrackPlot1.MaxPlotPoints = 20000;
GMAT GroundTrackPlot1.CentralBody = Earth;
GMAT GroundTrackPlot1.TextureMap = 'ModifiedBlueMarble.jpg';
%----------------------------------------
%---------- Mission Sequence
%----------------------------------------
BeginMissionSequence;
Report 'ReportOrbitalPeriod' ReportFile DefaultSC.Earth.OrbitPeriod;
Propagate 'Propagate' DefaultProp(DefaultSC) {DefaultSC.ElapsedDays = 1};