adokter / vol2bird

Generates vertical profiles of birds from weather radar volume scans
http://adokter.github.io/vol2bird
MIT License
31 stars 17 forks source link

add body orientation estimation #100

Open adokter opened 6 years ago

adokter commented 6 years ago

Proposed approach:

float svdfit(float x,int Ndx,float y[],float yfit[],int Npnt, int (funcs)(float x[],int Ndx,float afunc[],int Npar), float apar[],float avar[],int Npar) { //body goes here }


* pass the new sine function to a call of svdfit
* Instead of a simple sine, we may also do a fit of the first, second and third fourier components, i.e. include the sines first overtone. This will bring number of fit parameters to four: i.e. phase, and amplitude of fundamental, first and second overtone. This function may be adequate to fit both C-band and S-band data.
adokter commented 6 years ago

NB: radial functions that have a sum of the fundamental and overtone are nonlinear: fundamental: y_0 = baseline + u_0 sin(phi) + v_0 cos(phi) 1st overtone: y_1 = baseline + u_1 sin(2 phi) + v_1 cos(2 phi) with phi the azimuth

In addition we have the boundary condition that the phases of the two components are equal, i.e. u_1/v_1=u_0/v_0, which for the function y=y_0+y_1 introduces products between fit parameters.

Therefore, easiest to implement a separate fit of either y_0 or y_1 to the radial data

adokter commented 6 years ago

Prototype functionality added by commit a3db9ce8895b85a37f18efac026313b074e73b31

Still to complete: