当前位置:[北京同好会]>[编程]>[星表星图控件]

 

星表星图控件

一 星表控件

小行星轨道根数元件

class PACKAGE TAsteroidCtl : public TComponent

调用:

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int compilecatalog(AnsiString fsource, AnsiString foutput) 将Skymap格式的小行星轨道根数文件亮于15等部分转换为编译星表csd文件和索引idx文件。返回记录数量。

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.

csd文件格式是依次排列的astorbit结构数据:

truct astorbit {
long double epoch; //根数历元
double i; //轨道倾角
double W; //升交点黄经
double w; //近点角
double a; //半长径
double ecc;//偏心率
double M; //平近点角
double equinox;//春分点和黄道历元
float mag; //距离地日均1个天文单位时的目视星等
float magH; //亮度系数
};

idx文件是小行星名称的列表

bool getdata(long int astindex, astorbit & aobt) 读取csd文件第astindex个记录的数据。成功返回true,否则false。

 

彗星轨道根数元件

class PACKAGE TCometCTL : public TComponent

调用

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int compilecatalog(AnsiString fsource, AnsiString foutput) 将Skymap格式的彗星轨道根数文件转换为编译星表csd文件和索引idx文件。返回记录数量。

csd文件格式是依次排列的cmtorbit结构数据:

struct cmtorbit {
long double epoch; /* epoch of orbital elements */
double i; /* inclination */
double W; /* longitude of the ascending node */
double w; /* argument of the perihelion */
double q; //近日距
double ecc; /* eccentricity */
double equinox; /* epoch of equinox and ecliptic */
float mag; /* visual magnitude at 1AU from earth and sun */
float magH; //fading factor
}

idx文件是彗星名称的列表

bool getdata(long int cmtindex, cmtorbit & cobt) 读取csd文件第cmtindex个记录的数据。成功返回true,否则false。

 

星表类

class TCatalog

调用:

catalog data 编译星表格式变量

struct catalog {
long int ra;
long int dec;
short int m;
};

int findregionid(long int ira, long int idec) 返回给定坐标的天区编号
catalog findregioncenter(int id) 返回给定编号天区的中心坐标

天区编号方案
自北天极到南天极,赤纬每2度一个条带,赤经方向根据赤纬按不同度数分区。共有10582个区,依次编号。

星表文件类型

csd:按原星表顺序编译的catalog结构数据
ssd:按天区顺序、同一天区内按原星表顺序排列的catalog结构数据
idx:在ssd内每个天区的起始位置,即每个天区之前的所有天区的记录总数,最后为总数
lkt:索引文件,其中(排序输出ssd后)
ssdidx:按csd顺序对应的ssd内位置
lktidx:按ssd顺序对应的csd位置

 

SAO星表元件

class PACKAGE TSAO : public TComponent

调用:

TCatalog data 变量

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int compilecatalog(AnsiString fsource, AnsiString foutput, bool bsort) 将文本星表(ftp://data.bao.ac.cn/cats/I/131A/)编译成csd星表,返回总记录数

bsort=false 不排序,输出:csd,idx及lkt

lkt:saolkt结构的索引文件
struct saolkt {
long int ssdidx;
long int lktidx;
};
ssdidx:按csd顺序对应的天区编号
lktidx均置0

bsort=true 排序,输出:csd,ssd,idx,lkt

bool getdata(long int saoindex, catalog & ctl) 读取ssd文件,SAO星表编号saoindex的数据。成功返回true,否则false。

变星总表元件

class PACKAGE TGCVS : public TComponent

调用:

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int getnamelist(unsigned char constell,TStringList* namelist) 查询指定编号星座内的所有记录,返回该星座在lkt文件内的起始位置

long int compilecatalog(AnsiString fsource, AnsiString foutput, bool bsort) 将文本星表(http://cdsweb.u-strasbg.fr/viz-bin/Cat?II/250)编译成csd星表,返回总记录数

bsort=false 不排序,输出:csd(按星座顺序),idx及lkt

lkt:gcvslkt结构的索引文件
struct gcvslkt {
char name[10];
unsigned char constell;
int minmag;//极小亮度
unsigned char magflag;//十位表示极大亮度星等含义:0 数值,1幅度;个位:最暗星等含义
long double epoch;
long double period;
long int ssdidx;
long int lktidx;
};
ssdidx:按csd顺序对应的天区编号
lktidx置0

bsort=true 排序,输出:csd,ssd,idx,lkt

bool getdata(long int lktindex, gcvslkt & lkt, catalog & ctl) 读取ssd,lkt文件,GCVS星表编号gcvsindex的数据。成功返回true,否则false。

TychoII星表元件

class PACKAGE TTychoII : public TComponent

调用:

TCatalog data 变量

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int compilecatalog(AnsiString fsource, AnsiString foutput, bool bsort)将文本星表编译成csd星表,返回总记录数

bsort=false 不排序,输出:csd,idx及lkt

lkt:tycholkt结构的索引文件
struct tycholkt {
short int tyc1;
short int tyc2;
short int tyc3;
long int ssdidx;
long int lktidx;
};
ssdidx:按csd顺序对应的天区编号
lktidx置0

bsort=true 排序,输出:csd,ssd,idx,lkt

bool getdata(tycholkt & lkt, catalog & ctl) 读取ssd,lkt文件,Tycho星表编号lkt的数据(lkt返回最接近的编号)。成功返回true,否则false

亮星星表元件

class PACKAGE TBSC : public TComponent

ssd:仅包括有Bayer或/和Flamsteed命名的恒星。按星座顺序(星座编号同GCVS)、同一星座内按亮度顺序排列的catalog结构数据。
idx:在ssd内每个星座的起始位置,即每个天区之前的所有星座内的记录总数。1-88:星座(有Bayer或/和Flamsteed命名的恒星)89:无Bayer和Flamsteed命名的恒星 90:其他天体(无坐标等)

lkt:索引文件,其中(排序输出ssd后)
ssdidx:按csd顺序对应的ssd内位置
lktidx:按ssd顺序对应的csd位置

调用:

void Setdatdir(AnsiString fname) 设置数据文件名称路径

long int getnamelist(unsigned char constell,TStringList* namelist) 查询指定编号星座内的所有记录,返回该星座在ssd文件内的起始位置

long int compilecatalog(AnsiString fsource, AnsiString foutput, bool bsort) 将文本星表(ftp://cdsarc.u-strasbg.fr/pub/cats/V/50/)编译成csd星表,返回总记录数

bsort=false 不排序,输出:csd,idx及lkt

lkt:gcvslkt结构的索引文件
struct gcvslkt {
char name[10];
long int ssdidx;
long int lktidx;
};

ssdidx:按csd顺序对应的星座编号1-88。名称内不含星座的置-1
lktidx置0

bsort=true 排序,输出:csd,ssd,idx,lkt
不含在ssd内的纪录ssdidx=-1

bool getdata(long int bscindex, catalog & ctl) 读取ssd第bscindex个纪录。成功返回true,否则false。

2007-3-10

二 星图控件

class PACKAGE TStarChart : public TCustomPanel

功能:

主窗口显示2度天区SAO星图。

显示6度天区SAO星图,显示2度天区TYCHO星图。

调用:

double epoch; 从2000年起算的年数(岁差改正)

void setradec(long int ra, long int dec) 当前历元的星图中心坐标

void settarget2k(long int rat, long int dect); J2000的目标天体坐标

__property AnsiString pathofdata = { write=Setpathofdata };设置星表文件目录,启动星图。