關於Swiss Ephemeris中的座標
2.4.4. Coordinate systems, degrees and radians
SEFLG_EQUATORIAL returns equatorial positions: rectascension and declination.
SEFLG_XYZ returns x, y, z coordinates instead of longitude, latitude, and distance.
SEFLG_RADIANS returns position in radians, not degrees.
E.g. to compute rectascension and declination, write:
iflag = SEFLG_SWIEPH | SEFLG_SPEED | SEFLG_EQUATORIAL;
2.4.4 座標系統,角度與弧度
使用SEFLG_EQUATORIAL時,返回的是赤道上的位置,返回值是赤經(rectascension)與赤緯(declination),赤經與時角是不同的,時角由天子午圈向西量,而赤經是由春分點向東量,兩者方向相反。赤經的值是天球赤道自西向東由0小時至24小時來表達,返回值是一個double型的數字,它每15角分代表一時分,每15角秒代表一個時秒。
使用SEFLG_XYZ時,返回的是笛卡爾座標系,其中包括X,Y,Z三個值,代表了經度(longitude),緯度(latitude)及距離。
使用SEFLG_RADIANS 時,返回的是弧度而不是角度。
6.12. swe_azalt(), horizontal coordinates, azimuth, altitude
swe_azalt()computes the horizontal coordinates (azimuth and altitude) of a planet or a star from either ecliptical or equatorial coordinates.
這個函數通過黃道或赤道座標,計算出星體的水平座標,包括高度角及方位角。
void swe_azalt(
double tjd_ut, // UT
int32 calc_flag, // SE_ECL2HOR or SE_EQU2HOR
double *geopos,// array of 3 doubles: geograph. long., lat., height
double atpress, // atmospheric pressure in mbar (hPa) 大氣壓力
double attemp, // atmospheric temperature in degrees Celsius 大氣溫度
double *xin, // array of 3 doubles: position of body in either ecliptical or equatorial coordinates,
// depending on calc_flag 參數由計算標誌所確定
double *xaz); // return array of 3 doubles, containing azimuth, true altitude, apparent altitude 返回值包括方位角,高度角及可視高度角
If calc_flag=SE_ECL2HOR, set xin[0]= ecl. long., xin[1]= ecl. lat., (xin[2]=distance (not required));
else
if calc_flag= SE_EQU2HOR, set xin[0]=rectascension, xin[1]=declination, (xin[2]= distance (not required));
#define SE_ECL2HOR 0 黃道座標系,要求提供經度,緯度,距離(其實不需要)
#define SE_EQU2HOR 1 赤道座標系,要求提供赤經,赤緯,距離(其實不需要)
The return values are:
xaz[0] = azimuth, i.e. position degree, measured from the south point to west. 第0個數組返回的是地平經度,即方位角(azimuth),它代表的是是從某點的指北方向線起,依順時針方向到目標方向線之間的水平夾角。即以北面為0度,然後繞圓周一圈所得到的值。
xaz[1] = true altitude above horizon in degrees. 第1個數組代表的是自地平線算起的高度。
xaz[2] = apparent (refracted) altitude above horizon in degrees. 第2個是指的從地平線往上的可見高度
The apparent altitude of a body depends on the atmospheric pressure and temperature. If only the true altitude is required, these parameters can be neglected.
可見高度與大氣壓力有關,不過如果只是想得到一個真實高度的話,這個是可以忽略掉的。
If atpress is given the value 0, the function estimates the pressure from the geographical altitude given in geopos[2] and attemp. If geopos[2] is 0, atpress will be estimated for sea level.
如果大氣壓力是0值,那麼會自動根據參數中給出的海拔高度來計算出一個大氣壓強。