Active Topics

 


Reply
Thread Tools
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#51
Originally Posted by ossipena View Post
are you able to open recorded logs?
I get that too, using the Finnish locale on my N900.

Rename the log file so that the non-ascii character (likely in month name) is removed.
__________________
Trout have underwater weapons.
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#52
Originally Posted by juise- View Post
Check out you haven't changed the hostname on you N900. The app seems to use hostname to determine whether it is running on real hardware or not, and generates random data if it thinks it's not on the N900.
a) host name is "Nokia-N900-42-11"

b)I have power kernel, so uname -a reports

Linux Nokia-N900-42-11 2.6.28.10power37 #1 PREEMPT Wed May 26 00:24:03 EEST 2010 armv7l unknown

How do you get the host name?

Also, attached is the graph of the phone sitting quietly on a firm surface.
Attached Images
 
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#53
Originally Posted by juise- View Post
Check out you haven't changed the hostname on you N900. The app seems to use hostname to determine whether it is running on real hardware or not, and generates random data if it thinks it's not on the N900.
Ahh, thank you - that would explain my data too.
 
caco3's Avatar
Posts: 560 | Thanked: 423 times | Joined on May 2010 @ Switzerland
#54
Hi all

Again a new version (1.0.17)
Thanks for all the feedback. Some I already implemented.

Change Log:
- Changed format for Log File.
- Improved UI.
- Added test Mode.
- Made algorithm better and improved speed.

Some notes:
The algorith for recording is still the same, so the old log files are still compatible! I only changed the algorith to generate the graph a bit. Now it should look more the same, independent on the zoom level.
Ther eis now a Test Mode. It samples 100 faster than normal (or limited by the CPU). This should help debugging.

And some developer questions:
- Does sombody know how to add icons to buttons?
I tried it with "self.ui.bZoomIn.setPixmap(QtGui.QPixmap(app_path+ "/zoom-in.png"))", but it did not work.
- Also does sombody know how I can redraw just parts of the graph? This might speed it up as well.
- I would like to scroll the graph with moving the graph around with your fingers (like in the browser). Does sombody know how to do that?
I am using Python with PyMaemo

Thank you for your interest
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#55
Hi. I still get random data. With the new test mode, it's easier to see

Why can't you use a file in /home to determin test rig, instead of the oddball host thing? touch ~/.testrig
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#56
Originally Posted by windows7 View Post
on one note, for health & safety reasons I would highly recommend you turn wifi off, turn bluetooth off & set the phone mode to tablet mode...

Even then, I think having eletrical power next to your body might not be very healthy,
While the radio thing is under constant scrutiny for obvious reasons, the 'pure' electrical part is actually known to be nonsense. It usually stems from a few layman presumptions.

1. high tech means high powered.
2. The brain with it's neurons is easily affected by electrical devices
3. Most of the electrical power consumed by a device is radiated into the body

All of these are bogus. Remember, we're talking low voltage DC, no radio, no AC. Do you think wristwatches are dangerous ? For they are in direct contact with your body, often through a metal backplate. What about pacemakers ? Sure, all ungrounded electrical devices generate a certain electrical and magnetic field, but they are super-tiny (as in - the Earth's magnetic field affects you more than that). Hell, most people have ELECTRICAL ALARM CLOCKS (historically, there were AC powered and/or made with discrete components for DECADES) by their beds. That's orders of magnitude more effect (whatever it is) on the human body than your flight mode N900. Not to mention things like magnetically operated headsets in/on your head, neon lights, power lines., etc. It's like saying you should keep quiet in a storm, as, you know, speaking introduces additional air pressure so it only makes things worse.

PS. Yes, I'm an EE
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following 3 Users Say Thank You to attila77 For This Useful Post:
caco3's Avatar
Posts: 560 | Thanked: 423 times | Joined on May 2010 @ Switzerland
#57
Hi all

The version from yesterday had some bugs. They are now fixed in 1.0.19.

Changes:
- Bugsfixes
- Now it detects if you have a sensor device file (/sys/class/i2c-adapter/i2c-3/3-001d/coord9 to decide if it should run in demo mode.
- Uses a user name instead of part of the IMEI number to define who the records below to.


The algorithm:
Maybe you want to play with some of the parameters to see if it improves the data.
(As I am living on a moving ship, it is very hard to test)
The parameters can be changed in the file /home/user/.SleepAnalyser/SleepAnalyser.conf
Below the algorithm is described. names in "" are the parameters found in above file.
Make sure the application is closed before you change the parameters!

Every second ("sampling") it takes 10 ("sample_smoothing") samples.
They get added to each other (X and Y accelerations are keept separately).
Then it adds up 10 ("value_smoothing") of them up and saves it in an array.
Now thats the values which get written into the log file.

For the graph, I take the derivation of the data. This gives the CHANGE of the ACCELERATIONS (alias MOVEMENTS).
To do that I substract the value X5 minus X0, X6 minus X1 and so on, same for the Y values.
How big the difference between the idices for the derivation is, is controlled with "derivation" (here 5).
For the graph, the derivation values can be streched with "yscale".
If the values are too high, you might want to lower this value.

Now please keep in mind that the algorithm is not yet perfect. Please play with the parameters and let us know how it is the best for you.
Or maybe you know even a better algorithm?

Some questions for developers:
The builder script for py2deb (build_myapp.py) sais that the package name has to be lower case.
So how do I manage to get a upper case name in the package manager list?
(SleepAnalyser instead of sleepanalyser)
Also, how do I get an icon into the package manager list?

Last edited by caco3; 2010-07-03 at 00:37.
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#58
What I think to be bugs

* When deleting a record and (assumingly) no other record exists, the record says loaded. IMO, it should empty the data storage and null the graph, as well as blanking loaded file name.

* Modifying trigger increases the number, but does not move the line. To redraw, one needs to do to next record or zoom.

* At first app start, if I select to view log but cancel the loading dialog (which happens at least when there are no records), filename is "*.csv". I didn't want to press delete on that.

* When recording, elapsed time shows 00:00:00, followed by 02:00:01, 02:00:02. You might be using a time function that doesn't correctly adjust for timezone, as this is GMT+2.

What I think to be enhancements:

* When recording, a timeout would be nice. Start at -15 seconds or so, allowing one to lock the phone and set it down.

* When recording and the stop button is pressed, state says Records taken: <number> (stopped). In this case, the stop button should become a start button. The start button can either be a resume (pause) or a start over (stop)

Well, you know, in case you are bored
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
caco3's Avatar
Posts: 560 | Thanked: 423 times | Joined on May 2010 @ Switzerland
#59
Thank you for your feedback.

I just made a new version (1.0.20) which corrected some of the bugs you found + some othe rimprovements:
- improved graph
- change of trigger now redraws graph
- log window only gets shown if a file is selected
- added some icons (more will come)

The other bugs/ideas I might fix/include later on.

Please see attached screen shots.
I changed the Xscale to 1 (instead 3).
This makes the real movements in the graph much more clear.
I suggest you to do it as well. Either by editing the config file (see above post) or by deleting it.
The first graph shows my sleep. At 7:40 I got up, but let the SleepAnalyser run for another hour.
Then in the 2nd graph I let it run for several hours on a table.
I am quit happy about the result, as it shows that it now should work properly and only detect real movements.
Attached Images
  
 

The Following User Says Thank You to caco3 For This Useful Post:
Posts: 422 | Thanked: 244 times | Joined on Feb 2008
#60
Originally Posted by ndi View Post
What I think to be bugs
* When recording, elapsed time shows 00:00:00, followed by 02:00:01, 02:00:02. You might be using a time function that doesn't correctly adjust for timezone, as this is GMT+2.
Yeah I get this too - I am in GMT+10 and my elapsed time starts at 10:00:00

(I haven't updated to latest so ignore if this is covered).
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:13.