[tools] Migrate to Eigen

pull/147/head
Hleb Valoshka 2018-11-29 00:43:44 +03:00
parent d1f0434229
commit eeb50558e4
2 changed files with 8 additions and 8 deletions

View File

@ -161,13 +161,13 @@ bool WriteStarDatabase(istream& in, ostream& out, bool sphericalCoords)
return false;
}
Point3d pos =
Eigen::Vector3d pos =
astro::equatorialToCelestialCart((double) RA * 24.0 / 360.0,
(double) dec,
(double) distance);
x = (float) pos.x;
y = (float) pos.y;
z = (float) pos.z;
x = (float) pos.x();
y = (float) pos.y();
z = (float) pos.z();
absMag = (float) (appMag + 5 - 5 * log10(distance / 3.26));
}
else

View File

@ -185,12 +185,12 @@ bool DumpOldStarDatabase(istream& in, ostream& out, ostream* hdOut,
}
else
{
Point3d pos = astro::equatorialToCelestialCart((double) RA, (double) dec, distance);
Eigen::Vector3d pos = astro::equatorialToCelestialCart((double) RA, (double) dec, distance);
float absMag = (float) (appMag / 256.0 + 5 -
5 * log10(distance / 3.26));
out << (float) pos.x << ' ' <<
(float) pos.y << ' ' <<
(float) pos.z << ' ';
out << (float) pos.x() << ' ' <<
(float) pos.y() << ' ' <<
(float) pos.z() << ' ';
out << setprecision(5);
out << absMag << ' ';
}