/* Decode given GSA sentence by validating and splitting the source string into values.  */
static ssize_t decode_gsa(struct nmea_sentence_t *dst_p, char *src_p)
/* Decode given GSA sentence by validating and splitting the source string into values.  */
static ssize_t decode_gsa(struct nmea_sentence_t *dst_p, char *src_p)
{
    int i;
    dst_p->type = nmea_sentence_type_gsa_t;
    dst_p->gsa.selection_p = strsep(&src_p, ",");
    dst_p->gsa.fix_p = strsep(&src_p, ",");
    for (i = 0; i < membersof(dst_p->gsa.prns); i++) {
        dst_p->gsa.prns[i] = strsep(&src_p, ",");
    }
    dst_p->gsa.pdop_p = strsep(&src_p, ",");
    dst_p->gsa.hdop_p = strsep(&src_p, ",");
    dst_p->gsa.vdop_p = strsep(&src_p, "*");
    if (src_p == NULL) {
        return (-EPROTO);
    }
    return (0);
}