I am working on an implementation of the modified Goertzel Algorithm (an efficient single point DFT) and am in the process of optimizing the code for the Photon. I am under the impression that since floating point arithmetic is implemented in software for the photon, it would be better if I could use a fixed point implementation. This is also so that I can transmit the data to a server on my computer with 16 bit precision. To be completely honest, I have no idea how to implement this myself, so if anyone has any resources to recommend it would be much appreciated.
Okay, I have found something that will probably work for my purposes. It’s a library called libfixmath. It has all of the capabilities that I need and does 16.16 fixed point arithmetic. It is supposedly platform independent, so porting it shouldn’t be an issue. However, I have never set up a library outside of what is included in the standard development environment. So I guess this is where I should start.
Very basically you will need to create a .h file and a .cpp file. In the web IDE you just click on the ‘+’ symbol on the right of the top line of tabs. What are you porting the fixed16 library from?
I use both the workbench and the web IDE. I find that visual studio is much more pleasant to work in while I’m coding, but the web IDE complies much faster. So I just copy and paste in between. Edit: I was just being an idiot and not using the workbench properly.
From what I understand, libfixmath is just a standard C/C++ library. Unfortunately, it does not appear to be the best documented, so I am just trying to dig around in order to understand how to best import it into my development environments.