Print out values in degrees

feature/19
Daniel Warner 2011-05-27 01:41:56 +01:00
parent 4be78ea488
commit 9ec7e5a951
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,7 @@
#include "CoordGeodetic.h"
#include "Globals.h"
#include <sstream>
#include <iomanip>
@ -46,8 +48,8 @@ bool CoordGeodetic::operator !=(const CoordGeodetic& b) const {
std::ostream& operator<< (std::ostream& stream, const CoordGeodetic& geo) {
std::stringstream out;
out << std::right << std::fixed << std::setprecision(2);
out << "Lat: " << std::setw(7) << geo.latitude;
out << ", Lon: " << std::setw(7) << geo.longitude;
out << "Lat: " << std::setw(7) << RadiansToDegrees(geo.latitude);
out << ", Lon: " << std::setw(7) << RadiansToDegrees(geo.longitude);
out << ", Alt: " << std::setw(9) << geo.altitude;
stream << out.str();
return stream;

View File

@ -1,5 +1,7 @@
#include "CoordTopographic.h"
#include "Globals.h"
#include <sstream>
#include <iomanip>
@ -50,8 +52,8 @@ bool CoordTopographic::operator !=(const CoordTopographic& b) const {
std::ostream& operator<< (std::ostream& stream, const CoordTopographic& topo) {
std::stringstream out;
out << std::right << std::fixed << std::setprecision(2);
out << "Az: " << std::setw(7) << topo.azimuth;
out << ", El: " << std::setw(7) << topo.elevation;
out << "Az: " << std::setw(7) << RadiansToDegrees(topo.azimuth);
out << ", El: " << std::setw(7) << RadiansToDegrees(topo.elevation);
out << ", Range: " << std::setw(9) << topo.range;
out << ", RangeRate: " << std::setw(6) << topo.range_rate;
stream << out.str();