Kstars

guideinterface.cpp
1 /*
2  SPDX-FileCopyrightText: 2012 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "guideinterface.h"
8 
9 #include "guide.h"
10 
11 #define MAX_GUIDE_STARS 10
12 
13 namespace Ekos
14 {
15 bool GuideInterface::setGuiderParams(double ccdPixelSizeX, double ccdPixelSizeY, double mountAperture,
16  double mountFocalLength)
17 {
18  this->ccdPixelSizeX = ccdPixelSizeX;
19  this->ccdPixelSizeY = ccdPixelSizeY;
20  this->mountAperture = mountAperture;
21  this->mountFocalLength = mountFocalLength;
22 
23  return true;
24 }
25 
26 bool GuideInterface::getGuiderParams(double *ccdPixelSizeX, double *ccdPixelSizeY, double *mountAperture,
27  double *mountFocalLength)
28 {
29  *ccdPixelSizeX = this->ccdPixelSizeX;
30  *ccdPixelSizeY = this->ccdPixelSizeY;
31  *mountAperture = this->mountAperture;
32  *mountFocalLength = this->mountFocalLength;
33 
34  return true;
35 }
36 
37 bool GuideInterface::setFrameParams(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t binX, uint16_t binY)
38 {
39  if (w <= 0 || h <= 0)
40  return false;
41 
42  subX = x;
43  subY = y;
44  subW = w;
45  subH = h;
46 
47  subBinX = binX;
48  subBinY = binY;
49 
50  return true;
51 }
52 
53 bool GuideInterface::getFrameParams(uint16_t *x, uint16_t *y, uint16_t *w, uint16_t *h, uint16_t *binX, uint16_t *binY)
54 {
55  *x = subX;
56  *y = subY;
57  *w = subW;
58  *h = subH;
59 
60  *binX = subBinX;
61  *binY = subBinY;
62 
63  return true;
64 }
65 
66 void GuideInterface::setStarPosition(QVector3D &starCenter)
67 {
68  INDI_UNUSED(starCenter);
69 }
70 
71 void GuideInterface::setMountCoords(const SkyPoint &position, ISD::Mount::PierSide side)
72 {
73  mountRA = position.ra();
74  mountDEC = position.dec();
75  mountAzimuth = position.az();
76  mountAltitude = position.alt();
77  pierSide = side;
78 }
79 
80 void GuideInterface::setPierSide(ISD::Mount::PierSide newSide)
81 {
82  pierSide = newSide;
83 }
84 
85 }
const dms & alt() const
Definition: skypoint.h:281
Ekos is an advanced Astrophotography tool for Linux. It is based on a modular extensible framework to...
Definition: align.cpp:70
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
const CachingDms & dec() const
Definition: skypoint.h:269
const CachingDms & ra() const
Definition: skypoint.h:263
const dms & az() const
Definition: skypoint.h:275
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.