Step 10: SPEED VS LOGGING ACCURACY
The accuracy and resolution of the geo data logger will depend on many facors such as:
- The speed by which we are moving with the geo data logger.
- The frequency by which sensors can generate fresh readings.
- The frequency by which the GPS receiver can generate location fixes to tag sensor data with.
- The SD card read/write performance.
- The speed of the microcontroller, for number crunching and formatting.
- The LS20031 GPS receiver can report a location "fix" 5 times a second (datasheet says 10Hz but field experience shows 5Hz is reliable)
- The ADXL335 Accelerometer generates motion data at a rate 50 times per second.
- SD cards have an average latency of 100 ms even though the specs allow for 200 ms. Some old SD cards can handle 150KB/Sec to 200KB/Sec. More than enough for our data logger.
- The ATmega328p runs at a cool 16Mhz.
So the bottleneck for our Bump-O-Meter will be the GPS receiver, at 5 updates per second (5Hz). Let's assume we are driving at 60 Km/h and the GPS is reporting 5 location fixes per second.
- 60 kilometers per hour = 1 Km per minute.
- 1 kilometer per minute = 16.6 meters per second.
- Since the LS20031 GPS receiver provides 5 fixes per second that's a fix every 3.3 meters. Keep in mind this GPS receiver is accurate within 2.5 meters.
The key thing is to record a road bump or pothole even if we don't have its exact location. Because so long as we capture the bump's existence on our logger, we can find it if we go searching for it within +/- 2.5 meters (GPS accuracy) of the location reported by the logger.
For smoother data such as the ones generated by outdoors temperature and humidity sensors, we can make use of fairly simple techniques for guessing in-between data, such as interpolation.
INTERPOLATION OF MISSING DATA
Interpolation is a method of guessing a mid data point within two recorded sensor data points. For examples, if we drive down the highway while logging temperatures, if our geo data logger is capturing temperature readings every 100 meters, it might be possible to interpolate (guess) the in-between temperature every 50 meters. The change in outdoors weather temperature within 100 meters is not typically abrupt but tend to be gradual. So if we log 32 degrees F at 0 meters and 33 degrees F at 100 meters. We can make a reasonable guess that at 50 meters or somewhere in between the temperature can be 32.5 degrees F. This is the simplified version of data interpolation.
Some interpolation might be possible and meaningful between two logged temperature points over a certain distance. Interpolating road conditions, on the other hand, may not be as simple.
Potholes and road bumps don't lend themselves to interpolation. Unlike the gradual change in many environmental conditions, potholes tend to be sudden. Potholes are not typically preceded by increasingly larger potholes. And they are not followed by increasingly smaller pot holes. For detecting pot holes, we have to drive slower to give our geo data logger time to catch those (<15 Km/h). Also, we can slow down when we see an approaching pothole or a road bump to make sure our geo data logger catches it. In real world situations, we tend to slow down anyway as we approach a bump or pothole so that works well for our purposes.
Happy geo data logging.