9#include <gsl/gsl_fit.h>
10#include <gsl/gsl_vector.h>
11#include <gsl/gsl_matrix.h>
12#include <gsl/gsl_multifit.h>
18const QString getGuideStatusString(GuideState state,
bool translated)
20 return translated ? guideStates[state].toString() : guideStates[state].untranslatedText();
22const QString getCaptureStatusString(CaptureState state,
bool translated)
24 return translated ? captureStates[state].toString() : captureStates[state].untranslatedText();
26const QString getFocusStatusString(FocusState state,
bool translated)
28 return translated ? focusStates[state].toString() : focusStates[state].untranslatedText();
30const QString getAlignStatusString(AlignState state,
bool translated)
32 return translated ? alignStates[state].toString() : alignStates[state].untranslatedText();
34const QString getFilterStatusString(FilterState state,
bool translated)
36 return translated ? filterStates[state].toString() : filterStates[state].untranslatedText();
40 return translated ? schedulerStates[state].toString() : schedulerStates[state].untranslatedText();
44std::vector<double> gsl_polynomial_fit(
const double *
const data_x,
const double *
const data_y,
const int n,
45 const int order,
double &chisq)
48 std::vector<double> vc;
51 y = gsl_vector_alloc(n);
52 c = gsl_vector_alloc(order + 1);
53 X = gsl_matrix_alloc(n, order + 1);
54 cov = gsl_matrix_alloc(order + 1, order + 1);
56 for (
int i = 0; i < n; i++)
58 for (
int j = 0; j < order + 1; j++)
60 gsl_matrix_set(X, i, j, pow(data_x[i], j));
62 gsl_vector_set(y, i, data_y[i]);
66 gsl_set_error_handler_off();
68 gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc(n, order + 1);
69 status = gsl_multifit_linear(X, y, c, cov, &chisq, work);
71 if (status != GSL_SUCCESS)
73 qDebug() << Q_FUNC_INFO <<
"GSL multifit error:" << gsl_strerror(status);
77 gsl_multifit_linear_free(work);
79 for (
int i = 0; i < order + 1; i++)
81 vc.push_back(gsl_vector_get(c, i));
96 argument << static_cast<int>(source);
107 dest =
static_cast<Ekos::CommunicationStatus
>(a);
114 argument << static_cast<int>(source);
132 argument << static_cast<int>(source);
143 dest =
static_cast<Ekos::FocusState
>(a);
150 argument << static_cast<int>(source);
161 dest =
static_cast<Ekos::GuideState
>(a);
168 argument << static_cast<int>(source);
186 argument << static_cast<int>(source);
197 dest =
static_cast<Ekos::SchedulerState
>(a);
The SchedulerState class holds all attributes defining the scheduler's state.
Ekos is an advanced Astrophotography tool for Linux.
CaptureState
Capture states.
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
NETWORKMANAGERQT_EXPORT NetworkManager::Status status()