Skip to content
Snippets Groups Projects
Commit e719f97a authored by Oliver Bock's avatar Oliver Bock
Browse files

Fixed search marker positioning

* Arguments need to be passed in degrees not radians
* Conversion is done right after shared memory parsing (we only need degrees anyway)
parent 41df1f9c
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,11 @@ void EinsteinS5R3Adapter::parseApplicationInformation()
{
cerr << "Incompatible shared memory data encountered!" << endl;
}
else {
// convert radians to degrees
m_WUSkyPosRightAscension *= 180/PI;
m_WUSkyPosDeclination *= 180/PI;
}
}
}
......
......@@ -7,6 +7,8 @@
using namespace std;
#define PI 3.14159265
/**
* \brief Adapter class which facilitates communications with the \b Einstein\@Home S5R3 application
*
......@@ -42,14 +44,14 @@ public:
/**
* \brief Retrieves the right ascension of the currently searched sky position
*
* \return The right ascension (in radians)
* \return The right ascension (in degrees)
*/
double wuSkyPosRightAscension() const;
/**
* \brief Retrieves the declination of the currently searched sky position
*
* \return The right ascension (in radians)
* \return The right ascension (in degrees)
*/
double wuSkyPosDeclination() const;
......@@ -83,10 +85,10 @@ private:
/// Pointer to the (parent) BOINC client adapter
BOINCClientAdapter *boincClient;
/// Right ascension of the currently searched sky position
/// Right ascension of the currently searched sky position (in degrees)
double m_WUSkyPosRightAscension;
/// Declination of the currently searched sky position
/// Declination of the currently searched sky position (in degrees)
double m_WUSkyPosDeclination;
/// The completion fraction of the active work unit
......
......@@ -54,7 +54,7 @@ void StarsphereS5R3::refreshBOINCInformation()
// we've got a new position, update search marker and HUD
m_CurrentRightAscension = m_EinsteinAdapter.wuSkyPosRightAscension();
m_RefreshSearchMarker = true;
buffer << "Ascension: " << fixed << m_CurrentRightAscension * 360/PI2 << " deg" << ends;
buffer << "Ascension: " << fixed << m_CurrentRightAscension << " deg" << ends;
m_WUSkyPosRightAscension = buffer.str();
buffer.str("");
}
......@@ -63,7 +63,7 @@ void StarsphereS5R3::refreshBOINCInformation()
// we've got a new position, update search marker and HUD
m_CurrentDeclination = m_EinsteinAdapter.wuSkyPosDeclination();
m_RefreshSearchMarker = true;
buffer << "Declination: " << fixed << m_CurrentDeclination * 360/PI2 << " deg" << ends;
buffer << "Declination: " << fixed << m_CurrentDeclination << " deg" << ends;
m_WUSkyPosDeclination = buffer.str();
buffer.str("");
}
......
......@@ -79,10 +79,10 @@ private:
/// Specialized BOINC client adapter instance for information retrieval
EinsteinS5R3Adapter m_EinsteinAdapter;
/// Local copy of the current WU's search parameter "Right-Ascension"
/// Local copy of the current WU's search parameter "Right-Ascension" (degrees)
string m_WUSkyPosRightAscension;
/// Local copy of the current WU's search parameter "Declination"
/// Local copy of the current WU's search parameter "Declination" (degrees)
string m_WUSkyPosDeclination;
/// Local copy of the current WU's search parameter "Percent done"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment