[tools] Migrate to Eigen
parent
d1f0434229
commit
eeb50558e4
|
@ -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
|
||||
|
|
|
@ -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 << ' ';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue