rlancaste / stellarsolver

GNU General Public License v3.0
94 stars 47 forks source link

Problem with internal solver and indexes. #153

Open atoy40 opened 1 month ago

atoy40 commented 1 month ago

Hi,

I'm working on a javascript library to bind StellarSolver, and I've a problem with the internal solver. I tried to solve a fits (tested successfully with the StellarSolverTester) but it failed each time. If I compare astrometry logs, I can see a big difference. For each index file I've got (the following example is for the 4209 index):

With my code :

Index scale: [0, 0] arcmin, [0, 0] arcsec
Index has 1168128 quads and 730080 stars

With the tester :

Index scale: [42, 60] arcmin, [2520, 3600] arcsec
Index has 1168128 quads and 730080 stars

In both case, I've used the SingleThread builtin profile with no scale/position. It seems to have a problem reading indexes ?

The extraction part works perfectly, each "solvers" get 50 detected/filtered stars. Thks Anthony.

atoy40 commented 1 month ago

I think I found the cause of the problem. In the embedded astrometry code, the strtod() function is used to convert FITS headers from string to double. But this function is "locale" dependent, so with my fr_FR locale, strtod() want a comma as decimal separator and it's unable to parse a value with a dot as found into the FITS.