Home > Announcements > DevHelper is now available for free in the Marketplace

DevHelper is now available for free in the Marketplace

Whether you’re a developer looking to make the next great
app or just an enthusiast looking to play with your phones internal devices,
DevHelper can help. Internally your phone has many devices that are essential
to enabling great apps and games. The most important of which are the Touch
Input Panel, the Accelerometer and the GPS. These devices provide natural user
input from the user to your applications and DevHelper allows you to see the
real-time raw data streams from these devices. It makes for a great utility app
when developing apps and saves you having to write a bunch of debug code into
your app.

More about the Accelerometer

DevHelper Screenshot

The accelerometer provides X, Y and Z feedback on the
position of the phone within earth’s gravitation field so you can detect
rotational movement within that field. For a great article on the specific
details behind this see this Windows
blog post
. DevHelper shows you the real time values from the accelerometer
in a graph on your phone, as well as the ability to apply various smoothing
algorithms to that data.

DevHelper comes with 4 different algorithms for smoothing
the raw accelerometer data. Each algorithm has its specific strengths and
weaknesses, so play around with each and determine which is best for your application.

Simple Average

This smoothing algorithm does just what the name implies. It
takes the last N samples and averages them together. The more samples you use
the smoother the curve gets but you pay a price in latency. Typically just
keeping the last 2 or 3 samples is enough for most applications

Simple Low Pass

algorithm uses a simple low pass filter to smooth out the data. The algorithm
for this filter is:

On = On-1 + C(R – On-1) where:

R = Raw value sampled from the accelerometer

C = Coefficient used to control the filter

On-1 = The last calculated sample value

On = The current calculated sample value


values of C produce smoother curves, but introduces latency and tends to
prevent large jumps from quick movements. Larger values of C will bring the
output closer and closer to the input and from the equation you can see that
C=1 would pass the input through unchanged.


Low/High Control

One of the
drawbacks of the low pass filter is that in order to get a smooth curve for the
small changes you have to give up the large changes and visa-versa. The
Low/High control attempts to fix this by essentially allowing you to specify two
Coefficient values and a break point to determine when to each one. This way
you can smooth the parts of the curve that have relatively small changes in a
nice, low-latency fashion and then deal with the large changes in a different
manner. Setting the second coefficient to a really small number, like 0.05,
will essentially clamp the high frequencies and give you a true low pass
filter. Setting it to a higher number, like 0.75, will allow you to pass
through the high frequencies virtual unchanged while still smoothing the lower
frequencies nicely.



This filter
simply quantizes the input into discrete buckets. This allows you application
to avoid a lot of the ‘chatter’ from the input and deal with specific levels of
responsiveness. The quantization method built into DevHelper uses a sticky algorithm,
meaning that rather than switching buckets purely by rounding to the closest
bucket, there is a tendency to want to stay in one bucket until the values have
trended 75% of the way to a new bucket (as opposed to 50% which true rounding
give you). This cuts down on the random bucket oscillations you’ll get when the
value starts to float mid-way between two buckets.

Categories: Announcements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: