Thom Nichols

Thom

Technology is evolution outside the gene pool

Articles tagged with 'Java'

Smoothing Sensor Data, Part 2

After a query from an older blog entry, I figured I should properly follow-up since there were a couple questions about how to use the low-pass filter I described to smooth sensor data from Android.

So the question was "shouldn't the algorithm be output[i] = output[i-1] + ALPHA * (input[i] - output[i]);"  Well, the answer is no, here's why:

So the wikipedia entry I referenced uses ...

Using Smack XMPP with JAXB

So it I've looked a few times in the past, trying to find a decent way to use JAXB with the Smack XMPP library for Java.  More to the point, I wanted to write a Smack provider to parse a custom IQ message, but use JAXB to unmarshal the IQ body.  Should be doable. 

Nobody on the Smack forums had seemed to figure out a way to ...

Smoothing Sensor Data with a Low-Pass Filter

If you search StackOverflow, there are a number of posts about Android sensor data being very jittery, and suggestions on implementing a smoothing algorithm.  Well not many people have actually posted a smoothing algorithm, and those that I have seen tend to be fairly complex.  

After some searching, I came to the Wikipedia entry for Low Pass Filter.  There's a pseudocode algorithm that I adapted for Java ...

The Suckless JSP Tag Library

So I implemented the Python Web Console in plain Java and JSP on AppEngine.  Maybe this wasn't a great idea, but given the limited scope of the application, I was hard-pressed to complicate it with Spring or an alternative markup language.  Plain JSP and servlets seemed 'good enough' in this case.

I couldn't, however, ignore that there are a couple glaring problems with JSP, probably the ...

Introducing the Python Web Console

I'd like to show off my latest project - the Python Web Console!

It's inspired by sites like the Groovy Web Console and TryPython.  Since I teach a Python programming class, I wanted to create an application for my students to experiment and share scripts they write. 

Ironically, the site is written using Java (not Python) for Google AppEngine.  The reason for this is, I've been ...