我想写一些类似于虚拟望远镜的东西,可以看到夜空。
到目前为止,我有一个星表,我想把它们投影到一架飞机上,以获得一张模拟照片。
我推测这个投影是一个可以在here和here中找到的gnomonic projection
。
在第二个链接中,使用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.
然而,我不知道角度应该是°还是rad,以及SAMPLE和LINE的含义。
而且我也不确定是否要使用gnomonic投影。
欢迎任何帮助或讨论。
发布于 2013-06-03 04:00:50
是的,只是执行一个普通的摄像项目。
https://stackoverflow.com/questions/16870643
复制相似问题