% % EphemPropagator_Code500_Validation_CentralBody_NoEffect % % Use the Code500 Propagator type with an Earth-centered ephemeris file. Set % the propagator CentralBody to Moon and verify that the setting has no effect % on the output vectors. % % 08/30/2016 SES Initial version. % SolarSystem.EphemerisSource = 'DE421'; % % Spacecraft % Create Spacecraft Code500Sat; Code500Sat.DateFormat = UTCGregorian; Code500Sat.Epoch = '09 May 2016 00:00:00.000'; Code500Sat.Id = 'Code500Sat'; Code500Sat.EphemerisName = '../data/navdata/otherinputfiles/terra.ephem.pc'; % % Propagator % Create Propagator Code500Prop; Code500Prop.Type = 'Code500'; Code500Prop.StepSize = 60; Code500Prop.StartEpoch = 'FromSpacecraft'; Code500Prop.CentralBody = Luna; % % Output report. % Create ReportFile PropReport PropReport.Filename = 'EphemPropagator_Code500_Validation_CentralBody_NoEffect.txt'; PropReport.WriteHeaders = False; % % Miscellaneous variables. % Create String initialEpoch finalEpoch; Create Array initialState[6,1] finalState[6,1]; % % Mission Sequence % BeginMissionSequence [initialEpoch, initialState, finalEpoch, finalState] = ... GetEphemStates('Code500', Code500Sat, 'UTCGregorian', EarthMJ2000Eq); Code500Sat.Epoch = initialEpoch; Code500Sat.X = initialState(1,1); Code500Sat.Y = initialState(2,1); Code500Sat.Z = initialState(3,1); Code500Sat.VX = initialState(4,1); Code500Sat.VY = initialState(5,1); Code500Sat.VZ = initialState(6,1); While Code500Sat.ElapsedDays <= 1.5 Report PropReport Code500Sat.TAIModJulian ... Code500Sat.X Code500Sat.Y Code500Sat.Z ... Code500Sat.VX Code500Sat.VY Code500Sat.VZ; Propagate Code500Prop(Code500Sat); EndWhile