diff options
Diffstat (limited to 'tksao')
-rw-r--r-- | tksao/frame/projection.C | 28 | ||||
-rw-r--r-- | tksao/frame/vect.C | 24 |
2 files changed, 12 insertions, 40 deletions
diff --git a/tksao/frame/projection.C b/tksao/frame/projection.C index e294921..8a3c629 100644 --- a/tksao/frame/projection.C +++ b/tksao/frame/projection.C @@ -352,27 +352,13 @@ void Projection::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, default: if (ptr->hasWCSCel(sys)) { double ww = ptr->mapLenFromRef(width,sys,Coord::ARCSEC); - switch (format) { - case Coord::DEGREES: - { - Vector v1 = ptr->mapFromRef(p1,sys,sky); - Vector v2 = ptr->mapFromRef(p2,sys,sky); - str << type_ << '(' - << setprecision(10) << v1 << ',' << v2 << ',' - << setprecision(3) << fixed << ww << '"' << ')'; - str.unsetf(ios_base::floatfield); - } - break; - case Coord::SEXAGESIMAL: - str << type_ << '('; - listRADEC(ptr,p1,sys,sky,format); - str << ra << ',' << dec << ','; - listRADEC(ptr,p2,sys,sky,format); - str << ra << ',' << dec << ','; - str << setprecision(3) << fixed << ww << '"' << ')'; - str.unsetf(ios_base::floatfield); - break; - } + str << type_ << '('; + listRADEC(ptr,p1,sys,sky,format); + str << ra << ',' << dec << ','; + listRADEC(ptr,p2,sys,sky,format); + str << ra << ',' << dec << ','; + str << setprecision(3) << fixed << ww << '"' << ')'; + str.unsetf(ios_base::floatfield); } else listNonCel(ptr, str, sys); diff --git a/tksao/frame/vect.C b/tksao/frame/vect.C index 0c2bcb5..008249c 100644 --- a/tksao/frame/vect.C +++ b/tksao/frame/vect.C @@ -68,27 +68,13 @@ void Vect::list(ostream& str, Coord::CoordSystem sys, Coord::SkyFrame sky, break; default: if (ptr->hasWCSCel(sys)) { + listRADEC(ptr,p1,sys,sky,format); double rr = ptr->mapLenFromRef((p2-p1).length(),sys,Coord::ARCSEC); double aa = parent->mapAngleFromRef((p2-p1).angle(),sys,sky); - switch (format) { - case Coord::DEGREES: - { - Vector v1 = ptr->mapFromRef(p1,sys,sky); - str << type_ << '(' - << setprecision(10) << v1 << ',' - << setprecision(3) << fixed << rr << '"' << ','; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(aa) << ')'; - } - break; - case Coord::SEXAGESIMAL: - listRADEC(ptr,p1,sys,sky,format); - str << type_ << '(' << ra << ',' << dec << ',' - << setprecision(3) << fixed << rr << '"' << ','; - str.unsetf(ios_base::floatfield); - str << setprecision(8) << radToDeg(aa) << ')'; - break; - } + str << type_ << '(' << ra << ',' << dec << ',' + << setprecision(3) << fixed << rr << '"' << ','; + str.unsetf(ios_base::floatfield); + str << setprecision(8) << radToDeg(aa) << ')'; } else listNonCel(ptr, str, sys); |