Transforming accelerometer’s data from device’s coordinates to real world coordinates

Oki, I have worked this out mathematically myself so please bear with me. If you want to translate an acceleration vector accelerationvalues into an acceleration vector trueacceleration expressed in real world’s coordinates, once you have azimuth,pitch and roll stored in a orientationvalues vector, just do the following: trueacceleration[0] =(float) (accelerometervalues[0]*(Math.cos(orientationvalues[2])*Math.cos(orientationvalues[0])+Math.sin(orientationvalues[2])*Math.sin(orientationvalues[1])*Math.sin(orientationvalues[0])) + accelerometervalues[1]*(Math.cos(orientationvalues[1])*Math.sin(orientationvalues[0])) + accelerometervalues[2]*(-Math.sin(orientationvalues[2])*Math.cos(orientationvalues[0])+Math.cos(orientationvalues[2])*Math.sin(orientationvalues[1])*Math.sin(orientationvalues[0]))); trueacceleration[1] … Read more

ADB is not recognizing my device

The problem was that windows does not recognize the device driver, therefore is needed install it manually. The way I solved this: 1. Open Device Manager and locate your device under “Other devices”. 2. Right click on your device and then click on “Update driver software”. 3. Now click on “Browse my computer for driver … Read more

Xcode – iPhone – profile doesn’t match any valid certificate-/private-key pair in the default keychain

To generate a certificate on the Apple provisioning profile website, firstly you have to generate keys on your mac, then upload the public key. Apple will generate your certificates with this key. When you download your certificates, tu be able to use them you need to have the private key. The error “XCode could not … Read more

android device id confusion

IMEI The IMEI is the ‘MAC‘ for the telephony module – the unique ID that the telephone uses when it connects via GSM/GPRS/HSPDA/etc. The GSM network uses it to route calls and data from the phone over the GSM network right up to the gateway into the Internet (which is an IP network). A telephony … Read more

How to get a list of video capture devices (web cameras) on windows? (C++)

From the examples shown, copy the following code into dev.c. Then open the command line with all the SDK variables set. At the command line link to ole32.lib and oleaut32.lib. It will then show you all the devices. cl dev.c ole32.lib oleaut32.lib dev.exe will give out the list on the command line. #include <windows.h> #include … Read more