9

Assume that I have a device attached on a car which includes an MCU, and a SIM908 module. The SIM908's function is to receive GPS data from satellites and then send them to the remote server through 2G/GPRS once every minute to display on the web. Now, beside sending the GPS location, I want to send velocity and direction of the car too. I know that velocity and direction can be calculated from the GPS coordinates, but I'm not sure if the MCU can handle those calculations.

Should I put this task on the remote server to decrease the load on the MCU (such as saving power, smooth run...) or directly process on the MCU? Can you suggest a good way of doing this task?

3 Answers 3

6

As Bence says, it depends on the chip, and accuracy needed.

But I'd like to add one thing: many GPSes output speed and heading (direction) in one of their NMEA sentences. If your GPS chip does this, you may use this directly, and won't have to calculate anything—simply use the values provided by the GPS.

5

It strongly depends on the MCU you have, but I think any microcontroller on the market could handle this task easily. Calculating velocity and direction from the coordinates is not a big deal. I think parsing the GPS sentences takes more CPU time.

  • So if you are just tunneling the GPS data through the GPRS link, unprocessed, so the whole NMEA sentence in one piece, then do the calculation on the server side.

  • If you extract the relevant info on the MCU before sending, then calculating velocity and direction is recommended to be done on the MCU as well. I would keep all logic (parsing + calculation) on the same side. Do not have a little here and a little there, that just complicates things.

Some other stuff I would think of before making the decision:

  • If you run the device from battery and you are short on power, then you can do as much of the processing on the server side as possible, and your MCU can sleep more and only wake up to query the GPS and send the data.

  • I do not know what mobile tariff you have for the SIM908, but if cost and every sent kB matters, then extract and calculate everything one the MCU to reduce the data traffic over the GPRS link.

4

As a person that created fleet management system processing data from devices with GPS receivers that currently serving two million units that consists from more then thousand of different types of such trackers from hundreds of manufacturers worldwide I have only one advice to you - do everything you can on the device side and rely on the server only for stable storage for raw telemetry messages. Velocity and course you can read from GPS receiver, but also do not forget to deliver to server quantity of satellites, hdop and other parameters. Your device attached to car's electricity lines so you do not need to save power and prices for SIMs traffic are going down each year. So just send whatever you can catch and believe with each piece of data server can sometimes do more then you can imagine.

And do not forget that most of servers are just writing to database, especially in high load systems, they do not have fast (or sometimes at all) access to previous message from your device and can not do any calculations before saving the message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.