File indexing completed on 2025-01-19 09:46:44
0001 /* 0002 SPDX-FileCopyrightText: 2020 Chris Rowland <chris.rowland@cherryfield.me.uk> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef TEST_POLEAXIS_H 0008 #define TEST_POLEAXIS_H 0009 0010 #include <QTest> 0011 #include <QDebug> 0012 #include <QString> 0013 0014 #define UNIT_TEST 0015 0016 #include "../../kstars/ekos/align/poleaxis.h" 0017 0018 /** 0019 * @class TestPoleAxis 0020 * @short Tests for some polar align operations 0021 * @author Chris Rowland 0022 */ 0023 0024 class TestPoleAxis : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 TestPoleAxis(); 0030 ~TestPoleAxis() override; 0031 0032 private slots: 0033 void testDirCos_data(); 0034 void testDirCos(); 0035 void testPriSec_data(); 0036 void testPriSec(); 0037 void testPoleAxis_data(); 0038 void testPoleAxis(); 0039 0040 private: 0041 void compare(Rotations::V3 v, double x, double y, double z); 0042 void compare(double a, double e, QString msg = ""); 0043 void compare(float a, double e, QString msg = "") 0044 { 0045 compare (static_cast<double>(a), e, msg); 0046 } 0047 0048 }; 0049 0050 0051 #endif