What units of power/energy consumption have Energy Levels in the Energy Instrument for an iOS app? - ios

I'm actually measuring the energy consumption of my iOS application through the Energy instrument. I want to know the measure (e.g., in Joules) of the energy levels given by the Energy Instrument for an iOS app. Is there any relationship between the common energy consumption unit (Joules) and those energy levels? Thanks in advance for your response!

Energy Diagnostics reports power consumption as an un-united number between 0 and 20; we call them "electricities" at my office. Powergremlin gives you some insight into the actual numbers that make up said "electicity" units.

Depending on which app is set up on the platform, also the specified standard to the calculations such as British/American/SI standards. In general, in the European measurement system, the energy unit can be expressed in GWh/MWh/kWh and in the British system is "BTU" or "ktoe". Also, there are online platforms to convert these units to each other

Related

System performance and battery use when using the accelerometer and gyroscope

I’m working on a project that incorporates the use of the accelerometer and gyroscope.
In the specific app I’m working on, I turn on (e.g. .startGyroUpdatesToQueue) the accelerometer and gyroscope when required and off (e.g. .stopGyroUpdates()) when not needed similar to Apple's documentation recommendations.
However, I’ve noticed that there can be a slight delay when turning the accelerometer and gyroscope back on which the user notices every now and then. So the preference is to keep the accelerometer and gyroscope always on so the user gets a uninterrupted experience.
Questions:
1 - How efficient is the accelerometer and gyroscope on the system performance and battery use when these are enabled in an app?
2 - Is there evidence/data of the system performance and battery use when the accelerometer and gyroscope are on?
3 - Is there a way to pause the accelerometer and gyroscope instead of completely turning it off?
Answering number 3 first, on modern iPhones (5S and later) the accelerometer is never really turned off and resides in a special motion coprocessor. On these devices, the energy cost for creating the data is constant, but getting the data is expensive. It requires a timer to routinely wake up the main processor, read the data, wake up your application and execute an event on one of your threads. The closest thing to what you're asking would be for a way to have the timer turned on but not have it feed into your app. There does not appear to be a way to do this and the energy savings would probably not be that great if there were.
With that in mind, 1 is going to be fairly subjective. The processor and your app are both going to spend more time running, but if you were already doing work on the CPU will it add that much? Similarly, if users only spend 5% of their time in a screen where you don't need the accelerometer versus 50% of their time, the overall energy impact of having it constantly on will be a lot less. That really brings us to the heart of the question, number 2.
If you want to see what energy costs are associated with constantly polling the accelerometer versus only turning it on when needed, you should profile your app. When debugging your app, you can view CPU, energy, and other impacts of your app directly in Xcode using the Debug Navigator (⌘6). This is explained in Apple's Energy Efficiency Guide of iOS Apps: Measure Energy Impact with Xcode. You can also get a more detailed analysis with Instruments. Apple provides full details in their Energy Efficiency Guide of iOS Apps: Measure Energy Impact with Instruments.
Using the above tools, you should be able to get a feel for how much more energy will take to keep your accelerometer always on, and be able to make a reasoned decision about what to do.

Estimote distance units of measurement

I'm working with Estimote beacon from some weeks but I have a doubt. What is the unit of measurement of the Estimote's distance?
NSString *distance=[NSString stringWithFormat:#"%#",beacon.distance];
If I place the Estimote at 10 cm from the iOS device the distance is 0.055.
You can not calculate the exact distance - prove. It is rather some indication (but not too strict) whether you are getting closer or not to the beacon.
Morover, according to Apple's documentation:
"The array of beacons is ordered by approximate distance from the device, with the closest beacons at the beginning of the array. You can use the information in these objects to determine the proximity of each beacon and its identifying information (proximity UUID, major, and minor values). For instance, the value of the proximity property of the CLBeacon gives a general sense of the relative distance to a beacon."
And to be honest I haven't found any information about the units, it is rather a value to distinguish somehow the relative distance to that devices.
ANSWER: it is not any specific unit but only a relative value (still worth to read above text)
The distance should be in meters.
Bear in mind the BTLE is very susceptible to interference. We played with our Estimote beacons and found that at 1m the device's distance read would very from 0.7m to 2.1m.
The iBeacon protocol provides in one signal essentially two information:
the unique code of the device( the so called proximity UDID)
the power of the signal at the emission point
Using this second information is possible to elaborate an approx distance. Knowing the emitting power and the power at the receiver, is possible to evaluate a distance knowing the drop of the power each meters.
High freq signals are really susceptible to interference.
The Estimote advertising signal I'm pretty sure is the same of iBeacon. The distance measure is really a heavy approximation.
The distance measured is in meters, it is derived from Apple's Class CLBeacon, and the Accuracy property: "The accuracy of the proximity value, measured in meters from the beacon. (read-only)". "https://stackoverflow.com/questions/19007306/what-are-the-nominal-distances-for-ibeacon-far-near-and-immediate" Describes a bit about what this value means.
Estimote's API simply takes this value, and renames it to Distance.
The value is not very accurate in certain circumstances, this is because environmental variables influence the result. I've recently investigates some of these effects for Estimotes, you can read about them in this presentation: "Factors effecting positional accuracy of iBeacons". The presentation also has references to some academic articles that will help you understand distance estimation from RSSI better, Apple's API is doing exactly this.
This is Wojtek Borowicz, I'm a community evangelist at Estimote.
Beacons transmit data packets including their unique ID and information about signal power (value called TxPower). With that info, the receiving device measures RSSI (received signal strenght indicator), which serves the purposes of estimating proximity. Both TxPower and RSSI use dBm as their unit of measurement, which is a dimensionless unit (http://en.wikipedia.org/wiki/Dimensionless_unit). It is NOT in meters.
Cheers.

Does iPhone/iPad use GPS and GLONASS in the same time? Can I manage them?

I know that iPhone/iPad could use GPS and GLONASS, but does they use they in the same time?
I didn't find that info in documentation. GPS demand 4 satellites for proper work, (3 without altitude). Same thing with GLONASS. So, if we use just GPS we get 4 satellites and get's our standard GPS accuracy, and it's tolerance about 10-20 meters in open sky. I didn't find specified accuracy on wiki GPS page, maybe I just missed, but anyway my numbers is close. As said wikipedia, GLONASS accuracy for civilian usage is very slightly less accurate than GPS, but on high latitudes (north or south), GLONASS' accuracy is better than that of GPS due to the orbital position of the satellites. GLONASS
So, if we use both systems simultaneously, we have a great accuracy improvement because we have 8+ satellites from both systems. My question is: does iPhone/iPad use both systems and their location coordinates still sometimes very inaccurate? Is there a way to turn on/off one of the systems?
iOS locates the current location with all available services. That means GPS, mobile telephony transmitters (mobile cells), WLAN, and the newer iPhone with GLONASS. We have no way to decide programmatically which system exactly we want to use, but there are different ways to use the iOS location services. The desired accuracy and other parameters can be set via the CoreLocation Framework classes.
You should read the Location Awareness Programming Guide from Apple.
The main advantage of using GLONASS together with GPS is in situations with bad view to the sky, e.g., in urban canyons.
In that case, the additional GLONASS satellites may help.
In open sky situations, a combined GPS/GLONASS has no accuracy benefit to a GPS chip alone.
You cannot switch off any one of the GNSS systems in iOS. (iPhone 4S is the first iPhone that uses combined GPS/GLONASS).

Detecting exact frequency of Bluetooth signal

I was wondering if there was a way that I could detect the exact frequency of a BLE signal with an iphone. I know it will be in the 2.4 GHz range but i would like to know the difference down to the 1 Hz range between the transmitted frequency and the received frequency. The difference would be caused by the doppler effect meaning that the central or the peripheral would have to be moving. Also is there an exact frequency that iphones transmit BLE at or does it depend on the iphone's antenna?
Bluetooth doesn't have one particular frequency it operates on. Via bluetooth.com:
Bluetooth technology operates in the unlicensed industrial, scientific and medical (ISM) band at 2.4 to 2.485 GHz, using a spread spectrum, frequency hopping, full-duplex signal at a nominal rate of 1600 hops/sec.
… adaptive hopping among 79 frequencies at 1 MHz intervals gives a high degree of interference immunity and also allows for more efficient transmission within the spectrum.
So there'll be a wide spread of frequencies in use for even a single connection to a single device. There's hardware on the market like the Ubertooth that can do packet captures and spectrum analysis.
To my knowledge, iOS doesn't offer API to find out this information. OS X does at some level, probably via SPI or an IOBluetooth API, because Apple's Hardware Tools (search for "Bluetooth") offer a way to monitor spectrum usage of Bluetooth Classic devices on OS X.
As to your desire to detect movement via the Doppler effect on the radios, my instincts say that it's going to be very, very difficult to do. I'm not sure what the exact mathematics behind it would look like, but you'll want to examine what the Doppler effect on a transmission at 2.4 GHz would be as a result of low-to-moderate rates of motion. (A higher rate of motion or relative speed, say, over a few tens of miles an hour, will be quickly make Bluetooth the wrong radio technology to use because of its low transmit power.)

Best practice to implement location based service in iOS

What is the best (meaning least power consumption) way to use some location based service in an iOS application? E.g. checking the position in the background every x sec/min.
I've read about geofencing, but I'm not familiar with it in detail (how often it is updating location etc.).
Thanks for sharing any ideas
There is no best practice, it depends much on your application, which location accuracy it needs. How fast you need a position change, etc.
Either you need to be accurate to under 30m then you need GPS, which uses Power (8h of recording is possible at best location quality without using the phone otherwise)
Or you need much less accuracy, typically 1km, then it works with Cell Tower or Wifi location, which uses less power.
In between there is nothing reliable. (e.g 100m accuracy with low power, does not really exist, at least I would not trust such a setting, there are no published measurements how accurate an iphone really is in the lower accuracy settings).

Resources