Hi all,
I'm working on a GPS/GSM based project and I want to convert the RMC parameters to BINARY format.
Actual RMC Sentence looks like this:

$GPRMC,171004.031,A, 3658.4246,N,12201.3362,W,23.44,255.42, 060206
Interpretation as follows:

171004.031 = UTC of position fix (hours, mins, secs, decimal secs)
A = GPS Status, Valid (V = invalid)
3658.4246,N = Latitude
12201.3362,W = Longitude
23.44 = Speed over ground in knots
255.42 = Course over ground, degrees, true
060206 = Day, Month, Year

RMC GPS sentence will be parsed and the individual parameters are taken out and converted to
binary.Compressed form of the RMC frame after conversion form WGS84 format to binary will look like below
DATE & TIME--> 6 bytes
VALID--> 1 byte
LATITUDE--> 4 bytes
LONGITUDE--> 4 Bytes
SPEED--> 2 Bytes
COURSE--> 2 bytes


Frame pattern for ther parameters
Ignition ON/ OFF Status (If wired and enabled)
A/C ON/OFF Status (If wired and enabled)
Door Open Status (If wired and enabled)
Coolant Temperature (If wired and enabled)
Distance Travelled
Engine Load (If wired and enabled)
Fuel Gauge (If wired and enabled)
Average Speed for a pre-programmed period will look like below

Ignition
A/C
Door Open 1 byte
Coolant Temperature 2 bytes
Distance Travelled 2 bytes
Engine Load 2 bytes
Fuel guage 2 bytes
Average Speed 2 bytes

So the size of personalized frame after combining both RMC & periodic parameters will be 30 bytes.


I want to convert the above specified byte in BINARY format. I dont know how to it. Please help me. Sorry for such along in order to understand onlt i gave those details.

With regrds
S Sriram

If it is in a variable, it is in binary.

Define a nice struct along the line of your post, and read the NMEA string values you want into that. Add in the values you wanted, and there you go.

This Bit field example will help as well.

This question has already been answered. Start a new discussion instead.