Accelerometer x,y,z based on iPhone position

July 15th, 2008

We were working with the accessing Accelerometer on the iPhone and needed to figure out what readings we were getting depending on what position the iPhone was in.

This is far from scientific. These readings are taken while the iPhone was stationary and under normal gravity. Due to the lack of even a crude level at the time of the test, some of these are out best guess. I will conduct some more accurate experiments later. These should still be helpful.

 

  x =
y =
z =
0.00
0.00
-1.00
x =
y =
z =
1.00
0.00
0.00
x =
y =
z =
0.00
0.00
1.00
x =
y =
z =
-1.00
0.00
0.00
 

  x =
y =
z =
0.00
-1.00
0.00
x =
y =
z =
0.00
-1.00
0.00
x =
y =
z =
0.00
-1.00
0.00
x =
y =
z =
0.00
-1.00
0.00
 

  x =
y =
z =
0.75
- 0.75
0.00
x =
y =
z =
0.00
0.75
0.75
x =
y =
z =
- 0.75
- 0.75
0.00
x =
y =
z =
0.00
- 0.75
- 0.75
 

  x =
y =
z =
1.00
0.00
0.00
x =
y =
z =
0.00
0.00
1.00
x =
y =
z =
-1.00
0.00
0.00
x =
y =
z =
0.00
0.00
-1.00
 

  x =
y =
z =
0.75
0.75
0.00
x =
y =
z =
0.00
0.75
0.75
x =
y =
z =
- 0.75
0.75
0.00
x =
y =
z =
0.00
0.75
- 0.75
 

  x =
y =
z =
0.00
1.00
0.00
x =
y =
z =
0.00
1.00
0.00
x =
y =
z =
0.00
1.00
0.00
x =
y =
z =
0.00
1.00
0.00
 

  x =
y =
z =
- 0.75
0.75
0.00
x =
y =
z =
0.0
0.75
- 0.75
x =
y =
z =
0.75
0.75
0.00
x =
y =
z =
0.00
0.75
0.75
 

  x =
y =
z =
0.0
0.0
-1.0
x =
y =
z =
0.0
0.0
-1.0
x =
y =
z =
0.0
0.0
1.0
x =
y =
z =
0.0
0.0
1.0
 

  x =
y =
z =
- 0.75
- 0.75
0.00
x =
y =
z =
0.00
- 0.75
- 0.75
x =
y =
z =
0.75
- 0.75
0.00
x =
y =
z =
0.00
- 0.75
0.75
 

Calculate Distance Between Two Points in Objective-C

June 30th, 2008

How to calculate the distance between two points.

CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
{
CGFloat dx = point2.x - point1.x;
CGFloat dy = point2.y - point1.y;
return sqrt(dx*dx + dy*dy );
};

How to Convert Degrees to Radians, Radians to Degrees in Objective-C

June 30th, 2008

CGFloat DegreesToRadians(CGFloat degrees)
{
return degrees * M_PI / 180;
};

CGFloat RadiansToDegrees(CGFloat radians)
{
return radians * 180 / M_PI;
};

Useful Trigonometry Functions in Objective-C

June 30th, 2008

During our latest project, we faced a number of problems that Trigonometry solved rather nicely. I found a number of Trigonometry resources, but not any that focused on how to implement these concepts in Objective-C. We thought it would be good to post some of the more helpful functions.

Mobile is finally ready

March 23rd, 2008

Everybody has known that the Internet has been going mobile for a long time. It is obvious for all those that have been around or those who think that it would be cool to buy movie tickets from the theater parking lot. It’s the next obvious step along the path to something very different. It’s the reason I started my company.

Realistically, until last spring the technology just hasn’t been there. I have had a couple of devices, but none of them compare to the iPhone. Don’t get me wrong, the GPS, 3G, camera enable Windows CE or Blackberry device does have that techno-geek appeal that is hard to resist, but Apple hit on some thing good. The made everything easy to use. I have seen the typically technophobic, tooling around the Internet on their iPhone’s. Apple has made the whole mobile experience accessible. Once iPhone gets its 3G and GPS on there will be no stopping the cool.

PhotoLibrary and PhotoAlbum

March 3rd, 2008

We want to create a photo album that isn’t the Camera Roll, and add photos to it. Then have the ability to sync it with iTunes and download the photos to your computer.

what we’ve found

04-02-2008

It appears that you can create an album through the toolchain MLPhotoLibrary, but we have been unable to get photos into it. It looks like it is running a SQLLite database, but we have been unable to discover much more than that.

03-05-2008

Adding photos to the Camera Roll is very straight forward, although we have been unable to add anything other than TIFFs and JPGs.