Commit Graph

93 Commits

Author SHA1 Message Date
Kosma Moczek
e9ee7cc0c1 Makefile: feature test macros to make dumb Linux happy 2014-09-02 22:18:43 +02:00
Kosma Moczek
6fa3e4646a .travis.yml: use sudo when calling apt-get 2014-09-02 22:07:30 +02:00
Kosma Moczek
d303b73c40 add .travis.yml 2014-09-02 22:05:39 +02:00
Kosma Moczek
e81f908109 minmea_scan("f"): allow spaces at the start of the field 2014-07-30 15:18:22 +02:00
Kosma Moczek
b777fbe0b9 minmea_gettimeofday -> minmea_gettime 2014-07-11 12:18:47 +02:00
Kosma Moczek
23e2f950c5 README.md: more timegm() documentation 2014-06-18 12:13:14 +02:00
Kosma Moczek
7786885eef tests.c: shorter & consistent variable names 2014-06-18 11:41:41 +02:00
Kosma Moczek
eb6baa182e tests.c: add assert_float_eq() macro 2014-06-18 11:39:06 +02:00
Kosma Moczek
79c98e2d43 Merge pull request #9 from esoule/hotfix-gsv-shorter-sentence-2
GSV sentence with 0 to 4 satellites, plus gcc -Wfloat-equal
2014-06-18 11:31:49 +02:00
Evgueni Souleimanov
40b3fdd80d tests: use fabsf (float), not fabs (double) in epsilon comparisons of floats
Fixes a mistake in commit f68eb7c
2014-06-17 21:23:09 -04:00
Evgueni Souleimanov
4b060fe234 example: indent parsing results with spaces 2014-06-17 20:58:55 -04:00
Evgueni Souleimanov
eede684d27 example: indicate when a sentence is not parsed or is not valid
Indicate when a sentence is not parsed or is not valid. Before this
change, it was not clear from the example run whether each sentence is
parsed properly or not.
2014-06-17 20:56:29 -04:00
Evgueni Souleimanov
6f9ffab883 example: fix printf line 2014-06-17 20:52:05 -04:00
Evgueni Souleimanov
a52c1faa27 GSV: parse sentences that list 0 to 4 satellites 2014-06-17 20:46:40 -04:00
Evgueni Souleimanov
74e2ce002e add test for shorter GSV sentence, with 0 to 4 satellites 2014-06-17 20:46:21 -04:00
Evgueni Souleimanov
f68eb7c9fd fix "warning: comparing floating point with == or != is unsafe" (epsilon comparison)
Instead of comparing floats "x == y", perform comparison
"fabs(x - y) <= epsilon", where epsilon is acceptable error that
accumulates in computation of x and/or y.

Because in this case all integers are small and all floats are exactly
representable under IEEE754, epsilon may be zero in our tests.

This warning occurred when compiling using

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

on CentOS 6.5 x86_64

using the following CFLAGS (locally inserted into Makefile)

CFLAGS = -g -Wall -Wextra -Wformat=2 -funsigned-char -fstrict-aliasing
 -Wstrict-aliasing -Wfloat-equal -Wundef -Wuninitialized -Wpointer-arith
 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waddress
 -Waggregate-return -Wstrict-prototypes -Wold-style-declaration
 -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes
 -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn
 -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs
 -Wshadow -Wsign-compare -Wlogical-op -std=c99

and this make command:

make clean ; make example tests
2014-06-17 20:35:32 -04:00
Evgueni Souleimanov
52c077c5ac undo commit "tests: prevent compiler warning when comparing floats" 2014-06-17 20:35:32 -04:00
Evgueni Souleimanov
2ae5c4a645 fix "warning: no previous prototype for 'minmea_suite'"
This warning occurred when compiling using

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

on CentOS 6.5 x86_64

using the following CFLAGS (locally inserted into Makefile)

CFLAGS = -g -Wall -Wextra -Wformat=2 -funsigned-char -fstrict-aliasing
 -Wstrict-aliasing -Wfloat-equal -Wundef -Wuninitialized -Wpointer-arith
 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waddress
 -Waggregate-return -Wstrict-prototypes -Wold-style-declaration
 -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes
 -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn
 -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs
 -Wshadow -Wsign-compare -Wlogical-op -std=c99

and this make command:

make clean ; make example tests
2014-06-17 20:35:26 -04:00
Evgueni Souleimanov
0fc9cea986 fix "warning: old-style function definition"
This warning occurred when compiling using

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

on CentOS 6.5 x86_64

using the following CFLAGS (locally inserted into Makefile)

CFLAGS = -g -Wall -Wextra -Wformat=2 -funsigned-char -fstrict-aliasing
 -Wstrict-aliasing -Wfloat-equal -Wundef -Wuninitialized -Wpointer-arith
 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waddress
 -Waggregate-return -Wstrict-prototypes -Wold-style-declaration
 -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes
 -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn
 -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs
 -Wshadow -Wsign-compare -Wlogical-op -std=c99

and this make command:

make clean ; make example tests
2014-06-17 20:35:15 -04:00
Evgueni Souleimanov
1b3147c7e0 fix "warning: declaration of 'time' shadows a global declaration" (-Wshadow)
This warning occurred when compiling using

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

on CentOS 6.5 x86_64

using the following CFLAGS (locally inserted into Makefile)

CFLAGS = -g -Wall -Wextra -Wformat=2 -funsigned-char -fstrict-aliasing
 -Wstrict-aliasing -Wfloat-equal -Wundef -Wuninitialized -Wpointer-arith
 -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waddress
 -Waggregate-return -Wstrict-prototypes -Wold-style-declaration
 -Wold-style-definition -Wmissing-parameter-type -Wmissing-prototypes
 -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn
 -Wmissing-format-attribute -Wpacked -Wredundant-decls -Wnested-externs
 -Wshadow -Wsign-compare -Wlogical-op -std=c99

and this make command:

make clean ; make example tests
2014-06-17 20:33:47 -04:00
Evgueni Souleimanov
82b1c180f2 remove example executable in make clean 2014-06-17 20:33:47 -04:00
Kosma Moczek
4de49c8fad README.md: style fix 2014-06-17 15:04:52 +02:00
Kosma Moczek
f3d21d6135 Merge branch 'pull-request-2' 2014-06-17 15:03:24 +02:00
Kosma Moczek
0cf5bb5cf9 minmea_sentence_gll: minor style fixes 2014-06-17 15:02:04 +02:00
Kosma Moczek
7477e3caa3 minmea_parse_gll: make mode field optional 2014-06-17 15:00:51 +02:00
Kosma Moczek
f9394d2915 minmea_sentence_gll: adapt for new floating point format 2014-06-17 14:57:08 +02:00
Kosma Moczek
f193e412c6 minmea.h: style fixes 2014-06-17 14:54:12 +02:00
Kosma Moczek
531192598d test_minmea_parse_gll1: keep naming consistent 2014-06-17 14:53:27 +02:00
Kosma Moczek
c375b8144b merge with master 2014-06-17 14:52:46 +02:00
Kosma Moczek
701fe6920f example.c: revert accidental overwrite 2014-06-17 14:46:52 +02:00
Kosma Moczek
df695c4933 tests: prevent compiler warning when comparing floats 2014-06-17 12:22:48 +02:00
Kosma Moczek
c5bc12f8cc minmea_gettimeofday: workaround missing tm_isdst on some systems 2014-05-28 16:06:32 +02:00
Kosma Moczek
03d9772807 always run tests before committing, kiddo. 2014-05-28 15:41:42 +02:00
Kosma Moczek
2329d55ff6 minmea_scan: avoid shadowing local variables 2014-05-28 15:38:23 +02:00
Kosma Moczek
d19839cc7e README.md: precision is no longer a limitation, hooray! 2014-04-27 17:38:49 +02:00
Kosma Moczek
f872935244 README.md: even nicer example 2014-04-27 17:31:54 +02:00
Kosma Moczek
f9f9bed148 README.md: remove extra indentation in example 2014-04-27 17:30:51 +02:00
Kosma Moczek
3e3420d1ab fix minmea_scan("f") overflow 2014-04-27 17:19:29 +02:00
Kosma Moczek
1e802f6d00 fix minmea_scan("f") when no decimal point is present 2014-04-27 17:06:10 +02:00
Kosma Moczek
334e63d599 tests.c: add minmea_scan("f") overflow tests 2014-04-27 17:05:21 +02:00
Kosma Moczek
a5f67aa500 README.md: reflect the API changes 2014-04-27 16:44:56 +02:00
Kosma Moczek
e510d9912e example.c: fix printed frame names 2014-04-27 16:38:06 +02:00
Kosma Moczek
870d64d1d5 example.c: update for the new API 2014-04-27 16:36:40 +02:00
Kosma Moczek
14437a9631 [API change] add struct minmea_float w/ int_least32_t
This is an API breaker that incorporates the following big changes:

1. The (value, scale) float, as used in minmea, is a compound type. It
should be declared and used as such.

2. Some platforms, notably avr-gcc, have 16-bit ints. Make life easier
for them by using int_least32_t for floating point values.

3. As a side effect, the following functions were renamed:

* minmea_coord -> minmea_tocoord
* minmea_float -> minmea_tofloat

Migration guide for user code (easy unless you do fancy stuff):

1. Replace calls to minmea_{coord,float}.

2. Replace int32_t with int_least32_t in user code if your platform
requires this.
2014-04-27 16:22:37 +02:00
Kosma Moczek
6d75881425 example.c: fix build errors introduced by #4
My bad for not checking this.
2014-04-24 16:05:50 +02:00
Kosma Moczek
6473d5b30e Merge commit 'pull/origin/5' 2014-04-24 16:02:40 +02:00
Kosma Moczek
e2e6a41209 tests.c: fix build errors introduced by #4
My bad for not checking this.
2014-04-24 15:58:12 +02:00
mek-x
e4ce324581 minmea.h: style fix 2014-04-24 15:44:49 +02:00
Kosma Moczek
c5efe80f36 README.md: update supported frames list 2014-04-24 11:57:50 +02:00
Kosma Moczek
08d28a590a Merge pull request #3 from eketh/master
Added support for GST frame
2014-04-24 11:55:54 +02:00