summaryrefslogtreecommitdiff
path: root/gps.h
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-03-28 19:07:22 -0700
committerGary E. Miller <gem@rellim.com>2016-03-28 21:22:51 -0700
commit42b1ad8bea67471d07d06754f43729788d6a8f03 (patch)
tree62d1d65adde307bb98fe2ecec757a7551a2fcab8 /gps.h
parent67cf2228d351b6d5d6da6205f733bbea39c655c0 (diff)
downloadgpsd-42b1ad8bea67471d07d06754f43729788d6a8f03.tar.gz
Comment in the code the accuracy needed for cm level lat/lon.
Diffstat (limited to 'gps.h')
-rw-r--r--gps.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gps.h b/gps.h
index c5e1a5a2..6317941e 100644
--- a/gps.h
+++ b/gps.h
@@ -63,6 +63,17 @@ extern "C" {
* timestamp_t is only microSec precision
* timestamp_t and PPS do not play well together
*/
+
+/* we want cm accuracy and 0.0000001 degrees is 1.11 cm at the equator
+ * the equator is best case for longitude. At 45lat cut that in half.
+ * at 85lat make it 0.00000001
+ *
+ * this easily fits in a C double which has 15.95 digits of precision
+ * printf() format %f defaults to %.6f, which will truncate the result.
+ * so print with %.7f if you have a survey grade GPS.
+ *
+ * ref: https://en.wikipedia.org/wiki/Decimal_degrees
+ */
typedef double timestamp_t; /* Unix time in seconds with fractional part */
struct gps_fix_t {