How are mouse movement statistics calcalutated?

Thorsten Kampe <[email protected]>
Newsgroups gmane.comp.misc.workrave.user
Message-ID <[email protected]>
Hi,

I'm writing a script to generate diagrams from the statistics that 
Workrave keeps. How are the mouse movement statistics calculated?

For instance, yesterday I had TOTAL_MOUSE_MOVEMENT: 1346876 (pixels) and 
TOTAL_CLICK_MOVEMENT: 681931 (pixels).

The statistics window shows Mouse movement: 355.66m and Effective mouse 
movement: 180.07m.

My screen resolution is 1280 x 800. 

I found this snippet in the source code (not really sure if this is 
actually applies):

double mm = (double) pixels * gdk_screen_width_mm() / gdk_screen_widt();
sprintf(buf, "%.02f m", mm/1000);

But still I don't know how to get from 1346876 pixels to 355.66 meters.

Thorsten


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.