GPSDecoder::GPSDecoder() { nmeaPositionIndices[0] = 1; nmeaPositionIndices[1] = 2; nmeaPositionIndices[2] = 3; nmeaPositionIndices[3] = 4; nmeaPositionIndices[4] = 6; nmeaPositionIndices[5] = 7; nmeaPositionIndices[6] = 8; nmeaPositionDatums[0] = latitudeString; nmeaPositionDatums[1] = NSlatitudeString; nmeaPositionDatums[2] = longitudeString; nmeaPositionDatums[3] = EWlongitudeString; nmeaPositionDatums[4] = numSatellitesString; nmeaPositionDatums[5] = hdopString; nmeaPositionDatums[6] = altitudeString; initNmea(&nmeaPosition, "GPGGA,", 1, nmeaPositionIndices, nmeaPositionDatums); nmeaVelocityIndices[0] = 0; nmeaVelocityIndices[1] = 2; nmeaVelocityIndices[2] = 4; nmeaVelocityDatums[0] = trueheadingString; nmeaVelocityDatums[1] = magneticheadingString; nmeaVelocityDatums[2] = speedString; initNmea(&nmeaVelocity, "GPVTG,", 3, nmeaVelocityIndices, nmeaVelocityDatums); latitude = INT32_MIN; longitude = INT32_MIN; altitute = INT32_MIN; realNumSatellites = INT32_MIN; realHdop = INT32_MIN; speed = INT32_MIN; trueheading = INT32_MIN; magneticheading = INT32_MIN; }
IMUDecoder::IMUDecoder() { nmeaIndices[0] = 0; nmeaIndices[1] = 1; nmeaIndices[2] = 2; nmeaIndices[3] = 3; nmeaIndices[4] = 4; nmeaIndices[5] = 5; nmeaIndices[6] = 6; nmeaIndices[7] = 7; nmeaIndices[8] = 8; nmeaIndices[9] = 9; nmeaIndices[10] = 10; nmeaIndices[11] = 11; nmeaDatums[0] = yawString; nmeaDatums[1] = pitchString; nmeaDatums[2] = rollString; nmeaDatums[3] = magnetXString; nmeaDatums[4] = magnetYString; nmeaDatums[5] = magnetZString; nmeaDatums[6] = accelXString; nmeaDatums[7] = accelYString; nmeaDatums[8] = accelZString; nmeaDatums[9] = gyroXString; nmeaDatums[10] = gyroYString; nmeaDatums[11] = gyroZString; initNmea(&nmeaData, IMU_TAG, sizeof(nmeaDatums) / sizeof(sizeof(*nmeaDatums)), nmeaIndices, nmeaDatums); /* initNmea(&nmeaData, IMU_TAG, sizeof(nmeaDatums), (const int[]) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, (char*[]) {yawString, pitchString, rollString, magnetXString, magnetYString, magnetZString, accelXString, accelYString, accelZString, gyroXString, gyroYString, gyroZString}); */ }