2013-06-01 37 views
0

我想写一些类似虚拟望远镜,看着夜空。如何将夜空投射到相机?

到目前为止,我有一个明星目录,我想把它们投影到飞机上以获得模拟图片。

我推测该投影是gnomonic projection,可以找到herehere

enter image description here

在第二链路上计算的分像素位置的ALG功能。

Forward: 
Define 
     scale: number of pixels per degree in the map 
     alpha, delta: Equatorial coordinates of a given position 
     alpha0, delta0: Equatorial coordinates of the map center 
     A = cos(delta) x cos(alpha - alpha0) 
     F = scale x (180/pi)/[sin(delta0) x sin(delta) + A x cos(delta0)] 
then the pixel coordinates in the image are 

     LINE = -F x [cos(delta0) x sin(delta) - A x sin(delta0)] 
     SAMPLE = -F x cos(delta) x sin(alpha - alpha0) 
Reverse: 
Define 
     X = SAMPLE/(scale x 180/pi) 
     Y = LINE/(scale x 180/pi) 
     D = arctan[(X^2 + Y^2)^0.5] 
     B = arctan(-X/Y) 
     XX = sin(delta0) x sin(D) x cos(B) + cos(delta0) x cos(D) 
     YY = sin(D) x sin(B) 
then the right ascension and declination are 

     alpha = alpha0 + arctan(YY/XX) 
     delta = arcsin[sin(delta0) x cos(D) - cos(delta0) x sin(D) x cos(B)] 
NOTE: The arctangent functions for B and alpha must be four-quadrant arctangents. 

但是我不知道角度应该是deg还是rad,SAMPLE和LINE的意思是什么。

而且我也不确定使用gnomonic投影。

欢迎任何帮助或讨论。

回答

-1

是的,只是执​​行一个普通的相机projecion。

+0

你能详细点吗? – Bytemain