If you're doing a 2D game, you can set up your projection and model-view matrices so that you don't need to convert at all:
// This goes in your init code somewhere
// Set up 480x320 orthographic projection
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof(-240.0f, 240.0f, -160.0f, 160.0f, -1.0f, 1.0f);
// Rotate into landscape mode
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotatef(-90.0f, 0.0f, 1.0f, 0.0f);
This makes it so that world coordinates (-240, -160) maps to the top-left of the screen (bottom-left in landscape mode), (240, 160) maps to the bottom-right (top-right in landscape), etc. Since the iPhone's screen is 480x320, you won't need to convert between world and screen coordinates with your matrices set up thusly.
Of course, if you want to be able to move the camera, then you'll need to offset by the camera's location.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…