msm8226-common: gps: Sub milli sec part in the relevant NMEA Strings

NMEA Strings should introduce the sub milli sec part in the
relevant NMEA Strings for NHZ Sessions

Change-Id: I9bac4caa26e87741e5e82e16a8047af20ac8012b
CRs-Fixed: 951144
This commit is contained in:
Kevin Tang 2015-12-29 22:35:36 -08:00 committed by RomanDesigner
parent a08bb59d7b
commit 57aa215504
No known key found for this signature in database
GPG key ID: 3D58447600ECB3AA

View file

@ -136,6 +136,7 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p,
int utcHours = pTm->tm_hour; int utcHours = pTm->tm_hour;
int utcMinutes = pTm->tm_min; int utcMinutes = pTm->tm_min;
int utcSeconds = pTm->tm_sec; int utcSeconds = pTm->tm_sec;
int utcMSeconds = (location.gpsLocation.timestamp)%1000;
if (generate_nmea) { if (generate_nmea) {
// ------------------ // ------------------
@ -281,8 +282,8 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p,
pMarker = sentence; pMarker = sentence;
lengthRemaining = sizeof(sentence); lengthRemaining = sizeof(sentence);
length = snprintf(pMarker, lengthRemaining, "$GPRMC,%02d%02d%02d,A," , length = snprintf(pMarker, lengthRemaining, "$GPRMC,%02d%02d%02d.%02d,A," ,
utcHours, utcMinutes, utcSeconds); utcHours, utcMinutes, utcSeconds,utcMSeconds/10);
if (length < 0 || length >= lengthRemaining) if (length < 0 || length >= lengthRemaining)
{ {
@ -434,8 +435,8 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p,
pMarker = sentence; pMarker = sentence;
lengthRemaining = sizeof(sentence); lengthRemaining = sizeof(sentence);
length = snprintf(pMarker, lengthRemaining, "$GPGGA,%02d%02d%02d," , length = snprintf(pMarker, lengthRemaining, "$GPGGA,%02d%02d%02d.%02d," ,
utcHours, utcMinutes, utcSeconds); utcHours, utcMinutes, utcSeconds, utcMSeconds/10);
if (length < 0 || length >= lengthRemaining) if (length < 0 || length >= lengthRemaining)
{ {