function [out]=planetdata(CB,Bi,i)
%[out]=planetdata(CB,Bi,i)
%i=1 for mu,2 for rb, 3 for J2
%km and seconds

switch CB
case 0
    mu=[1.3271244e11
        2.20320808e4
        3.2485877e5
        3.98600485043e5
        4.282828685e4
        1.267120008e8
        3.7934000093e7
        5.803200946e6
        6.8713006597e6
        9.47209e2];
    
 	 r=[696000
        2440
        6052
        6378
        3390
        69910
        58230
        25360
        24620
        1150];

    J2=[0
        60
        4.458
        1082.63
        1960.45
        14736.
        16298.
        3343.43
        3411.
        0]*1e-6;
          
case 3
    mu=[3.98600485043e5; 4.902792781e3];
    r=[6378; 1737.5];
    J2=[1082.63; 202.7]*1e-6;
case 5
    mu=[1.267120008e8
		5959.91
        3202.74
        9887.83
        7179.29];
    r=[ 69910
		1821.5
        1561
        2631
        2410.5];
end
pdata=[mu(Bi+1) r(Bi+1)];if CB==0|CB==3;pdata=[pdata J2(Bi+1)];end
out=pdata(:,i);
if diff(size(Bi))>0;out=out';end