Commit 2587c4f6 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Draw J2000 coords

parent d1cb70fb
......@@ -306,21 +306,41 @@ void SkyMapDrawAbstract::drawTelescopeSymbols(QPainter &psky)
if (coordNP == nullptr)
{
coordNP = bd->getNumber("HORIZONTAL_COORD");
if (coordNP == nullptr)
continue;
else
coordNP = bd->getNumber("EQUATORIAL_COORD");
if (coordNP)
{
INumber *np = IUFindNumber(coordNP, "AZ");
INumber *np = IUFindNumber(coordNP, "RA");
if (np == nullptr)
continue;
indi_sp.setAz(np->value);
indi_sp.setRA(np->value);
indi_sp.setRA0(np->value);
np = IUFindNumber(coordNP, "ALT");
np = IUFindNumber(coordNP, "DEC");
if (np == nullptr)
continue;
indi_sp.setAlt(np->value);
indi_sp.HorizontalToEquatorial(m_KStarsData->lst(), m_KStarsData->geo()->lat());
indi_sp.setDec(np->value);
indi_sp.setDec0(np->value);
indi_sp.apparentCoord(static_cast<long double>(J2000), KStars::Instance()->data()->ut().djd());
}
else
{
coordNP = bd->getNumber("HORIZONTAL_COORD");
if (coordNP == nullptr)
continue;
else
{
INumber *np = IUFindNumber(coordNP, "AZ");
if (np == nullptr)
continue;
indi_sp.setAz(np->value);
np = IUFindNumber(coordNP, "ALT");
if (np == nullptr)
continue;
indi_sp.setAlt(np->value);
indi_sp.HorizontalToEquatorial(m_KStarsData->lst(), m_KStarsData->geo()->lat());
}
}
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment