My project is to average several angle measurement taken in a moving vehicle and periodically combine that average with a GPS bearing in order to end up with a ASCII string that will contain the average of the readings referenced to North (0 degrees). The measurements are in 11.25 degree increments and I have scaled them in Hex in a look up table and then added them and divided to find the average in Hex. That seems to work on the Studio 7 simulator.
I'm not sure how to proceed. I made a 7 byte table in a sort of CORDIC fashion (Decimal for 180, 90, 45, 22.5, ... ) and used one memory byte to keep track of which bytes to add together in decimal to build the Hex bearing. The 7 bytes used for the decimal representation were to be found by adding the CORDIC decimal values used to build the bearing. However, the length of the code grew with each decimal place and it got so that it was hard for me to read the code I had written!
Should I first convert the bearing part of the GPS string (ASCII) into hex and combine that with the average vehicle bearing or should change the vehicle bearing to ASCI and combine. There must be a simpler way, but I have yet to see it.