Merge branch 'fixf'
[wrf-fire-matlab.git] / cycling / ros_var.m
blob2abc8c95003f9c2b54c0e7cb47be6efe54dbf98c
1 function rv = ros_var(d,c,l,sig)
2 %gives standard deviation of estimate ros between two detections
3 %d - distance in meters
4 %c - time between detections in hours
5 %l - optional time of uniform disributiuon
6 %sig - standard deviation of geolocation error
7 if ~exist('l','var')
8    l = 6;
9    sig = 375;
10 end
11 if c < l
12     rv = NaN;
13 else
14     rv =  sqrt((d^2+2*sig^2)/l^2*log(c^2/(c^2-l^2)) - d^2/l^4*(log(((c+l)/(c-l))^l*((c^2-l^2)/(c^2))^c))^2)/3600;
15 end
17 end %function