Initial stellarsolver implementation

This commit is contained in:
2024-09-17 23:05:27 +02:00
parent 30960033c5
commit da79197376
11 changed files with 182 additions and 35 deletions
+7 -7
View File
@@ -98,14 +98,14 @@ void ImageInfo::setInfo(const ImageInfoData &info)
expandAll();
}
void WCSData::freeWCS()
void WCSDataT::freeWCS()
{
wcsvfree(&nwcs, &wcs);
nwcs = 0;
wcs = nullptr;
}
WCSData::WCSData(int width, int height, char *header, int nrec) :
WCSDataT::WCSDataT(int width, int height, char *header, int nrec) :
width(width),
height(height)
{
@@ -121,7 +121,7 @@ WCSData::WCSData(int width, int height, char *header, int nrec) :
freeWCS();
}
WCSData::WCSData(int width, int height, const QVector<FITSRecord> &header) :
WCSDataT::WCSDataT(int width, int height, const QVector<FITSRecord> &header) :
width(width),
height(height)
{
@@ -156,13 +156,13 @@ WCSData::WCSData(int width, int height, const QVector<FITSRecord> &header) :
freeWCS();
}
WCSData::~WCSData()
WCSDataT::~WCSDataT()
{
if(wcs)
freeWCS();
}
bool WCSData::pixelToWorld(const QPointF &pixel, SkyPoint &point) const
bool WCSDataT::pixelToWorld(const QPointF &pixel, SkyPoint &point) const
{
if(!valid())return false;
@@ -181,7 +181,7 @@ bool WCSData::pixelToWorld(const QPointF &pixel, SkyPoint &point) const
return false;
}
bool WCSData::worldToPixel(const SkyPoint &point, QPointF &pixel) const
bool WCSDataT::worldToPixel(const SkyPoint &point, QPointF &pixel) const
{
if(!valid())return false;
@@ -200,7 +200,7 @@ bool WCSData::worldToPixel(const SkyPoint &point, QPointF &pixel) const
return false;
}
void WCSData::calculateBounds(double &minRa, double &maxRa, double &minDec, double &maxDec, double &crVal1, double &crVal2) const
void WCSDataT::calculateBounds(double &minRa, double &maxRa, double &minDec, double &maxDec, double &crVal1, double &crVal2) const
{
if(wcs == nullptr)return;