UnicornRaceEngineering / g5-nodes

Software for nodes on the g5 car
MIT License
0 stars 0 forks source link

GPS precision #4

Open FnuGk opened 10 years ago

FnuGk commented 10 years ago

When we extract the GPS latitude/longitude we round to nearest second and store it as a uint8_t. This throws away some of the precision, about 15m in the worst case. Instead we could store as a float or double and retain the precision but then we pay in memory use and easy of sending via can.

hatrx commented 10 years ago

The memory consumption wont be a problem. As for the can, we should consider looking into developing a general approach to sending "large" amounts of data (I'm thinking a helper function in libat90/can.c). One way to potentially simplify the reception of data contained in multiple frames is to make use of the CAN feature Frame Buffer Receive Mode which throws an interrupt only when a set of frames have completed reception. If we are looking for a general approach this option does have serious limitations referring to the "low" number of MOBs available.

FnuGk commented 10 years ago

True. I am thinking that instead of sending the coordinates as DMS(degrees minutes seconds) we should simply send a DD (Decimal Degree) value. That is a single double for each coordinate.

FnuGk commented 10 years ago

I have converted the coordinate seconds to double and transmit the DD over CAN in a8c6f616e4ac4b07930e395c9135ff0451e08655

We still need to test this outside to see if we in fact do get the precision we want