Re: Rolling Weekly Data - Displaying data on website
Posted: Mon 15 Aug 2022 9:39 am
Hi everyone
Thanks for all your help and comments on this task. Obviously what I thought was a simple task of just a simple average was a way under estimate, scalar averaging just does not work.
This left vector averaging which was something I was completely unused to. The degree values are converted into radians, and I worked out the u East and u North components with sin and cos functions of each data point, and averaged the results. This result is then run through the atan2 function and converted back to radians.
The above calculation then was turned into php instruction to get the final result as seem on my web site. For those who are interested the final php code is attached.
Thanks for all your help and comments on this task. Obviously what I thought was a simple task of just a simple average was a way under estimate, scalar averaging just does not work.
This left vector averaging which was something I was completely unused to. The degree values are converted into radians, and I worked out the u East and u North components with sin and cos functions of each data point, and averaged the results. This result is then run through the atan2 function and converted back to radians.
The above calculation then was turned into php instruction to get the final result as seem on my web site. For those who are interested the final php code is attached.