function pp=pred_RHI(x,y,z,x0,y0,z0,t,p,val)
allowedval=[2,3,5,6,9,10,11,14];
if ~(val==allowedval)
    disp('Please select the number of parameters more carefully')
    stop
end
ae=6378.1e03;
r=sqrt(x.^2+y.^2+z.^2);
num=length(z);
zz=z0*ones(size(z));
xx=x0*ones(size(x));
thetae=t+atan((r.*cos(t))./(ae+r.*sin(t)));

iproj=cos(thetae);
kproj=sin(thetae);
xe=r.*iproj;
ze=r.*kproj-((r.*cos(thetae)).^2./(2*ae));
        pp(:,1)=iproj;
        pp(:,2)=kproj;
 

return
end