I've got what I think will be an easy app. It does involve the accelerometer, but it's based upon some apple sample code below.
http://developer.apple.com/iphone/library/samplecode/AccelerometerGraph/index.html
This code is showing movement along the xyz axis and graphing it. I want to add 3 changes
1) I want to measure seismic movement combining the input from the axis into one datapoint. Like this app "Seismometer" does Which is the absolute movement (which is a function of x,y &z together) not just along a a single axis. The x,y, z data is collected and passed through the "High-Pass Filter" then combined(Don't worry it's a formula with the xyz values inserted. Then just graph the output as seen in the http://coneri.se/iphone/
2) I want to utilize the same controls as in the apple code, but hide them as a menu item. I also want to add a fixed amount of time for sampling, 10 sec. The user would hit the "start" button on the screen, it will count down 3 sec, and it would begin capturing and graphing data. Then record for 10 sec then sound a bell
3) I would also like to then apply a filter to the data for interpretation. See "spectrum" summary screen similar to this app
http://iphone.objectgraph.com/iseismometer/ This blog entry discusses it
http://blog.objectgraph.com/index.php/2009/03/01/how-to-use-iseismometer-part2-play-with-spectrum/
I will provide the algorithms/formulas, but you will need to plot them on a graph.
I think steps 1 & 2 are very simple and straight forward. Step 3 may also be fairly easy also,
Assumptions:
-10 seconds of data at sampling rate of 100 per sec_= 1000 data points for each axis for a total of 3,000 data points
- raw data will be ran through a High-Pass filter to remove gravity ÂnoiseÂ
- Then formulas are applied and output graphed.
接包方 | 国家/地区 | |
---|---|---|
3
Richard_liang
(中标)
|
||
2
E_xlu
|