Search Results

Search found 1 results on 1 pages for 'aschlaep'.

Page 1/1 | 1 

  • Storing acceleration values in Objective-C/Cocoa?

    - by ASchlaep
    Hi all, I'm writing for the iPhone and I'm trying to measure the time between maximum accelerations. Imagine you've attached your iPhone to an oscillating spring. What I want to do is measure the frequency of the oscillation. The way I am going about doing this is storing a certain number acceleration values (updated 20 times per second) in an NSMutableArray and comparing the current acceleration value with previous acceleration values. How do I add each updated acceleration value to the NSMutableArray and at the same time delete values from the back of the array as I don't need them any more? Thanks in advance!

    Read the article

1