×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Got no stars is gsc installed error | SOLVED

  • Posts: 112
  • Thank you received: 12
Eureka. I found the problem. Always the same history with the regional settings. In France, we work with the coma to design numbers. In the ccd_simulator code, the gsc command returns an empty string bcause of the comas.
To avoid this problem, I modified the code. It works for me but I'm sure there is a better way to do this because it will not work with english regional settings.
There is 2 parts. First time, it replaces comas with points before the gsc command call and then it replaces points with comas before parsing.

If somebody can help with a better fix, French people will appreciate :woohoo:
if (ftype==CCDChip::LIGHT_FRAME)
        {
            //sprintf(gsccmd,"gsc -c %8.6f %+8.6f -r 120 -m 0 9.1",rad+PEOffset,decPE);
            sprintf(gsccmd,"gsc -c %8.6f %+8.6f -r %4.1f -m 0 %4.2f -n 3000",rad+PEOffset,cameradec,radius,lookuplimit);
            //fprintf(stderr,"gsccmd %s\n",gsccmd);
 
	    // Start fix part 1
	    //replace ',' with '.'
            for(int x=0; x<=250; x++) {
                    if (gsccmd[x] == ',') {
			 gsccmd[x] = '.';
                    }
            }
	    // End of fix
 
            pp=popen(gsccmd,"r");
            if(pp != NULL) {
                char line[256];
                while(fgets(line,256,pp)!=NULL)
                {
                    //fprintf(stderr,"%s",line);
 
                    //  ok, lets parse this line for specifcs we want
                    char id[20];
                    char plate[6];
                    char ob[6];
                    float mag;
                    float mage;
                    float ra;
                    float dec;
                    float pose;
                    int band;
                    float dist;
                    int dir;
                    int c;
                    int rc;
 
		    //Start fix part 2
		    //replace '.' with ','
		    for(int x=0; x<=250; x++) {
		        if (line[x] == '.') {
			    line[x] = ',';
		        }
                    }
		    //End fix
 
                    rc=sscanf(line,"%10s %f %f %f %f %f %d %d %4s %2s %f %d",
                            id,&ra,&dec,&pose,&mag,&mage,&band,&c,plate,ob,&dist,&dir);
                    //fprintf(stderr,"Parsed %d items\n",rc);
                    if(rc==12) {
                        lines++;
                        //if(c==0) {
                        stars++;
                        //fprintf(stderr,"%s %8.4f %8.4f %5.2f %5.2f %d\n",id,ra,dec,mag,dist,dir);
 
                        //  Convert the ra/dec to standard co-ordinates
                        double sx;   //  standard co-ords
                        double sy;   //
                        double srar;        //  star ra in radians
                        double sdecr;       //  star dec in radians;
                        double ccdx;
                        double ccdy;
 
                        //fprintf(stderr,"line %s",line);
                        //fprintf(stderr,"parsed %6.5f %6.5f\n",ra,dec);
 
                        srar=ra*0.0174532925;
                        sdecr=dec*0.0174532925;
                        //  Handbook of astronomical image processing
                        //  page 253
                        //  equations 9.1 and 9.2
                        //  convert ra/dec to standard co-ordinates
 
                        sx=cos(decr)*sin(srar-rar)/( cos(decr)*cos(sdecr)*cos(srar-rar)+sin(decr)*sin(sdecr) );
                        sy=(sin(decr)*cos(sdecr)*cos(srar-rar)-cos(decr)*sin(sdecr))/( cos(decr)*cos(sdecr)*cos(srar-rar)+sin(decr)*sin(sdecr) );
 
                        //  now convert to microns
                        ccdx=pa*sx+pb*sy+pc;
                        ccdy=pd*sx+pe*sy+pf;
 
 
                        rc=DrawImageStar(targetChip, mag,ccdx,ccdy);
                        drawn+=rc;
                        if(rc==1)
                        {
                            //fprintf(stderr,"star %s scope %6.4f %6.4f star %6.4f %6.4f  ccd %6.2f %6.2f\n",id,rad,decPE,ra,dec,ccdx,ccdy);
                            //fprintf(stderr,"star %s ccd %6.2f %6.2f\n",id,ccdx,ccdy);
                        }
                    }
                }
                pclose(pp);
            } else
            {
                IDMessage(getDeviceName(),"Error looking up stars, is gsc installed with appropriate environment variables set ??");
                //fprintf(stderr,"Error doing gsc lookup\n");
            }
            if(drawn==0)
            {
                IDMessage(getDeviceName(),"Got no stars, is gsc installed with appropriate environment variables set ??");
 
            }
        }
Linux Mint 19 Cinnamon using PPA for latest KStars-bleeding and INDI
Raspberry Pi 3 B+ with StellarMate
Atik 314E - ASI120M - CG5 with Celestron C9.25
The following user(s) said Thank You: Eric
10 years 2 weeks ago #919

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 1
Thanks for your solution!
For whatever reason, despite having set my system to "LANG=en_US.UTF-8", LC_NUMERIC was still set to the local variant which also uses "," as decimal separator.
I got the ccd_simulator running by removing that LC_NUMERIC and setting LC_ALL=C…

CS,
Thorsten
10 years 2 weeks ago #920

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 14
This post describe how to replace the "," by the "." for the entire system : forum.ubuntu-fr.org/viewtopic.php?id=81122

It works for me.
9 years 11 months ago #1119

Please Log in or Create an account to join the conversation.

The GSC catalog is now available for 14.04 and later:
sudo apt-get install gsc

The Original file can be dowloaded and built from source.
The following user(s) said Thank You: Sébastien
9 years 3 months ago #2567

Please Log in or Create an account to join the conversation.

  • Posts: 112
  • Thank you received: 12
Hi Jasem,

Seems everything is ok with this package. No more trouble with point or coma with the GSC catalog use.
I think we can close this topic.

Sébastien.
Linux Mint 19 Cinnamon using PPA for latest KStars-bleeding and INDI
Raspberry Pi 3 B+ with StellarMate
Atik 314E - ASI120M - CG5 with Celestron C9.25
9 years 3 months ago #2589

Please Log in or Create an account to join the conversation.

  • Posts: 45
  • Thank you received: 6
I can't follow that link to build it on my raspberry pi 2 :unsure:
9 years 1 week ago #3966

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
As none of the mentioned links work anymore here is the source link for the Guide Star Catalog:
gsss.stsci.edu/Catalogs/GSC/GSC1/GSC1.htm
--= human, without Windows™ =--
pls excuse my bad english! :)
The following user(s) said Thank You: the.cakemaker
7 years 4 weeks ago #15699

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
I dont get It, how do I install gsc on non ubuntu system (gentoo)? Jasem can you please provide a link for the package again, that I can do cmake with it?
--= human, without Windows™ =--
pls excuse my bad english! :)
7 years 4 weeks ago #15700

Please Log in or Create an account to join the conversation.

  • Posts: 314
  • Thank you received: 34
--= human, without Windows™ =--
pls excuse my bad english! :)
7 years 4 weeks ago #15701

Please Log in or Create an account to join the conversation.

  • Posts: 321
  • Thank you received: 19
Hi!
I am totally new to linux and installed the diestro-astro on an old notebook to controll my astrosetup with it. Cam and EQ6 are working allready, but i wanted to get a feel for the kstars program so i tried to use all simulated hardware. This works until i get the error "got no stars is gsc installed" andsoon.. So i found the gsc catalog but i have absolutely no idea which file(s) i have to download, and how to install them. And after hours of unsuccesful searching i am trying to get the info here...
In the screenshot is what i found. if anyone could tell me which one of these fiels i have to download
and how to proceed i would be very happy.
Cheers
TCM
Skywatcher EQ6-R | Lacerta 10" Carbon-Newton | Lacerta MFoc Motorfocus | Moravian G2 8300 Color | Canon EOS 5DMarkIIIa | Lodestar X2 guiding cam | KSTARS 3.4.3. on my outdoor-Laptop with KDE-Neon/Plasma | KSTARS 3.4.3. on Remote-IMac with Catalina | KSTARS 3.4.3 on Remote-Macbook Air with Catalina
6 years 3 months ago #22329
Attachments:

Please Log in or Create an account to join the conversation.

sudo apt-get install gsc
The following user(s) said Thank You: the.cakemaker
6 years 3 months ago #22337

Please Log in or Create an account to join the conversation.

  • Posts: 321
  • Thank you received: 19

Thanks. So there is nothing to download?


Gesendet von iPhone mit Tapatalk
Skywatcher EQ6-R | Lacerta 10" Carbon-Newton | Lacerta MFoc Motorfocus | Moravian G2 8300 Color | Canon EOS 5DMarkIIIa | Lodestar X2 guiding cam | KSTARS 3.4.3. on my outdoor-Laptop with KDE-Neon/Plasma | KSTARS 3.4.3. on Remote-IMac with Catalina | KSTARS 3.4.3 on Remote-Macbook Air with Catalina
6 years 3 months ago #22340

Please Log in or Create an account to join the conversation.

Time to create page: 0.785 seconds