sensepost / snoopy-ng

Snoopy v2.0 - modular digital terrestrial tracking framework
Other
429 stars 128 forks source link

Number of decimal places for GPS coordinates #19

Closed maximcherny closed 9 years ago

maximcherny commented 9 years ago

Hi,

I am testing using a GlobalSat BU-353S4, which provides coordinates with 9 decimals precision.

I note that the gpsd plugin uses a standard Float() column definition to store the coordinate values.

This approach works fine when using SQLite as the data store, however, when using MySQL, the created columns use whatever the default is for the FLOAT data type (in my case, 3) and there is a possibility of significant precision loss.

We could specify an explicit precision of 9, which would cater for the majority of cases. Happy to send a pull request.