fix test for gga
This commit is contained in:
parent
113221d7a9
commit
4514f6dd5e
26
tests.c
26
tests.c
@ -507,19 +507,19 @@ END_TEST
|
|||||||
START_TEST(test_minmea_parse_gga1)
|
START_TEST(test_minmea_parse_gga1)
|
||||||
{
|
{
|
||||||
const char *sentence = "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47";
|
const char *sentence = "$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47";
|
||||||
struct minmea_sentence_gga frame = {};
|
struct minmea_sentence_gga frame = { 0 };
|
||||||
struct minmea_sentence_gga expected = {};
|
struct minmea_sentence_gga expected = { 0 };
|
||||||
expected.time = { 12, 35, 19, 0 };
|
expected.time = (struct minmea_time) { 12, 35, 19, 0 };
|
||||||
expected.latitude = { 4807038, 1000 };
|
expected.latitude = (struct minmea_float) { 4807038, 1000 };
|
||||||
expected.longitude = { 1131000, 1000 };
|
expected.longitude = (struct minmea_float) { 1131000, 1000 };
|
||||||
expected.fix_quality = 1;
|
expected.fix_quality = 1;
|
||||||
expected.satellites_tracked = 8;
|
expected.satellites_tracked = 8;
|
||||||
expected.hdop = { 9, 10 };
|
expected.hdop = (struct minmea_float) { 9, 10 };
|
||||||
expected.altitude = { 5454, 10 };
|
expected.altitude = (struct minmea_float) { 5454, 10 };
|
||||||
expected.altitude_units = 'M';
|
expected.altitude_units = 'M';
|
||||||
expected.height = { 469, 10 };
|
expected.height = (struct minmea_float) { 469, 10 };
|
||||||
expected.height_units = 'M';
|
expected.height_units = 'M';
|
||||||
expected.dgps_age = { 0, 0 };
|
expected.dgps_age = (struct minmea_float) { 0, 0 };
|
||||||
ck_assert(minmea_check(sentence, false) == true);
|
ck_assert(minmea_check(sentence, false) == true);
|
||||||
ck_assert(minmea_check(sentence, true) == true);
|
ck_assert(minmea_check(sentence, true) == true);
|
||||||
ck_assert(minmea_parse_gga(&frame, sentence) == true);
|
ck_assert(minmea_parse_gga(&frame, sentence) == true);
|
||||||
|
Loading…
Reference in New Issue
Block a user