GPS NMEA Parser written in assembly posted to OBEX, need help with Binary Coded
ry.david
Posts: 63
I uploaded a GPS parser to OBEX, which I wrote for my Prop contest entry. It is the serial receive and parsing all in one cog, written in assembly. I started out with Chip's FullDuplexSerial object and stripped all the transmit functions out of it. Then I started adding parsing functionality to it. Currently it parses GGA and RMC messages, which should have enough information for most people's needs. I tested it at 115,200 baud and position updates at 10Hz.
Now, since NMEA sentences are in ASCII, the output of the driver in the HUB is stored in binary coded decimals. I would like to convert this into standard integers (with a imaginary fixed decimal point) since it would take a lot less space in the HUB, and be far more convenient. I have been racking my brain for tricks to do this without subtracting $30, and then multiplying by the appropriate power of ten. Anyone have any ideas on how to do this?
Now, since NMEA sentences are in ASCII, the output of the driver in the HUB is stored in binary coded decimals. I would like to convert this into standard integers (with a imaginary fixed decimal point) since it would take a lot less space in the HUB, and be far more convenient. I have been racking my brain for tricks to do this without subtracting $30, and then multiplying by the appropriate power of ten. Anyone have any ideas on how to do this?
Comments
The result is in temp.· If you want to accumulate the result using ASCII digits, you'd add:
Post Edited (Mike Green) : 3/2/2010 1:49:02 AM GMT
-Rob
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm