I was hoping to build something pocket-sized (with an arduino) that would tell me the max speed I reached on a ski run. I was thinking something along the lines of using an altitude sensor to determine when my downhill decent starts and stops, then logging the max speed to a text file on a micro sd card. I was wondering, how would I go about calculating speed? Could I use a 9 DOF? I would like to stay AWAY from GPS.
My first inclination IS gps as this is super easy to do using a gps. A 9dof won't help as this just gives tilt magnitudes of the sensor in X, Y and Z. I highly recommend gps for your solution and using the TinyGPS++ library. It's easy to use, plenty of examples and universal to gps modules. I've used it with 3 or 4 different modules and all worked well. I've also been using Microduino for "pocket" sized projects with excellent results. For this project you would need a Core USB, GPS and SD module. With shipping, this would be about $50. Download the Microduino libraries that is one download for all their libraries. Good example sketches.
Good luck!
If you know the fastest part of the run, and if you can set it up in advance, you could set-up an optical timing gate.
I was thinking something along the lines of using an altitude sensor to determine when my downhill decent starts and stops, then logging the max speed to a text file on a micro sd card.
That would only give you the vertical distance. And, that would give you an average speed, not the maximum.
Could I use a 9 DOF?
Mathematically that makes sense. But, measuring small amounts of acceleration & deceleration is "difficult" so once you're up to speed I'm guessing an accelerometer won't keep-up with the changes, and errors will probably accumulate.
I would like to stay AWAY from GPS.
It may not be precise enough to calculate maximum speed. If your distance is long enough it might be the best way to get your average speed. But, since you're probably not going in a straight line, the distance traveled won't be accurate. (There are expensive ways of using a local "beacon" in a know location to get more-accurate GPS readings. I believe that's how they track race car speed & location for TV coverage.)
I was wondering, how would I go about calculating speed?
Obviously, speed is distance/time and time is "easy" with a computer (or microcontroller) so the trick is finding a way of measuring distance. If you have a way of measuring the distance of the ski run in advance, you don't have to measure it in real-time, but again, that's only good for average speed.
GPS is poor way to measure altitude.
Air pressure is very variable but if you ski fast enough could be the best way.
To turn rate-of-change-of altitude into speed, you need to know how steep the slope is. There was a Suunto watch a few years ago which did this. Basically you had to sight the watch down the slope and an internal inclinometer would record the angle. By having one angle for the slope, there's no way to account for steeper and shallower sections of the run.
A 3-axis accelerometer can be used as an inclinometer.
Why no GPS? With an appropriate GPS engine, you can get quite accurate speeds. "Inappropriate" would be something intended purely as a car GPS that assumes you're travelling on something mostly level. Sparkfun has a good comparison of their GPS's on their site which will help you pick one.
MorganS:
Why no GPS? With an appropriate GPS engine, you can get quite accurate speeds.
GPS is ok for position but not that good for altitude,