First off, let me say that I'm not a Mathematical wizard. Be easy on me :)
I am looking to draw a subsection of space using OpenGL on the iPhone. I have a star's RA and Dec and am needing to somehow calculate a set of cartesian coordinates based on those values.
My research has led me to believe that I'm needing to run the RA/Dec through a projection algorithm to accurately plot these "points" on a grid. Is this true? If so, I have been suggested to use the "Azimuthal equidistant projection."
Unfortunately, I don't understand all the greek lettering and where my RA/Dec fits in those equations. Am I way off in left field here?
Update
Here is a function I crafted using the information over at: http://www.projectrho.com/smap03.html
/**
* Converts Right-Ascension, Declination, and Distance to Cartesian Coordinates
*
* DEC should be passed in as decimal degrees (0-360)
* RA should be passed in as decimal hours (0-24)
* Distance should be passed in as parsecs. To convert parsecs to light-years, multiply by 3.262
*
* @author Jesse Bunch
*/
+(CartesianCoords *) ConvertSpehericalToCartesianWithRA: (double)dblRA DEC: (double)dblDEC DIST: (double)dblDIST {
CartesianCoords *objCartesian = [[[CartesianCoords alloc] init] autorelease];
double dblPHI, dblTHETA, dblRHO, dblRVECT;
dblPHI = [AstroUtils ConvertDegreesToRadians: (dblRA * 15)];
dblTHETA = [AstroUtils ConvertDegreesToRadians: dblDEC];
dblRHO = dblDIST;
dblRVECT = dblRHO * cos(dblTHETA);
objCartesian.X = dblRVECT * cos(dblPHI);
objCartesian.Y = dblRVECT * sin(dblPHI);
objCartesian.Z = dblRHO * sin(dblTHETA);
return objCartesian;
}