Kstars

obsconditions.h
1/*
2 SPDX-FileCopyrightText: 2012 Samikshan Bairagya <samikshan@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kstarsdata.h"
10
11/**
12 * @class ObsConditions
13 *
14 * This class deals with the observing conditions of the night sky.
15 * The limiting magnitude is calculated depending on the equipment
16 * available to the user and the amount of light-pollution in the
17 * user's current observing location.
18 *
19 * @author Samikshan Bairagya
20 */
22{
23 public:
24 /**
25 * @enum Equipment
26 *
27 * Equipment available to the user.
28 */
30 {
31 Telescope,
32 Binoculars,
33 Both,
34 None
35 };
36
37 /**
38 * @enum TelescopeType
39 *
40 * Telescope Type (Reflector/Refractor)
41 */
43 {
44 Reflector = 0,
45 Refractor,
46 Invalid
47 };
48
49 /**
50 * @brief Constructor
51 *
52 * @param bortle Rating of light pollution based on the bortle dark-sky scale.
53 * @param aperture Aperture of equipment.
54 * @param equip Equipment available to the user.
55 * @param telType Reflector/Refractor type of telescope (if available)
56 */
57 ObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType);
58
59 ~ObsConditions() = default;
60
61 /** Inline method to set available equipment */
62 inline void setEquipment(Equipment equip) { m_Equip = equip; }
63
64 /** Inline method to set reflector/refractor type for telescope. */
65 inline void setTelescopeType(TelescopeType telType) { m_TelType = telType; }
66
67 /** Set limiting magnitude depending on Bortle dark-sky rating. */
68 void setLimMagnitude();
69
70 /** Set new observing conditions. */
71 void setObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType);
72
73 /**
74 * @brief Get optimum magnification under current observing conditions.
75 *
76 * @return Get optimum magnification under current observing conditions
77 */
78 double getOptimumMAG();
79
80 /**
81 * @brief Get true limiting magnitude after taking equipment specifications into consideration.
82 *
83 * @return True limiting magnitude after taking equipment specifications into consideration.
84 */
85 double getTrueMagLim();
86
87 /**
88 * @brief Evaluate visibility of sky-object based on current observing conditions.
89 *
90 * @param geo Geographic location of user.
91 * @param lst Local standard time expressed as a dms object.
92 * @param so SkyObject for which visibility is to be evaluated.
93 * @return Visibility of sky-object based on current observing conditions as a boolean.
94 */
95 bool isVisible(GeoLocation *geo, dms *lst, SkyObject *so);
96
97 /**
98 * @brief Create QMap<int, double> to be initialised to static member variable m_LMMap
99 *
100 * @return QMap<int, double> to be initialised to static member variable m_LMMap
101 */
103
104 private:
105 /// Bortle dark-sky rating (from 1-9)
106 int m_BortleClass { 0 };
107 /// Equipment type
108 Equipment m_Equip;
109 /// Telescope type
110 TelescopeType m_TelType;
111 /// Aperture of equipment
112 double m_Aperture { 0 };
113 /// t-parameter corresponding to telescope type
114 double m_tParam { 0 };
115 /// Naked-eye limiting magnitude depending on m_BortleClass
116 double m_LM { 0 };
117 /// Lookup table mapping Bortle Scale values to corresponding limiting magnitudes
118 static const QMap<int, double> m_LMMap;
119};
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
This class deals with the observing conditions of the night sky.
void setObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType)
Set new observing conditions.
ObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType)
Constructor.
static QMap< int, double > setLMMap()
Create QMap<int, double> to be initialised to static member variable m_LMMap.
Equipment
Equipment available to the user.
double getOptimumMAG()
Get optimum magnification under current observing conditions.
void setTelescopeType(TelescopeType telType)
Inline method to set reflector/refractor type for telescope.
bool isVisible(GeoLocation *geo, dms *lst, SkyObject *so)
Evaluate visibility of sky-object based on current observing conditions.
TelescopeType
Telescope Type (Reflector/Refractor)
double getTrueMagLim()
Get true limiting magnitude after taking equipment specifications into consideration.
void setEquipment(Equipment equip)
Inline method to set available equipment.
void setLimMagnitude()
Set limiting magnitude depending on Bortle dark-sky rating.
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.