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
+6 -6
View File
@@ -359,7 +359,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
fits_get_num_hdus(file, &num, &status);
if(status)
{
_engine->newMessage("Failed to open FITS file", true);
if(_engine)_engine->newMessage("Failed to open FITS file", true);
return false;
}
int imgtype;
@@ -412,7 +412,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
break;
}
default:
_engine->newMessage("Unknown type for KEY " + record.key, true);
if(_engine)_engine->newMessage("Unknown type for KEY " + record.key, true);
return false;
break;
}
@@ -420,7 +420,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
{
char error[100];
fits_get_errstatus(status, error);
_engine->newMessage(QString("Error when updating KEY %1 %2").arg(record.key).arg(error), true);
if(_engine)_engine->newMessage(QString("Error when updating KEY %1 %2").arg(record.key).arg(error), true);
return false;
}
}
@@ -456,7 +456,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
break;
}
default:
_engine->newMessage("Unknown type for KEY " + record.key, true);
if(_engine)_engine->newMessage("Unknown type for KEY " + record.key, true);
return false;
break;
}
@@ -464,7 +464,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
{
char error[100];
fits_get_errstatus(status, error);
_engine->newMessage(QString("Error when adding KEY {} {}").arg(record.key).arg(error), true);
if(_engine)_engine->newMessage(QString("Error when adding KEY {} {}").arg(record.key).arg(error), true);
return false;
}
}
@@ -496,7 +496,7 @@ bool File::modifyFITSRecords(const FITSRecordModify *modify)
}
catch(LibXISF::Error &err)
{
_engine->newMessage("Failed to modify file " + _path + " " + err.what(), true);
if(_engine)_engine->newMessage("Failed to modify file " + _path + " " + err.what(), true);
return false;
}
}