PDA

View Full Version : [APP]Waterlevel 0.2 (Another waterlevel application!)


Wiebbe
26th July 2008, 01:34 AM
Well, there are already a couple of applications out there already, but i was playing with the SDK and just trying some stuff out in visual studio so i thought, why dont i just release it?

Its a first release, it does work, has some basic calibration and im trying to make a bit more visually appealing that just some bars ;)

So,

version 0.2:

- Updated graphics of the "Circle" compass/meter. Now actually looks like a compass thingy :P
- Added the ability to actually save the calibration data, and to let you know its doing something and its done.
- Created an CAB Installer to install the addon.
- Made all pictures internal resources.


version 0.1:

shows an Water level for the X and Y Axis, an circle "meter" and an light meter. There arent any big bugs that i know off, but i didnt implement the "maximal" meter bars yet. That means the measure bars can go a bit beyond the container :P

Requirements:

You do need the Compact framework 2.0, it will (unfortunatly) not work without it! But seeing as everyone already has the lightsaber application i guess its not that much of an issue ;)

Other:

If anyone has some suggestions or comments (bad or good..) just let me know..

Source:

I added the source code if anyone is interested. Its not some good code, and the calibration could be alot more detailed, but perhaps it helps someone :P


Oh, and if anyone reflects the application and starts to rant about how my code sucks, i didnt optimize it or plan ahead, i just started to code some :P

KukurikU
26th July 2008, 09:06 AM
1. congrats and keep the good work! it is refreshing to see a newbie that brings something to the forum and don't start with a wining post.
2. i really hope you'll receive only positive feed back (not so common here;) ) and allow me to be the first one to say: no, i don't think yr code sucks:D
3. is the calibration function working?
4. can you explain what "lumens" are doing here. lumens is an international measure unit for light. are u trying to use the internal light sensor to measure the light? this could be a good idea and i'll be very interested.

hallatore
26th July 2008, 09:13 AM
Lumens is the light sensor =)

Radeon123
26th July 2008, 10:11 AM
Awesome app, calibration works perfectly and saves the setting ok and that light sensor is a nice addon.

Would love to see this made into a .cab installation and perhaps make this app work with the AppToDate program for easy updates.

Look forward to future updates :)

This is going in my favourite apps :D

Radeon123
26th July 2008, 10:16 AM
Ignore my double post :o

KukurikU
26th July 2008, 10:25 AM
awesome it is! great app.
explain please what is with light measuring pls....only measuring or calibrating the automatic light level also?
thanks!!!:)

Wiebbe
26th July 2008, 10:29 AM
No, it measures the amount of light the light sensor receives. I will eventually add an cab installer, but seeing as its still in the "works" i am not bothering with it yet :P

The calibration works, its not as awesome as the BubbleLevel one yet. When you press the button let the diamond lay there for 3 seconds, and then it calibrates. I wont update the backlight.


The light sensor only shows the value, it doesnt update the backlight it self. I tried doing that, but i can only turn the backlight on very bright, very dim and off. Not somewhere in between :(

dutch64
26th July 2008, 10:43 AM
Nice app! I like the light sensor also, i finally found out where the light sensor really is:)

It calibrates fine but does it actually saves it somewhere? the moment i close the app and start Teeter, still not calibrated.

So far non of the apps around here were able (for me) to save the calibration. Some people mentioned success though and since I have tried by now all available roms and on none the calibration works, i get this idea that there are several versions of the sensor (hardware) around...

Anyhow, good to see a new app like this and success with it!:)

Wiebbe
26th July 2008, 11:24 AM
No, the calibration it not saved yet, i will add that soon. The problem with the calibration data is that its reset on reboot. The only tool that i know of comes from a different telephone (Raphael or something) and does save the calibration. But not all roms work with this.

So the calibration from almost all applications will only work on the application itself :(

Kisja
26th July 2008, 11:57 AM
Wow, thats the best waterlevel prog here around! Nice graphics, but still very simple. And the lights measurment is very nice too!

Very good work! Thanks!

KukurikU
26th July 2008, 01:58 PM
icon maybe?

Wiebbe
26th July 2008, 02:04 PM
I updated te first post with version 0.2. I added some more graphics (lightmeter still had to be done :P) an saving of the calibration data for this app only.

@ KukurikU:

Well, i created a simple icon. I tend to like simple stuff that easily identifies a software app..

KukurikU
26th July 2008, 02:23 PM
i put my diamond on a real level meter, bring the level meter to 0,0,0 and pressed "calibrate" and now i can use my diamond as a level meter.:)....until next reset..

uniqueboy
26th July 2008, 02:54 PM
Thanks Wiebbe, nice little app. Will be very useful with my missile launcher!

uniqueboy
26th July 2008, 04:29 PM
Accuracy is a little off, well a lot off, on vertical measurements, try to get it to read 90 degrees, could this be an issue with the G sensor itself?

KukurikU
26th July 2008, 04:39 PM
Accuracy is a little off, well a lot off, on vertical measurements, try to get it to read 90 degrees, could this be an issue with the G sensor itself?
hard to tell who is to blame. look at the experiment/calibrate method described in my previous post.
i found my diamond to be "off" by 1.4-2 degrees (am i lucky or what?!) and after calibration 0,0 it stayed this way after playing with it quite a bit.
edit: sorry, my bad, now i get it...you r right, on vertical about 7 degrees off... getting 97-96 degrees.

Wiebbe
26th July 2008, 05:09 PM
Well, its not that the accuracy is really off. The SDK returns a certain value and its kinda hard to precisely convert it :)

Ill see what i can do, working on a different way to calculate the angle now.

edit:

Its odd, when i place the diamond vertically against a flat surface (whick should be 90 degrees) the build in Angle says 98 (from the raw data) my calculated one says 92. so its hard to decide which one is correct :P

After some more testing, it seems that all other applications have the same "error". Bubblelevel says 97 degrees as well when i place it against an 90 degree angle object. Same goes for SpiritLevel. I made a new way to calculate it which seems to be more "accurate" with the angles. But it still wont be 100%! Well, the number of degrees isnt 100% accurate, the bar it self ofcourse does work properly!

uniqueboy
26th July 2008, 05:35 PM
Does the output from the G sensor give X,Y,Z or just X,Y ? That coul be a problem when measuring the vertical. If it's just X,Y then maybe when tipped past a certain threshold an error message should be given, or even an audible warning.

Wiebbe
26th July 2008, 05:48 PM
The SDK in rawdata form gives back the following:

Angle for X
Angle for Y

Tilt value for Y
Tilt value for X
Tilt value for Z

The angle values are really in degrees, the same as SpiritLevel. They output around the same values as i output.

The tilt values are something from 0 till 1000+, you can see these in BubbleLevel as well at the calibration. I used the angles before, but these arent very correct.

Ill see if i can get myself a watermeter and an setting where i create an real 90 degrees setting so i can calculate a bit what the real values should be :P

It could be my house is like 97 degrees sloping, but i doubt that ^^

dont forget that an angle of 97 is possible if you tilt it above the 90 degrees value..

uniqueboy
26th July 2008, 06:01 PM
I too live on a hill.

j0bro
26th July 2008, 06:02 PM
Hi Wiebbe, I see you got inspiration for your app somewhere :)

Some thoughts:
Your app runs nicely, except I see the X and Y 'bubbles' move in the wrong direction, as bubbles should seek the highest point in their tubes.
Along with that, the angle readings are incorrect. When I hold my device at about 45 degrees, the reading is a little short of 70 degrees. Something to look at?
The calibration seems to compensate for the angle of the surface that I calibrate on. Do you think that this can be called calibration? It merely sets the readings to zero for the particular surface, but does not take the sensor's bias to gravity into account.
Anyway, keep it up!

Wiebbe
26th July 2008, 07:08 PM
Hi Wiebbe, I see you got inspiration for your app somewhere :)

Some thoughts:
Your app runs nicely, except I see the X and Y 'bubbles' move in the wrong direction, as bubbles should seek the highest point in their tubes.
Along with that, the angle readings are incorrect. When I hold my device at about 45 degrees, the reading is a little short of 70 degrees. Something to look at?
The calibration seems to compensate for the angle of the surface that I calibrate on. Do you think that this can be called calibration? It merely sets the readings to zero for the particular surface, but does not take the sensor's bias to gravity into account.
Anyway, keep it up!

Actually it doesnt do that for calibration. It takes into account the gravitation as well. This is because the sensor SDK already recalculates the data to take the gravity in mind as well. Because of this i can create a zero reading for the values :)

The degrees is an odd one, because the sensor itself is returning odd stuff, but like i wrote, your app does about the same on my diamond :P

j0bro
26th July 2008, 08:11 PM
Actually it doesnt do that for calibration. It takes into account the gravitation as well. This is because the sensor SDK already recalculates the data to take the gravity in mind as well. Because of this i can create a zero reading for the values :)
I beg to differ; the SDK really doesn't return any calibrated data. That's up to the developer. The sensors on two devices can return different values due to manufacturing tolerances/noise/etc. (read this on Kionix' website).

What I see, is that your calibration function takes a snapshot of the angles and compensates the readings for these angles. But now you still don't know the absolute direction of gravity, only angles relative to the surface you calibrated against. Anyway, Kionix has good documentation on this matter.


The degrees is an odd one, because the sensor itself is returning odd stuff, but like i wrote, your app does about the same on my diamond :P
Err, no.
I admit that my readings towards 90 degrees go slightly south but this is due to the (my?) sensor giving unequal Z-vectors (~0.8g negative and ~1.2g positive). But for example, when I measure my knive-block in the kitchen (a wooden object angled at 45 degrees) with BubbleLevel, it reads close to 45 degrees. With Waterlevel the Y-angle is about 70 degrees (?).

KukurikU
26th July 2008, 08:17 PM
I beg to differ; the SDK really doesn't return any calibrated data. That's up to the developer. The sensors on two devices can return different values due to manufacturing tolerances/noise/etc. (read this on Kionix' website).

What I see, is that your calibration function takes a snapshot of the angles and compensates the readings for these angles. But now you still don't know the absolute direction of gravity, only angles relative to the surface you calibrated against. Anyway, Kionix has good documentation on this matter.


Err, no.
I admit that my readings towards 90 degrees go slightly south but this is due to the (my?) sensor giving unequal Z-vectors (~0.8g negative and ~1.2g positive). But for example, when I measure my knive-block in the kitchen (a wooden object angled at 45 degrees) with BubbleLevel, it reads close to 45 degrees. With Waterlevel the Y-angle is about 70 degrees (?).

i got dizzy, i am lost...here goes my degree in engineering!:p
maybe joining yr (impressive) knowledge will be more beneficial??

j0bro
26th July 2008, 08:32 PM
i got dizzy, i am lost...here goes my degree in engineering!:p
maybe joining yr (impressive) knowledge will be more beneficial??
Heh well it's not really rocket science, is it :D The technical documentation of the sensor's manufacturer, Kionix, is quite elaborate and helps a lot.

I'll be releasing a new update of BubbleLevel shortly in which angular measuring should be spot on, no matter how skewed the sensor is. I even found my geometry triangle from school so I can check things..!

KukurikU
26th July 2008, 08:35 PM
I even found my geometry triangle from school so I can check things..!
finally, something i can understand and relate to!

Wiebbe
26th July 2008, 08:36 PM
Heh well it's not really rocket science, is it :D The technical documentation of the sensor's manufacturer, Kionix, is quite elaborate and helps a lot.

I'll be releasing a new update of BubbleLevel shortly in which angular measuring should be spot on, no matter how skewed the sensor is. I even found my geometry triangle from school so I can check things..!


See thats what i need ^^
i just downloaded the sheet from kionix's site to read through. I dont think i actually will make it more sensitive or calibrated, i tend to create stuff in 1 or 2 days and then move on.

I included the source code in the first post if anyone is interested.

KukurikU
26th July 2008, 08:43 PM
.....i tend to create stuff in 1 or 2 days and then move on.
c'mon! please finish it! maybe a "donate" link will keep your interested longer....;)

Wiebbe
28th July 2008, 09:04 AM
heh, donations are all good of course, but i still need the drive ^^

luckily after reading through the Koinix documentation, i got excited and I'm now working on the advanced calibration using an wizard. It will take 7 steps to fully calibrate it, but afterwards it should be calibrated very precise.

KukurikU
28th July 2008, 09:13 AM
heh, donations are all good of course, but i still need the drive ^^

luckily after reading through the Koinix documentation, i got excited and I'm now working on the advanced calibration using an wizard. It will take 7 steps to fully calibrate it, but afterwards it should be calibrated very precise.

good luck! i am waiting....:)

mcvpjd3
28th July 2008, 12:40 PM
heh, donations are all good of course, but i still need the drive ^^

luckily after reading through the Koinix documentation, i got excited and I'm now working on the advanced calibration using an wizard. It will take 7 steps to fully calibrate it, but afterwards it should be calibrated very precise.

And while you are at it, can we have the bubbles going the right way.

Thanks

And well done for a very good app :-)

Wiebbe
28th July 2008, 02:14 PM
I sure will do :)

Magic_Knight
28th July 2008, 02:55 PM
A good and usefull application !
It only has a small glitch... sometimes WM upper menu-bar remains visible hiding part of the waterlevel screen. It happens randomly (don't know why).

mdalacu
28th July 2008, 03:37 PM
i think the "buble" moves in the opposite direction ...:-)

kimusan
28th July 2008, 03:59 PM
i think the "buble" moves in the opposite direction ...:-)

Agree. the bubbles are floating upwards not falling down.

rvdgeer
29th July 2008, 02:38 PM
Agree. the bubbles are floating upwards not falling down.
Yep, they should!
But they don't... :confused::)

Wiebbe
30th July 2008, 02:35 PM
Well, im almost done with the new version. Just need to tweak the calibration and how i calculate the angle that is used.

Magic_Knight
30th July 2008, 02:51 PM
Have you been able tu track and fix the full-screen problem I mentioned above ?

Wiebbe
30th July 2008, 03:28 PM
No, unfortunatly not. I have not had the problem once. In order to be able to fix the error i need to be able to reproduce it, and i cant seem to do that.

It also seems you are the only one with the error so far :P

got any software running in the background? (ie gSens, other stuff?)

Magic_Knight
30th July 2008, 03:31 PM
I have gSens but it does not seem to interfere with waterlevel at all. No other apps in background. Moreover I'm not using TF3D (I have disabled it from Today screen). Maybe this could help.

PJ6363
30th July 2008, 03:37 PM
Well, im almost done with the new version. Just need to tweak the calibration and how i calculate the angle that is used.

Keep up this great work.....perhaps you might inspire HTC to actually utilise the Diamond sensors for its future applications! Shame we have to rely on dedicated developers donating time and effort (same for GSens utility....:)) to get the best out of our devices!!

Magic_Knight
30th July 2008, 03:41 PM
HTC knows about this forum and all the people developing software and cooked roms here.

That's why it saves employees (and money) in developing applications by itself.

Azert999
4th August 2008, 04:34 PM
Concerning the light measure : are you sure it measures "LUMEN" ? Shouldn't it be expressed in "LUX" which are Lumen/m2 ?

Congratulation for the soft ! Very usefull !

napadalia
7th August 2008, 08:24 PM
how do i install this on my HTC please guide i am total noob

nightwolf21
10th August 2008, 06:57 AM
^what exactly is the use of all the g-sensor apps?kinds noob in that area me too:/

nightwolf21
10th August 2008, 06:59 AM
oops...double post...

Towserspvm2000
10th August 2008, 09:48 AM
Very nice bit of software - well done. It's a keeper for me!

htckaiseruser
10th August 2008, 11:14 AM
how do i install this on my HTC please guide i am total noob

Download the zipfile thats in the firstpost, open the zipfile and put the .CAB file on your desktop, now copy that .cab file to your internal storage. then go in your phone to file explorer and find the .cab file , click on it and it will install,follow directions on your screen. thats it. good luck

htckaiseruser
10th August 2008, 11:22 AM
^what exactly is the use of all the g-sensor apps?kinds noob in that area me too:/

The use is actually only for fun, because htc didnt put any programs in the diamond that uses these sensors(exept teeter game ofcourse) people are getting creative and are making their own programs thats using these sensors. so they are arent really usefull programs but its more for the development of the better things to come. But if u like in the thread for "Gsensor apps" you will see that there are some pretty cool little applications developed! So thumbs up to everybody thats programing all these nice apps:cool:

nightwolf21
10th August 2008, 09:55 PM
^cool cool...i hope we get to c more and better g-sensor apps in the future...keep it up guyz!

JayZee2
10th August 2008, 10:58 PM
does anybody have the same problem like me? I put my TD on a flat table, run teeter, ball goes right and down. Then I use waterlevel to calibrate but it does not seem to have any effect on teeter. Even if I use extreme positions for calibration using waterlevel, it has no effect on teeter. Ball goes allways the same way to the right and down.
Thanks
JayZee2

NikPraskaton
12th August 2008, 02:03 AM
does anybody have the same problem like me? I put my TD on a flat table, run teeter, ball goes right and down. Then I use waterlevel to calibrate but it does not seem to have any effect on teeter. Even if I use extreme positions for calibration using waterlevel, it has no effect on teeter. Ball goes allways the same way to the right and down.
Thanks
JayZee2

I suppose the calibration is ment only for use with Waterlevel app.. doesnt work on other applications..

nljuggler
25th August 2008, 04:27 PM
The use is actually only for fun, because htc didnt put any programs in the diamond that uses these sensors(exept teeter game ofcourse) people are getting creative and are making their own programs thats using these sensors. so they are arent really usefull programs but its more for the development of the better things to come. But if u like in the thread for "Gsensor apps" you will see that there are some pretty cool little applications developed! So thumbs up to everybody thats programing all these nice apps:cool:
I disagree. HTC but in more than just Teeter.

What about the automatic screen orientation?
What about the flip-to-mute function?

da_jojo
1st September 2008, 03:53 PM
nice app :)

i would like to see the newer version with the levels going the right way.. ie opposite of the direction that they are going now.
and the lumen can be calculated from the output which is given in Lux.

so in short if you would be able to let the level "bubble" go up instead of down and right instead of left it would be the best..
and change lumen to Lux (lumen/mē) .

the light sensor is located next to the speaker on top of the front of the touch pro device.. probably same with diamond...

works on touch pro :)

guessi
10th September 2008, 04:39 AM
many thanks for this application!

I'm not sure if already asked for, but I'd really like waterlevel to switch the dim / standby times. Mine are set to dim after 10sec and standby after 30sec. So when measuring something there is only 10sec until the display goes dark.

maybe an option?

thanks again!

adis1987
15th September 2008, 07:55 PM
Wounderfull app! Something to think about to next release:

Smoother movement of the "bubble".

Maby let the theme of the app go with the default theme of diamond?

Wingo666
25th September 2008, 04:51 AM
May i ask what is actually the purpose of calibration?
Will it change the original setting in my diamond?
And i see that after each calibration, even i put my diamond on the same surface, the degrees show differently (more and more deviation than before..)
what happens?

And at last now, i need to hold my diamond about 45 degree from the horizontal to get the 0, 0 degree........

Wingo666
25th September 2008, 05:14 AM
does anybody have the same problem like me? I put my TD on a flat table, run teeter, ball goes right and down. Then I use waterlevel to calibrate but it does not seem to have any effect on teeter. Even if I use extreme positions for calibration using waterlevel, it has no effect on teeter. Ball goes allways the same way to the right and down.
Thanks
JayZee2as far as i understand the teeter, the interface of each level is not perfectly flat... and you can see from the shadow

giovag7
30th September 2008, 10:38 PM
Hi Wiebbe good work! But what happens, where are you? It's all ok?
Do you continue the development of this intersting app.?

del4
29th October 2008, 12:24 AM
Any chance the latest version of the app will be released anytime soon? Looking forward to the bug fixes and other enhancements that were discussed since v0.2...

Thymos
10th November 2008, 08:34 PM
Thanks for the nice work, really nice app!

One question: is it normal that the sensor is that ... kind of nervous? Flat on the table, I'd expect the sensor not to move. Please see my little video here on youtube (http://de.youtube.com/watch?v=Om6mND2yra8) (can be used for program desc)

aak@
14th November 2008, 02:27 PM
Very nice app....Thanks...Keep going

lennysh
29th November 2008, 01:38 PM
Not sure if this has been mentioned, but aren't the bubbles supposed to go the other direction? Seems to me on a level, if you tilt the right side down, the bubble would go left. Not right. Just a suggestion!

giannis03
6th January 2009, 08:47 PM
Thanks very good work!!!

pklein90
21st January 2009, 07:41 PM
waterlevel 0.2 crashs at start.

Error line 1, position 1

invalid character in the given encoding

Touch HD ROM L26_THDV6_GER

Did anybody know why its crashed ?

thanks

D3TH METAL
11th February 2009, 06:56 AM
thanks sooo much!!! I could really use this when installing Grocery Scanner/Scales.

wickwick
25th April 2009, 12:48 AM
Is there anyway to change the screen size for this app? i tried it on my HTC 2009 Shadow 2 and the program runs fine but i can only see the upper left of the level. this seems like it would be a great app. Thanks in advance

Damionr
29th April 2009, 02:19 PM
this is awesome the best water level yet.
One question, the zip file contain and inf file, I have done nothing with it, still the app runs perfectly.

also, this I suppose is just something that may not be worth noting but, the spirit bars, which didn't take ME long to work out, actually work oppositely has to how an actual spirit level works. i.e. the bubble would rise against the slope as opposed to falling with it. I suppose this water level make complete sense in theory, just not what we are used to seeing it in action.

job well done

HTC11111111111
25th June 2009, 01:24 PM
Hi all,

i have my Touch Diamond 2 a few days and i have a questions to the audience.
Does the Waterlevel 0.2 works with the Touch Diamond 2 (Topaz)?

hdaackda
23rd August 2009, 03:03 AM
Hi all,

i have my Touch Diamond 2 a few days and i have a questions to the audience.
Does the Waterlevel 0.2 works with the Touch Diamond 2 (Topaz)?

Why dont you try it?

I am a newbe too, but I try before I ask... Would hardly take a couple of minuted!!

lopez1_de
8th September 2009, 10:26 AM
Thank you. Great app. Works fine on Touch HD.

damnhard19
8th September 2009, 08:04 PM
hi,
i tried your app. but mine is not workin right..
everything seems fine until i messure an angle of 45 degrees...
then the app shows 65 degrees on my phone.
so maybe there is something wrong with my phone or your app isnt perfect yet ;)

but it looks great! :)

lc1045
7th November 2009, 08:05 AM
This wonderful program works great !!!! Thanks !!
I've a 4WD and I'm wondering if you'd modify the graphical interface to make it up like a real car inclinometer.
I would like to do it for my self but I've not PDA programmer skills.

gokhankeskin
8th February 2010, 08:47 AM
iamspv developed a sensors.dll for our LG wm phones that can now trigger the g-sensor.
You can see it at thread number 471591 in this forum.

Can your program also use the same sensors.dll so we can install it on our LGs ?

La_Globule
4th March 2010, 09:30 AM
Does anybody can tell me which version of .NET Compact Framework is required for this app ?
On my Diamond 2, it tells me that I haven't the good version of .NET CF ; it's a bit weird !
Thanks.

Martin25
28th March 2010, 03:33 AM
nice app, but please do the graphics as images we can change and skin + background :) would be perfect then :)

badboy5270
2nd May 2010, 10:16 PM
hi im new to this
congrats on the app, i would like to learn how to make the same app for myself as your app will not work on my phone could you tell me how i can learn or where to find more information on c#, plus anything else i may need to make it? any help from anyone would be greatly appreciated :confused:

thank you in advance

mmiller7
5th June 2010, 04:27 AM
Cool app, but I have 2 issues with it.

1. As others have said, the bubbles sink instead of floating. They move the opposite from what's expected so it's not intuative.

2. On my HTC Touch Pro2 it didn't want to refresh often enough, I couldn't get it perfectly level because when I did a fine enough movement it never refreshed for about 2-3 degrees movement. Other levels work fine but don't show x and y axis level seperately (which is the main reason I like yours)

Chende
7th August 2010, 01:42 PM
I'm a Spanish user with Omnia II and I have installed your program Waterlevel 0.2, but can not get the program to work, runs but does not work. I have installed 3.5 NetCF.
Can you help me? :-(
Thanks ...

scull11
2nd June 2011, 12:37 PM
m ay ewbie how to install this app on my Tablet Android 2.1 ? :)