Kstars

gpg.h
1/*
2 SPDX-FileCopyrightText: 2020 Hy Murveit <hy@murveit.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "vect.h"
10#include "indi/indicommon.h"
11#include "MPI_IS_gaussian_process/src/gaussian_process_guider.h"
12#include "ekos_guide_debug.h"
13class GuideStars;
15class Calibration;
16
17// This is a wrapper class around the GaussianProcessGuider contributed class
18// to make integration with EKos easier.
19class GPG
20{
21 public:
22 GPG();
23 ~GPG() {}
24
25 // Reads parameters from Options, and updates the GPG.
26 void updateParameters();
27
28 // Restarts the gpg.
29 void reset();
30
31 // Should be called when dithering starts.
32 // Inputs are pixel offsets in camera coordinates.
33 void startDithering(double dx, double dy, const Calibration &cal);
34
35 // Should be called after dithering is done.
36 // Indicated whether dithering settled or not.
37 void ditheringSettled(bool success);
38
39 // Should be called while suspended, at the point when
40 // guiding would normally occur. GPG gets updated but does not
41 // emit a pulse.
42 void suspended(const GuiderUtils::Vector &guideStarPosition,
43 const GuiderUtils::Vector &reticlePosition,
44 GuideStars *guideStars,
45 const Calibration &cal);
46
47 // Compute the RA pulse for guiding.
48 // Returns false if it chooses not to compute a pulse.
49 bool computePulse(double raArcsecError, GuideStars *guideStars,
50 int *pulseLength, GuideDirection *pulseDir,
51 const Calibration &cal, Seconds timeStep);
52
53 double predictionContribution();
54
55
56 // Compute dark guiding RA pulse.
57 // Returns false if it chooses not to compute a pulse.
58 bool darkGuiding(int *pulseLength, GuideDirection *pulseDir,
59 const Calibration &cal, Seconds timeStep);
60
61 private:
62 std::unique_ptr<GaussianProcessGuider> gpg;
63 int gpgSamples = 0;
64 int gpgSkippedSamples = 0;
65 // Converts the gpg output to pulse milliseconds
66 double convertCorrectionToPulseMilliseconds(const Calibration &cal, int *pulseLength, GuideDirection *pulseDir, const double gpgResult);
67};
This class provides a guiding algorithm for the right ascension axis that learns and predicts the per...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:02 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.