Permabanned
- Joined
- 28 Nov 2003
- Posts
- 10,695
- Location
- Shropshire
My ecu outputs seven decimal place GPS coordinates as two 16 bit channels and the data reading software then combines them using maths to give a degree based GPS coordinate to generate a track map.
Below are two samples, one raw data from the ecu as two 16 bit channels, the other the GPS coordinate in degrees after the software has done the maths wizardry. Can anyone work out what it's doing to the raw date to combine them to make the correct coordinate please? I can't....
ECU output: GPS Latitude HW : 8015
GPS Latitude LW : -13983
Maths gives : Coordinate 52.8870988 degrees latitude
########################
ECU output : GPS Longitude HW : -364
GPS Longitude LW : 14387
Maths gives : Coordinate -2.6401195 degrees longitude
########################
All I can say is the hardware won't allow transmission of 32 bit data on the serial port, so they somehow split it up into two sets of 16 bit, then rejoin it in the software using maths. The end result is degrees, minutes and seconds to seven decimal places. I am collecting the data from the CAN BUS of the Motec ecu, and logging it in a none Motec data logger. The data logger's software has powerful maths functions, so once I can see how Motec split and rejoin the data streams I should be able to duplicate it in the other software. They also split the GPS time data stream into two 16 bit channels, this may be easier, example below, (the time format does not take into account British Summer Time offset, by the way).
GPS Time HW : 1614
GPS Time LW : -8040
GPS Time (combined) : 105832.600
Actual time was 10.58 AM and 32.600 seconds.
Thanks. I think HW is "high word", and LW is "low word", and combing the two 16 bit streams correctly is the key.
Below are two samples, one raw data from the ecu as two 16 bit channels, the other the GPS coordinate in degrees after the software has done the maths wizardry. Can anyone work out what it's doing to the raw date to combine them to make the correct coordinate please? I can't....
ECU output: GPS Latitude HW : 8015
GPS Latitude LW : -13983
Maths gives : Coordinate 52.8870988 degrees latitude
########################
ECU output : GPS Longitude HW : -364
GPS Longitude LW : 14387
Maths gives : Coordinate -2.6401195 degrees longitude
########################
All I can say is the hardware won't allow transmission of 32 bit data on the serial port, so they somehow split it up into two sets of 16 bit, then rejoin it in the software using maths. The end result is degrees, minutes and seconds to seven decimal places. I am collecting the data from the CAN BUS of the Motec ecu, and logging it in a none Motec data logger. The data logger's software has powerful maths functions, so once I can see how Motec split and rejoin the data streams I should be able to duplicate it in the other software. They also split the GPS time data stream into two 16 bit channels, this may be easier, example below, (the time format does not take into account British Summer Time offset, by the way).
GPS Time HW : 1614
GPS Time LW : -8040
GPS Time (combined) : 105832.600
Actual time was 10.58 AM and 32.600 seconds.
Thanks. I think HW is "high word", and LW is "low word", and combing the two 16 bit streams correctly is the key.