function [azspeed,elspeed]=scanspeed(lidar)

[na,nr]=size(lidar.RWS);
az=lidar.azimuth(:,1);

az=lidar.azimuth(:,1)*pi/180;
el=lidar.elevation(:,1)*pi/180;
t=lidar.timestamp*24*60*60;
spazf=diff(az)./diff(t');
spelf=diff(el)./diff(t');


azspeed=spazf;
elspeed=spelf;
return
end