Skip to content

Commit

Permalink
Merge pull request #16 from gkpln3/master
Browse files Browse the repository at this point in the history
Fixed wrong field parsing in GpsNavigationMessageStore
  • Loading branch information
mohammedkhider authored Sep 10, 2019
2 parents c67e367 + 66bcdc6 commit 978de59
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private void handleSecondSubframe(byte prn, byte[] rawData) {
gpsEphemerisProto.iode = iode;

short crs = (short) extractBits(CRS_INDEX, CRS_LENGTH, rawData);
gpsEphemerisProto.crc = crs * POW_2_NEG_5;
gpsEphemerisProto.crs = crs * POW_2_NEG_5;

short deltaN = (short) extractBits(DELTA_N_INDEX, DELTA_N_LENGTH, rawData);
gpsEphemerisProto.deltaN = deltaN * POW_2_NEG_43 * Math.PI;
Expand Down Expand Up @@ -350,7 +350,7 @@ private void handleThirdSubframe(byte prn, byte[] rawData) {

int odot = extractBits(ODOT_INDEX, ODOT_LENGTH, rawData);
odot = getTwoComplement(odot, ODOT_LENGTH);;
gpsEphemerisProto.omegaDot = o * POW_2_NEG_43 * Math.PI;
gpsEphemerisProto.omegaDot = odot * POW_2_NEG_43 * Math.PI;

short cis = (short) extractBits(CIS_INDEX, CIS_LENGTH, rawData);
gpsEphemerisProto.cis = cis * POW_2_NEG_29;
Expand Down Expand Up @@ -758,4 +758,4 @@ public boolean isSubframeDecoded() {
return hasSubframe && issueOfDataMatches;
}
}
}
}

0 comments on commit 978de59

Please sign in to comment.