当前位置:[北京同好会]>[编程]>[太阳系控件]

 

太阳系控件TSolarSystem

class PACKAGE TSolarSystem : public TComponent

算法和主要程序选自http://www.moshier.net/index.html并改写

NFL sports jerseys are a abundant means for any fan to appearance cheap nfl jerseys their abutment for their respected team .cheap nfl jerseys As you attending at the altered available, you ability admiration what some cheap nfl jerseys of your alternatives are as you aswell cheap nfl jerseys activate the seek for one that is cheap nfl jerseys acceptable for you.Typically, 2013 super bowl jerseys you will exchange that NFL sports jerseys cheap nike nfl jerseys are advised as replicas of the official bold jersey your respected players wear. They are fabricated of a college superior nylon allowing the derma beneath them to breathe easily. Best of all,cheap nfl jerseys the faculty superior versions ravens jerseys will endure a continued time acknowledgment to the added material. Over the years,49ers jerseys these jerseys accept become cheap nfl jerseys absolute accepted acknowledgment to the cheap nfl jerseys able followings the teams have. Most break at home admirers like to action the jersey of their respected player, while they acclamation at the bold on nfl jerseys cheap the big screen. Those that do Cheap Nike NFL jerseys accomplish it to the big game, they adore accepting their on to appearance the aggregation they cheap nfl jerseys are admitting and they tend to attending ablaze in a affiliate marketer of hundreds cutting the absolute above mentioned jersey When you are searching at the altered NFL sports jerseys, you will apprehension that they accept a altered appearance 2013 super bowl jerseys depending on gender.cheap authentic jerseys The ones advised nfl jerseys cheap for men are about abutting cut to the close and aggregate cheap jerseys china out in the accept areas Women will exchange a added airy close band that gives them added nfl jerseys china comfort Their options cheap nfl jerseys can be bigger in the chest breadth and smaller in the amateur and sides. There are cheap jerseys china even some risque jersey sources cheap nfl jerseys of the added adventuresome women to wear.

物理观测数据算法选自Jean Meeus :astronomical algorithm

调用了外部自定义的3个类

1、天球坐标系类:class astro_coord

public:
double epsiln(long double J); //返回黄赤交角
void nutate(long double J); //计算章动量,通过nutl,nuto返回

void setpec(sky_sph pec, long double J); //设置J下黄道极坐标
void setrec(sky_vector rec, long double J); //设置J下黄道直角坐标

sky_sph getpec2k(void); //返回J2000下黄道坐标
sky_sph getpecj(long double J); //返回J下黄道坐标
sky_sph getmeanpeq(void); //返回J平春分点下赤道坐标
sky_sph gettruepec(void); //pseudo,返回真黄道坐标,平位置加黄经章动,
sky_sph gettruepeq(void); //返回真赤道坐标,平位置加黄经章动,真黄赤交角

sky_vector rec2req(sky_vector rec, double e); //黄道坐标转赤道坐标
sky_vector req2rec(sky_vector req, double e); //赤道坐标转黄道坐标

double nutl; // nutation in longitude (radians) 章动量
double nuto; // nutation in obliquity (radians) 章动量

2、天文时间类 class astro_time{

public:
long double jd; //设置儒略日(UT)
astro_date getut(void); //返回UT
astro_date getbt(void); //返回BT
void setut(astro_date adad); //设置UT
void setbt(astro_date adad); //设置BT
double getdt(void); //返回deltaT
long double gettdt(void); //返回儒略日(TDT)

3、观测地点类

元件由以下单元组成

1)大行星日心黄道坐标级数展开系数

getpec2k(J)调用class_pertub (原程序中gplan)求出J时刻J2000的日心黄道极坐标:

class_mercury.cpp
class_venus.cpp
class_uranus.cpp
class_neptune.cpp
class_pluto.cpp
class_mars.cpp

phy_mars(long double J,sky_sph ehecj,sky_sph mhecj,double t,sky_sph mgecj,sky_sph sgeqj, double res[8] )
火星物理观测参数。

输入:
地球相对当日平春分点的日心坐标:ehecj=hpecj[nearth];
火星在T-tme时刻相对当日平春分点的日心坐标:mhecj=hpecj[nmars];
火星到地球的光行时:t=jabe[nmars];
火星在T-tme的地心黄道坐标:mgecj=gpecj[nmars];
太阳在T-tse的地心真赤道坐标: 注意为单位向量 sgeqj=gpeqa[nearth];

返回:(角度单位均为度)
res[0]=DE;
res[1]=DS;
res[2]=LS;
res[3]=P;
res[4]=Q;
res[5]=k;
res[6]=CM;
res[7]=d;
其中:
double DE; //从火星中心观察到的地球的赤纬。当DE为正时,从地球上能观察到火星的北极。
double DS; //从火星中心观察到的太阳的赤纬。当DS为正时,火星的北极被照亮。
double P; //火星自转轴的位置角。自火星视面北点起向东计量。
double LS; //火心太阳黄经,从火星春分点起算
double Q; //暗缘中心点的位置角。自火星视面北点起向东计量。
double CM,w; //从地心观察到的火星视面中央点经度
double d; //视直径
double k; //明暗比

class_jupiter.cpp

phy_jupiter(long double J,sky_sph ehpecj,double res[8])//木星物理观测参数

输入:
地球相对当日平春分点的日心坐标: ehpecj=hpecj[nearth]

返回:
res[0]=DE;
res[1]=DS;
res[3]=P;
res[4]=W1;
res[5]=W2;
res[6]=C;
res[7]=d;
其中:
double DE; //木心地球赤纬。当DE为正时,从地球上能观察到木星的北极。
double DS; //木心太阳赤纬。当DS为正时,木星的北极被照亮。
double P; //自转轴的位置角。自视面北点起向东计量。
double W1,W2; //从地心观察到的星视面中央点经度
double k; //明暗比
double C; //相位改正C(度)


jupsat(long double J,sky_sph jgpecj,sky_vector sv[5])//木星伽利略卫星位置

输入:
木星J-t的地心黄道j平坐标 jgpecj

返回:
sv[0]:木星自转轴指向 ,无投影改正
sv[1-4]:木卫直角坐标,单位:木星半长径。x,y经投影改正


class_saturn.cpp

void phy_saturn(long double J, sky_sph shpecj,sky_sph sgpecj,sky_sph ehpecj,double res[8])
土星物理观测参数

输入:
地球相对当日平春分点的日心黄道坐标 : ehpecj
土星在J-tsae观测时刻相对当日平春分点的日心黄道坐标: shpecj
土星的J-tsae地心黄道坐标: sgpecj

返回:
res[0]=Be; 从土星中心观察到的地球的纬度(度)
res[1]=Bs;//从土星中心观察到的太阳的纬度(度)
res[2]=0;
res[3]=P;//光环视椭圆半短径的位置角(度)
res[4]=ra;//外环、本体视椭圆的长径和短径(角秒)
res[5]=rb;
res[6]=rp;
res[7]=re;

Graphics::TBitmap * view(double res[8]);
土星视图

输入:
物理观测参数res[8],同上

返回:
位图句柄

2)地月坐标级数展开系数, 调用class_planet(原程序中g3plan)计算级数和。

class_earth.cpp

sky_sph getpec2k(J);//J时刻J2000的日心黄道极坐标
void phy_moon(long double J, double res[8]);//J时刻月球物理观测数据

返回:
res[0]//地球的赤纬(度)
res[1]//太阳的赤纬(度)
res[2]//太阳赤经(度)
res[3]=P;//北极位置角P(度)
res[4]=Q;//暗缘中心点的位置角(度)
res[5]=k;//明暗比
res[6]//中央经度(度)
res[7]//张角(角秒)

class_moon.cpp

sky_sph getpecj(long double J);//J时刻J下的地心黄道极坐标
sky_vector * moonlib(long double J);//J下黄道坐标到月球坐标的转换矩阵

3)彗星、小行星历表计算

get_pec2k(long double J,orbit obt)输入轨道根数求解开普勒方程计算J2000下的日心黄道坐标

class_comet.cpp
class_asteroid.cpp

4)太阳系内大行星、彗星、小行星位置和物理观测参数计算

class_solar.cpp

public:

void update(long double J);//计算J时刻大行星位置

大行星,月亮坐标(nearth=0,nmer=1,nven=2,nmars=3,njup=4,nsat=5,nura=6,nnep=7,nplu=8,nmoon=9)。

命名规则:h/g:日心/地心;r/p:直角/球坐标;ec/eq:黄道/赤道坐标;2k/j/t/a:J2000平位置/J平位置/真位置/视位置
在执行update()后下列变量有效:

sky_sph hpec2k[10]; //no moon
sky_sph gpeq2k[10];
sky_sph hpecj[10];
sky_sph gpecj[10];
sky_sph hpect[10];
sky_sph gpect[10];
sky_sph gpeca[10]; //pseudo,no definition for apparent ecliptic position
sky_sph gpeqa[10];
sky_sph gpeqt[10];
sky_sph gpec[10]; //=peca
sky_sph gpeq[10]; //=peqa

sky_sph get_comet_gpeqa(long double J,double res[8],cmtorbit iobt);
sky_sph get_ast_gpeqa(long double J,double res[8],astorbit iobt);
//J时刻彗星、小行星视位置

输入:
轨道根数obt

返回:
gpeqa:地心赤道视位置(向径无效)
res[0]; //J-t时日心距离
res[1]; //地心距离
res[2]; //太阳距角(弧度)
res[3]; //亮度

计算彗星、小行星位置后下列变量有效:
sky_sph cmtgpeq2k; //彗星
sky_sph astgpeq2k; //小行星

sky_sph getstar(sky_sph star, long double epoch, long double J);//恒星视位置改正

输入:
赤道坐标star
星表历元epoch
观测时刻J

返回:
恒星视位置赤道坐标

Graphics::TBitmap * view(double res[8], AnsiString fname,double scale,int longdir);//行星视图

输入:
物理观测数据res,包括
res[0]//地球的赤纬(度)
res[1]//void
res[2]//void
res[3]=P;//北极位置角P(度)
res[4]=Q;//暗缘中心点的位置角(度)
res[5]=k;//明暗比
res[6]//中央经度(度)
res[7]//张角(角秒)

fname:720x360行星表面图片文件名。
scale:视图直径所代表的张角。负值表示视图直径即为行星视直径。
longdir:行星表面经度方向。向东计量+1,向西-1。

返回:
181x181位图句柄。

void get_sun_phy(long double J, double res[8]);//太阳物理观测数据

返回:
res[0]=B0;//中心纬度
res[1]=J0;//自转周起点
res[2]=0;
res[3]=P;//方位角
res[4]=0;
res[5]=1;
res[6]=L0;//中心经度
res[7]=C;//自转周号

void get_moon_phy(long double J, double res[8]);
Graphics::TBitmap * get_moon_phy(long double J, double res[8], AnsiString str);

输入:
月面图文件名str

返回:
月亮物理观测数据(同class_earth.cpp)
月亮视图(图直径2000角秒)

void get_mars_phy(long double J,double res[8]);//火星物理观测数据
Graphics::TBitmap * get_mars_phy(long double J,double res[8],AnsiString str);//火星物理观测数据和视图

输入:
火星表面图文件名str

返回:
火星物理观测数据(同class_mars.cpp)
火星视图(图直径27角秒)

void get_jup_phy(long double J, double res[8]);//木星物理观测数据,同class_jupiter.cpp

void get_jup_sat(long double J, sky_vector res[5]);//木星伽利略卫星位置
Graphics::TBitmap * get_jup_sat_phy(long double J,sky_vector res[5]);

返回:
res同class_jupiter.cpp
木星及木卫视图(忽略DE效应)

Graphics::TBitmap * get_mer_ven_phy(long double J, double res[8],int nplanet);//水星,金星视图

返回:
物理观测数据,包括
res[0]=0;
res[1]=0;
res[2]//太阳距角(度)
res[3]//=0;
res[4]//暗缘中心点位置角(度)
res[5]//明暗比
res[6]=0;
res[7]//视直径(角秒)
行星视图(图直径60角秒)

Graphics::TBitmap * get_sat_phy(long double J, double res[8]); //土星物理观测数据和视图

返回:
土星物理观测数据(同class_saturn.cpp),res[2]://太阳距角(度)
土星视图

5)元件调用

public:
astro_solarsys *solarsys;