PHP Implementation of Haversine Computation

We needed to compute the distance between two points on the Earth using longitude and latitude from Google’s Geocode API service. We use PHP, but there was no reference to a PHP implementation of the Haversine Equation, so I made one. I needed miles, but if you need another unit, just replace $earth_radius with the Read more about PHP Implementation of Haversine Computation[…]

PHPUnit’s CodeCoverage and CodeIgniter

We have not figured out how to integrate PHPUnit well into our projects, especially when CI’s unit test library is so handy. However, I did take the time to try using PHPUnit’s CodeCoverage metric. However, in order to get it to work, I had to blacklist the CI system directory (the application directory is outside Read more about PHPUnit’s CodeCoverage and CodeIgniter[…]

Using ARM’s CMSIS DSP Library: arm_sqrt_q15

I continue the ARM CMSIS DSP series, this time demonstrating arm_sqrt_q15. This function takes the sqrt of a fractional input, and returns the value (by reference) and some error detection. Here is the function definition: “in” really is a Q Format of 1.15. 0 is represented as 0x0000. 1 is represented as 0x7FFF. This means Read more about Using ARM’s CMSIS DSP Library: arm_sqrt_q15[…]