function [Lac,Loc]=get_circumference2(lat,lon,yaw,altitude,range) % get the circumference La0=[];Lo0=[]; La1=[];Lo1=[]; for idx2=1:length(lat) [la0,lo0,d0]=getGeo(0.0,0.0,range,lat(idx2),lon(idx2),altitude(idx2),yaw(idx2),0.0); La0=[La0,la0]; Lo0=[Lo0,lo0]; [la1,lo1,d1]=getGeo(1.0,0.0,range,lat(idx2),lon(idx2),altitude(idx2),yaw(idx2),0.0); La1=[La1,la1]; Lo1=[Lo1,lo1]; end Lac=[La0,La1(end:-1:1)]; Loc=[Lo0,Lo1(end:-1:1)]; end