×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Smile Ask for help about accelerometer and SysInfo

    Hi, All,

    How are you?

    Currently I work on energy efficiency issues on N95. I have two doubts. Hopefully you guys can help me. Thanks!

    1. I need to know the current remaining battery energy. I found a sysinfo function, battery(), which shows the energy level from 0 (empty) to 100 (full). Do you know how the total battery capacity is divided into these 101 levels? Is it divided uniformly?

    2. Is the accelerometer sensing the position all the time? If it is, then I want the accelerometer to sense for while and then sleep for a while, then sense for a while and sleep for a while. I plan to control this by connect() and disconnect() functions. But how can I achieve this control? Is there some function like timer in Python?

    Your help will be appreciated greatly!

    Have a nice day!

    Peter

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Ask for help about accelerometer and SysInfo

    Hi,

    Quote Originally Posted by lspkl View Post
    1. I need to know the current remaining battery energy. I found a sysinfo function, battery(), which shows the energy level from 0 (empty) to 100 (full). Do you know how the total battery capacity is divided into these 101 levels? Is it divided uniformly?
    Even though it ranges from 0 to 100, the battery level is indicated at every 14.285 points (because the phone's battery indicator has 7 lines, and 100/7=14.285...). So it's not very uniform.

    Quote Originally Posted by lspkl View Post
    2. Is the accelerometer sensing the position all the time? If it is, then I want the accelerometer to sense for while and then sleep for a while, then sense for a while and sleep for a while. I plan to control this by connect() and disconnect() functions. But how can I achieve this control? Is there some function like timer in Python?
    Yes, there is. Please read the e32 section of the PyS60 Library Reference and there you will find information about Ao_timer.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Red face Re: Ask for help about accelerometer and SysInfo

    Thanks a lot! Bogdan!

    The capacity of BL-6F battery on N95 is 15984J (3.7V@1200mAh).I wonder whether the energy consumed on each level is 159.84J (15984/100), namely the energy of the batter is uniformly distributed on each level. So I tested the energy consumption on the first line of phone's battery indicator by Energy Profiler. It consumed
    7912.08J energy, which is almost half of the total energy of the battery. And the level keeps 100 for almost all the first line life time. Then jump to 85 when there are only 6 lines remained. That means that first 15 levels consumed almost half of the total energy. It seems not to be uniformly distributed on 100 levels.

    Actually I want to know how many energy is consumed for each level. Or if we know the currently cumulatively consumed energy, that will also help a lot.

    Could Bogdan or someone else can tell me the relationship between energy consumption and levels? or the solution to get the currently cumulatively consumed energy?

    Thanks a lot for all your consirations!

    Peter

  4. #4
    Registered User
    Join Date
    Nov 2008
    Posts
    24

    Re: Ask for help about accelerometer and SysInfo

    I propose you to make some empirical studies on that.

    I'm on the development of an application and I want to share the GPS position with other mobile phones. Well.. I have a thread that get the current position of the mobile phone every 5 seconds and send a request to http://localhost/database/insert_gps.php
    That's just an intro to propose my idea.

    I think you could make some modifications to your application, and save the values in a database in your mobile phone using PAMP. You will be able to study how long did the battery lived, and which vas the battery level in each moment.
    Then just divide the time in sections and check which vas the value at each moment.

    If you do this study several times, and with the conditions of just running your Python application and PAMP, you will get a study based criteria to determine if you have 50% of the battery according to the values, even you have all the bars printed on the screen.

    I can provide you some code in PHP to solve some problems in the INSERTs, as it seems that MySQL crashes after a table file is bigger that some KBs.

    Hope this idea helps

    didacgil9@gmail.com

    Quote Originally Posted by lspkl View Post

    The capacity of BL-6F battery on N95 is 15984J (3.7V@1200mAh).I wonder whether the energy consumed on each level is 159.84J (15984/100), namely the energy of the batter is uniformly distributed on each level. So I tested the energy consumption on the first line of phone's battery indicator by Energy Profiler. It consumed
    7912.08J energy, which is almost half of the total energy of the battery. And the level keeps 100 for almost all the first line life time. Then jump to 85 when there are only 6 lines remained. That means that first 15 levels consumed almost half of the total energy. It seems not to be uniformly distributed on 100 levels.

    Actually I want to know how many energy is consumed for each level. Or if we know the currently cumulatively consumed energy, that will also help a lot.

    Could Bogdan or someone else can tell me the relationship between energy consumption and levels? or the solution to get the currently cumulatively consumed energy?

    Thanks a lot for all your consirations!

    Peter

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Wink Re: Ask for help about accelerometer and SysInfo

    Thanks, didacgil9.

    Can you send me the corresponding code? By the way, the link you provided http://localhost/database/insert_gps.php seems not to work.

    Thanks!

    Have a nice day!

    Peter


    Quote Originally Posted by didacgil9 View Post
    I propose you to make some empirical studies on that.

    I'm on the development of an application and I want to share the GPS position with other mobile phones. Well.. I have a thread that get the current position of the mobile phone every 5 seconds and send a request to http://localhost/database/insert_gps.php
    That's just an intro to propose my idea.

    I think you could make some modifications to your application, and save the values in a database in your mobile phone using PAMP. You will be able to study how long did the battery lived, and which vas the battery level in each moment.
    Then just divide the time in sections and check which vas the value at each moment.

    If you do this study several times, and with the conditions of just running your Python application and PAMP, you will get a study based criteria to determine if you have 50% of the battery according to the values, even you have all the bars printed on the screen.

    I can provide you some code in PHP to solve some problems in the INSERTs, as it seems that MySQL crashes after a table file is bigger that some KBs.

    Hope this idea helps

    didacgil9@gmail.com

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    16

    Re: Ask for help about accelerometer and SysInfo

    Sorry for double message. Even I do the empirical studies, I still need to know the energy consumption online and save it to the file. The problem for Energy Profiler is that I can read the energy consumption only after I stop the testing. So it will require human interaction, which also make the energy measurement not accuracy.

    Is anyone have good idea to do that?

    Thanks a lot!

    Have a nice day!

    Peter

  7. #7
    Nokia Developer Expert
    Join Date
    Jan 2009
    Posts
    69

    Re: Ask for help about accelerometer and SysInfo

    @ Peter:

    This might of interest to you. When NEP is in background/running, you can read the power measurements in real-time thru Nokia Energy Profiler External API:
    http://www.forum.nokia.com/info/sw.n...rnal_APIs.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×