From e12ef6b4509c74db54b51bdb70e13feef91138b0 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 21 Oct 1998 14:56:20 +0000 Subject: [PATCH] Fixed a units conversion bug. --- SplitTris/splittris.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SplitTris/splittris.cxx b/SplitTris/splittris.cxx index 41e94a75d..e4247715e 100644 --- a/SplitTris/splittris.cxx +++ b/SplitTris/splittris.cxx @@ -133,7 +133,7 @@ void find_tris(int n, int *t1, int *t2, int *t3, int *t4, int *t5) { // Initialize a new mesh structure void triload(const string& basename) { string nodename, elename; - Point3D node1, node2; + Point3D node1, node2, p; triangle tri; int nodecount, tricount, dim, junk1, junk2; int i; @@ -163,8 +163,13 @@ void triload(const string& basename) { node_in.stream() >> junk1 >> node1 >> junk2; nodes_orig.push_back(node1); // printf("%d %.2f %.2f %.2f\n", junk1, node1.x, node1.y, node1.z); + + // convert to radians (before we can convert to cartesian) + p = Point3D( node1.x() * ARCSEC_TO_RAD, + node1.y() * ARCSEC_TO_RAD, + node1.z() ); - node2 = fgGeodToCart(node1); + node2 = fgGeodToCart(p); nodes_cart.push_back(node2); // printf("%d %.2f %.2f %.2f\n", junk1, node2.x, node2.y, node2.z); @@ -611,6 +616,9 @@ int main(int argc, char **argv) { // $Log$ +// Revision 1.6 1998/10/21 14:56:20 curt +// Fixed a units conversion bug. +// // Revision 1.5 1998/10/20 15:50:33 curt // whitespace tweak. // -- 2.39.2