// Copyright (c) CNES 2008 // // This software is part of CelestLab, a CNES toolbox for Scilab // // This software is governed by the CeCILL license under French law and // abiding by the rules of distribution of free software. You can use, // modify and/ or redistribute the software under the terms of the CeCILL // license as circulated by CEA, CNRS and INRIA at the following URL // 'http://www.cecill.info'. function [Zdot] = CL__3b_RHSDP(t, Z, MU) // Motion model in the 2-body system (including monodromy matrix) // Inputs: // t: time // Z: input vector (42x1) // (6: position+velocity + 36 for the monodromy matrix) // MU: mass ratio (> 0 and <= 1) // // Outputs: // Zdot: derivative (42x1) // (6: position+velocity + 36 for the monodromy matrix) // // Author: // B. Meyssignac (CNES DCT/SB/MO) // R. Alacevich (Stage CNES DCT/SB/MO) // Declarations: // Code: r0 = sqrt((Z(1)+MU)^2+Z(2)^2+Z(3)^2); r1 = sqrt((Z(1)-1+MU)^2+Z(2)^2+Z(3)^2); Xdot = [Z(4); Z(5); Z(6); 2*Z(5)+Z(1)-(1-MU)*(Z(1)+MU)/(r0^3)-MU*(Z(1)-1+MU)/(r1^3); -2*Z(4)+Z(2)-(1-MU)*Z(2)/(r0^3)-MU*Z(2)/(r1^3); -(1-MU)*Z(3)/(r0^3)-MU*Z(3)/(r1^3)]; C2 = (1-MU)/r0^3+MU/r1^3; // derivees partielles de OMEGA: OMEGAxx = 1-C2+3*(1-MU)*(Z(1)+MU)^2/r0^5+3*MU*(Z(1)-1+MU)^2/r1^5; OMEGAxy = 3*(1-MU)*(Z(1)+MU)*Z(2)/r0^5+3*MU*(Z(1)-1+MU)*Z(2)/r1^5; OMEGAxz = 3*(1-MU)*(Z(1)+MU)*Z(3)/r0^5+3*MU*(Z(1)-1+MU)*Z(3)/r1^5; OMEGAyy = 1-C2+3*(1-MU)*Z(2)^2/r0^5+3*MU*Z(2)^2/r1^5; OMEGAyz = 3*(1-MU)*Z(2)*Z(3)/r0^5+3*MU*Z(2)*Z(3)/r1^5; OMEGAzz = -C2+3*(1-MU)*Z(3)^2/r0^5+3*MU*Z(3)^2/r1^5; Ydot = [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