Accelerometer Raw Data?

It would be pretty easy for us to add raw x, y, and z values for you.  In fact, I’m willing to do this today.

But since you’re a “Starter” user, this change won’t be made available to you until our next release… unless you buy a “Pro” subscription, because then you could access our daily builds.

Thanks Joshua, that’s a very “can-do” offer and much appreciated.

However, not an immediate issue for me now as I am well into porting my code into a different Lua development package which provides the raw data already. In some ways it is more difficult to use than Corona and not as polished, but it filled the immediate need…

I do think adding the raw data to your accelerometer API is a good idea though, and perhaps this discussion may be of benefit to others.

For example, from what you’ve said, adjusting the frame rate in Corona may change the frequency cutoffs of the accelerometer filtering, perhaps resulting in (apparently inexplicable until you understand the filtering) changes in accelerometer behaviour (e.g. response time, lag, jitter etc.).  With a user provides the filtering themselves, a change in frame rate could be compensated by different filter values to provide a similar response from the accelerometers.

Best regards,

Doug

Happy to help Doug.

Just to be clear, the frame rate only affects when the accelerometer events get delivered in Corona.  We still receive the accelerometer reading on-time according to the interval that you set.  For example, on Android, we obtain these readings on a separate thread and then queue them to be delivered on the Corona runtime thread on the next render pass.  So, if you set the measurement interval to 100 Hz (ie: 100 readings per second), your Lua listener will then receive multiple accelerometer events per render pass which you can differentiate using the event’s timestamp.

And we’re about finished with adding raw value support today.  It was easy enough to do.  We’re just putting some extra time in updating the accelerometer API documentation, because it is clearly lacking details.