Question

What's the best way to transmit a history of accelerometer/compass data to a server?

I have a very basic Android application that transmits GPS point data to a web server. I would like to now include accelerometer/compass data along with these GPS coordinates. The idea is to get a better understanding of the path the device has taken and the forces it has experiences along the trip.

I don't want to miss quick accelerometer events such as a sharp bump. But I can see this resulting in a large amount of (possibly redundant) data getting sent over the wire.

Is there a standardised format for storing / transmitting this type of data?

Thanks, Dave

Was it helpful?

Solution

The usual standard for transmitting realtime GPS and compass data over a serial line is NMEA 0183.
This might even be how your GPS talks to Android internally. It is also often used over network connections. The format is based on one line of ASCII text per sample, with fields in each line deliminated by commas.

However, since you are interested in recording a history of travel information (location, direction, and acceleration), it's not necessary to record every sample. Instead, reduce the sample rate to something acceptable -- perhaps one record per minute or even one record per ten minutes. In each record, store the mean of each value, the standard deviation, and the maximum. This way, you won't miss "sharp bumps," since they will show up in the "max" value of acceleration.

The format in which you store this data is probably not crucial, and you should just pick something convenient and natural. As the commenters have mentioned, you might also want to look into GeoJSON, or perhaps just make up a suitable format of your own.

OTHER TIPS

Regarding Accelometer. Motion sensors such as gyros, accelometers and compass outputs raw DAC measurements over 3 axis (xyz) these values are usually signed 16bit. There's also an option to transform these values into a 4 element quaternion vector.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top