// Test des possibilites de xastropack #include #include #include #include #include #include "xastropack.h" /*==========================================================================*/ #if 1 // Test de InRange InRangeCoLat InRangeLat int main(int narg, char *arg[]) { if(narg<3) { cout<<"usage: tstxastro range,vmax val,u"<2) sscanf(arg[2],"%lf,%lf",&coord1_ini,&coord2_ini); printf("ctype = %s\n",arg[1]); unsigned long typ = DecodeTypAstro(arg[1]); string str = DecodeTypAstro(typ); double coord1 = coord1_ini, coord2 = coord2_ini; unsigned long newtyp = CoordConvertToStd(typ,&coord1,&coord2); string newstr = DecodeTypAstro(newtyp); printf("typ = %lo %s ==> newtyp = %lo %s\n" ,typ,str.c_str(),newtyp,newstr.c_str()); printf("coord1 %.6f ==> %.6f\n",coord1_ini,coord1); printf("coord2 %.6f ==> %.6f\n",coord2_ini,coord2); return 0; } #endif