wpisailbot / boat

Apache License 2.0
4 stars 2 forks source link

Use doubles for lat/lon #23

Closed jkuszmaul closed 6 years ago

jkuszmaul commented 6 years ago

Because single-precision floating point only gives ~1m precision for most latitude/longitudes, I am switching to doubles. Because the Airmar actually supplies lat/lon in single-precision floats and because GPS isn't any more accurate than that (for us) anyways, it shouldn't be too big a deal. However: a) There is always the concern of round-off errors occurring when doing math/other operations, which could substantially reduce accuracy b) Once we start worrying about vision challenges/buoys more, then sub-meter precision (relative to the boat) actually matters.

This does break the reading of old logs (see control/actuator_cmd.proto).

jsburklund commented 6 years ago

What is the plan for using both new and old logs? Is there an easy way to detect the new log version, and handle it with an abstraction?

jkuszmaul commented 6 years ago

I added a thing to check for old logs in the log-replay files. This should cover all the practical cases where the backwards compatibility matters.