example.c: added example for gsv parsing
This commit is contained in:
parent
c273d92a33
commit
6aee1b8bb7
14
example.c
14
example.c
@ -43,6 +43,20 @@ int main()
|
|||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case MINMEA_SENTENCE_GSV: {
|
||||||
|
struct minmea_sentence_gsv frame;
|
||||||
|
if (minmea_parse_gsv(&frame, line)) {
|
||||||
|
printf("$GPGSV: message %d of %d\n", frame.msg_nr, frame.total_msgs);
|
||||||
|
printf("$GPGSV: sattelites in view: %d\n", frame.total_sats);
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
printf("$GPGSV: sat nr %d, elevation: %d, azimuth: %d, snr: %d dbm\n",
|
||||||
|
frame.sats[i].nr,
|
||||||
|
frame.sats[i].elevation,
|
||||||
|
frame.sats[i].azimuth,
|
||||||
|
frame.sats[i].snr);
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user