Windows Phone 8 get device orientation - sensors

For a Windows Phone application I need the device orientation (e.g. 0,90,180, and 270 degrees) but the layout is fixed to portrait.
At the moment I am calculating the orientation from the acceleration sensor readings using the atan2(-accleeration_x,acceleration_y). Is there a build-in method to get the device orientation instead of manually using the acceleration sensor?
Regards,
Edit: someone asked a similar question almost the same time here: Device Orientation in Windows Phone 8

Related

How can capacitive touchscreens realise a high touch point recognition precision?

A capacitive touchscreen only has limited sensors to detect where has been touched, for instance, there're merely 29 sensing channels * 16 driving channels on a 6-inch touchscreen, but it can recognize touch point with a precision of display pixel level or even sub-pixel level.
How can it do that?

HoloLens 2 PV camera out of focus

I am using HoloLens 2 :
The PV camera is often out of focus when I am staring at a very close object ( 30-40 cm from device).
How can I manually set the focus engine to the desired distance (I am not using spatial awareness)?
Thanks,
Eyal
I did not find any API to manually set the focus engine of the PV camera
You can get a look at VideoDeviceController Class to learn how to get or set the camera's focus setting.

Can I get network camera direction?

I am selecting a network camera.
It turned out that the network camera is standardized by ONVIF.
In the ONVIF standard, PTZ control gives speed and operating time.
I want to get the camera orientation (angle).
Can I get the camera orientation with the ONVIF standard?
Furthermore, I want to change the orientation of the camera by giving an orientation (angle).
First of all, is there any camera that can feed back the angle of the camera?
I want to get the camera orientation (angle).
You can look at the GetStatus onvif function to get the current position. It doesn't work with all onvif certified cameras for some reason... (I had trouble with Foscam and Amcrest cameras in the past)
https://www.onvif.org/onvif/ver20/imaging/wsdl/imaging.wsdl#op.GetStatus
I want to change the orientation of the camera by giving an
orientation (angle).
You can look at the AbsoluteMove onvif function to set the position of your camera to the absolute values (angle) you want.
https://www.onvif.org/onvif/ver20/ptz/wsdl/ptz.wsdl#op.AbsoluteMove
Here's the list of all "available" functionalities of onvif. I say "available" because, just like the earlier GetStatus, some cameras will return you an error when calling them for some reason...
https://www.onvif.org/onvif/ver20/util/operationIndex.html

Gyroscope sensor: what is the axis around which the device's rotating?

i am coding 1 app which is same app "iHandy Level Free" on google play.
i am using gyroscope sensor, but i don't know what is the axis around which the device's rotating ? because when i rotate, tilt device, 3 values x, y, z are change too.
thanks
The Android follows ENU(east, North, UP ), have a look at this Application Note : http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/application_note/DM00063297.pdf
convention , so you will get a bigger value for the axis around which the device is being rotated.
It is not possible to get a Zero value around any axis no matter how gently you move the device .You are bound get some angular rate around the tationary axis (which you are assuming to be stationary)

What are the dimensions of the usable area on a Nokia N97

What are the dimensions of the usable area on a Nokia N97 in portrait mode, excluding the top (signal/battery) and bottom (menu) bars?
Size: 3.5"
Resolution: 640 x 360 pixels
I know this isn't the answer you are looking for, but I am unclear as to why you would need the area you are talking about since the battery bar, signal bar, and operator logo can all be in different places depending on if your device is unlocked and/or a number of other factors. Take a look at these screen shots to see for yourself:
http://phonereport.info/wp-content/uploads/Nokia-N97-S60v5-screenshot-15.jpg
http://www.n97fanatics.com/wp-content/uploads/nokia-n97_011.png
http://i40.tinypic.com/ilj9l2.jpg
http://www.allaboutsymbian.com/news/images/rda/Nokia%20N97-5.png
You will notice that in the first and second pic the battery symbol is left of the battery bar and in the third and fourth pic the battery symbol is under the battery bar. Also the size changes again if the phone is horizontal. If you still need this info you should be able to deduce what the size is base on the links to the pics I provided since they are exact screen shots. Just open them up in paint and crop the usable portion to which you refer and see what size it is. When I did it I came up with 505px high for the image with the battery under the battery bar, and 535px for the image with the battery to the left of the battery bar. Hope this helps!

Resources