Guest User

duljina luka

a guest
Jun 21st, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.41 KB | None | 0 0
  1. function [G] = duluka(fi)
  2.  
  3. %%
  4.   a = 6378137.0; % earth semimajor axis in meters
  5.   finv = 298.257223563; % reciprocal flattening
  6.   f=1/finv;
  7.   b=a*(1-f);
  8.   e=sqrt((a^2-b^2)/a^2);
  9.   e2=e^2;
  10. %%
  11. A=1+3/4*e2+45/64*e2*e2;
  12. B=3/4*e2+15/16*e2*e2;
  13. C=15/64*e2*e2;
  14.  
  15. for i=1:1:max(size(fi))
  16.   if i>=2  
  17.    
  18.     G=a*(1-e2)*(A(fi(i)-fi(i-1))-B/2*(sin*2*fi(i)-sin*2*fi(i-1))+C/4*(sin*4*fi(i)-sin*4*fi(i-1)));
  19.   end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment