[Kstars-devel] KDE/kdeedu/kstars/kstars/data/tools

Akarsh Simha akarshsimha at gmail.com
Tue May 5 04:12:51 CEST 2009


SVN commit 963638 by asimha:

Fixing a bug in the tool to read SAC data and put it into a
database. The arcsecond values should be divided by 60 and not
multiplied by 60 to convert them into arcminutes!

CCMAIL: kstars-devel at kde.org



 M  +3 -3      parse-sac-to-mysql.pl  


--- trunk/KDE/kdeedu/kstars/kstars/data/tools/parse-sac-to-mysql.pl #963637:963638
@@ -111,7 +111,7 @@
              \s*(\d+\.?\d*\s*[ms])?\s*\| # Minor Axis
              (\d*)\s*\|              # Position Angle
              ([^|]*?)\s*\|           # Class
-             ## NOTE: Ignoring fields NSTS, BRSTR and BCHM
+             ## NOTE: Ignoring fields NSTS, BRSTR and BCHM; TODO: Include them later
              [^\|]*\|[^\|]*\|[^\|]*\|     # Ignore NSTS, BRSTR, BCHM
              ([^|]*?)\s*\|           # NGC Description
              ([^|]*?)\s*\|           # Notes
@@ -148,9 +148,9 @@
     $object->{dec_str} =~ m/\s*([+-]?\d\d) (\d\d)/;# or do { $ERROR="Dec String format error: " . $object->{dec_str}; return; };
     $object->{Dec} = $1 + $2 / 60.0;
     $object->{a_str} =~ m/\s*(\d*\.?\d*)\s*([ms]?)\s*/;# or do { $ERROR="Major axis format error: " . $object->{a_str}; return; };
-    $object->{a} = $1 * (($2 eq 's')? 60.0 : 1.0);
+    $object->{a} = $1 / (($2 eq 's')? 60.0 : 1.0);
     $object->{b_str} =~ m/\s*(\d*\.?\d*)\s*([ms]?)\s*/;# or do { $ERROR="Minor axis format error: " . $object->{b_str}; return; };
-    $object->{b} = $1 * (($2 eq 's')? 60.0 : 1.0);
+    $object->{b} = $1 / (($2 eq 's')? 60.0 : 1.0);
 
     return $object;
 }


More information about the Kstars-devel mailing list