CRTBP Example Trajectory
This is for the three-body system of the Sun, Earth, and Moon. Creates plots for some example trajectories.
Contents
See also
PropagateCRTBP PeriodicOrbitFamilies
%-------------------------------------------------------------------------- % Copyright (c) 2018 Princeton Satellite Systems, Inc. % All rights reserved. %-------------------------------------------------------------------------- % Since 2018.1 %-------------------------------------------------------------------------- familyToStart = '16'; perturbationVector = [1;1;1;1;1.0001;1]; periodMultiplier = 0.7; familyFile = strcat('f',familyToStart,'Ref.mat'); s = load(familyFile); [~, y] = PropagateCRTBP(s.d.initialState'.*perturbationVector,0,s.d.period*periodMultiplier,s.d.mu); Plot2D(y(1,:),y(2,:),'x','y','Example CRTBP Trajectory') hold on; axis equal; xMax = max(max(y(1,:)),max(-y(1,:))); yMax = max(max(y(2,:)),max(-y(2,:))); set(gca,'xLim',[-1,1]*xMax*1.2); set(gca,'yLim',[-1,1]*yMax*1.2); xlim = get(gca,'XLim'); x = (0:0.01:1)*(xlim(2)-xlim(1))+xlim(1); ylim = get(gca,'yLim'); y = (0:0.01:1)*(ylim(2)-ylim(1))+ylim(1); x = repmat(x,[size(y,2) 1]);y=repmat(y',[1 size(x,2)]); z = zeros(size(x)); zX = zeros(size(x(:)')); z(:) = CRTBPJacobiConstant([x(:)';y(:)';zX;zX;zX;zX],s.d.mu); contour(x,y,z,[1 1]*CRTBPJacobiConstant(s.d.initialState'.*perturbationVector,s.d.mu)); plot(0,0,'rx'); legend('Trajectory','Jacobi-integral bounding surface','Earth') text(xlim(1),0,'\leftarrow Sun'); %--------------------------------------