Merge lp:~daggerstab/stellarium/observability-cleanup into lp:stellarium
- observability-cleanup
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~daggerstab/stellarium/observability-cleanup |
Merge into: | lp:stellarium |
Diff against target: |
5527 lines (+3310/-1334) 8 files modified
.bzrignore (+1/-0) plugins/Observability/CMakeLists.txt (+1/-1) plugins/Observability/Doxyfile (+1902/-0) plugins/Observability/src/Observability.cpp (+870/-834) plugins/Observability/src/Observability.hpp (+202/-108) plugins/Observability/src/gui/ObservabilityDialog.cpp (+96/-130) plugins/Observability/src/gui/ObservabilityDialog.hpp (+11/-19) plugins/Observability/src/gui/ObservabilityDialog.ui (+227/-242) |
To merge this branch: | bzr merge lp:~daggerstab/stellarium/observability-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexander Wolf | Needs Fixing | ||
Review via email: mp+213388@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-04-04.
Commit message
Description of the change
This is my unfinished cleanup of the Observability plugin. I don't have time to finish it right now because of other Stellarium work, but the more time it sits as a separate branch, the more painful is synchronizing it with the trunk.
I had plans for this, but they'll have to stay on the backburner. I underestimated how much of a mess is the code and how hard it is to read unfamiliar mathematics from code.
Please test - I haven't had the time to do much testing. There's a number of TODOs left which I probably shouldn't have ignored.
Bogdan Marinov (daggerstab) wrote : | # |
Question: How should I test for that? Is this a difference between the cleaned-up and the trunk version of the plug-in, or a difference between the cleaned-up version and some other source?
Bogdan Marinov (daggerstab) wrote : | # |
I can confirm a disparity between the trunk branch and this version: it looks like something is wrong with the rise/set times for planets (but not stars). Not only the ones in the cleanup version don't match the ones from the trunk, they also seem to be a function of the current time. That is, if you stop the time, open the observability report for a given object and then advance the time with hours/minutes, you'll notice that the rise/set time changes accordingly.
I'll try to fix this and resubmit the proposal.
- 6172. By Bogdan Marinov
-
fixed the problem with planet rise/set times
- 6173. By Bogdan Marinov
-
StelButton copies the pixmaps and the files are embedded, so...
Unmerged revisions
Preview Diff
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2013-12-22 09:33:49 +0000 |
3 | +++ .bzrignore 2014-04-04 19:35:45 +0000 |
4 | @@ -12,3 +12,4 @@ |
5 | ./util/locations-editor/locations-editor.pro.user |
6 | ./util/copy-translations.bat |
7 | build |
8 | +./plugins/Observability/doc |
9 | |
10 | === modified file 'plugins/Observability/CMakeLists.txt' |
11 | --- plugins/Observability/CMakeLists.txt 2013-07-23 20:06:05 +0000 |
12 | +++ plugins/Observability/CMakeLists.txt 2014-04-04 19:35:45 +0000 |
13 | @@ -1,4 +1,4 @@ |
14 | -SET(OBSERVABILITY_VERSION "1.1.1") |
15 | +SET(OBSERVABILITY_VERSION "1.2.0") |
16 | |
17 | IF(APPLE) |
18 | SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/Library/Application\ Support/Stellarium) |
19 | |
20 | === added file 'plugins/Observability/Doxyfile' |
21 | --- plugins/Observability/Doxyfile 1970-01-01 00:00:00 +0000 |
22 | +++ plugins/Observability/Doxyfile 2014-04-04 19:35:45 +0000 |
23 | @@ -0,0 +1,1902 @@ |
24 | +# Doxyfile 1.8.3.1 |
25 | + |
26 | +# This file describes the settings to be used by the documentation system |
27 | +# doxygen (www.doxygen.org) for a project |
28 | +# |
29 | +# All text after a hash (#) is considered a comment and will be ignored |
30 | +# The format is: |
31 | +# TAG = value [value, ...] |
32 | +# For lists items can also be appended using: |
33 | +# TAG += value [value, ...] |
34 | +# Values that contain spaces should be placed between quotes (" ") |
35 | + |
36 | +#--------------------------------------------------------------------------- |
37 | +# Project related configuration options |
38 | +#--------------------------------------------------------------------------- |
39 | + |
40 | +# This tag specifies the encoding used for all characters in the config file |
41 | +# that follow. The default is UTF-8 which is also the encoding used for all |
42 | +# text before the first occurrence of this tag. Doxygen uses libiconv (or the |
43 | +# iconv built into libc) for the transcoding. See |
44 | +# http://www.gnu.org/software/libiconv for the list of possible encodings. |
45 | + |
46 | +DOXYFILE_ENCODING = UTF-8 |
47 | + |
48 | +# The PROJECT_NAME tag is a single word (or sequence of words) that should |
49 | +# identify the project. Note that if you do not use Doxywizard you need |
50 | +# to put quotes around the project name if it contains spaces. |
51 | + |
52 | +PROJECT_NAME = "Observability Analysis plug-in" |
53 | + |
54 | +# The PROJECT_NUMBER tag can be used to enter a project or revision number. |
55 | +# This could be handy for archiving the generated documentation or |
56 | +# if some version control system is used. |
57 | + |
58 | +PROJECT_NUMBER = |
59 | + |
60 | +# Using the PROJECT_BRIEF tag one can provide an optional one line description |
61 | +# for a project that appears at the top of each page and should give viewer |
62 | +# a quick idea about the purpose of the project. Keep the description short. |
63 | + |
64 | +PROJECT_BRIEF = |
65 | + |
66 | +# With the PROJECT_LOGO tag one can specify an logo or icon that is |
67 | +# included in the documentation. The maximum height of the logo should not |
68 | +# exceed 55 pixels and the maximum width should not exceed 200 pixels. |
69 | +# Doxygen will copy the logo to the output directory. |
70 | + |
71 | +PROJECT_LOGO = |
72 | + |
73 | +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) |
74 | +# base path where the generated documentation will be put. |
75 | +# If a relative path is entered, it will be relative to the location |
76 | +# where doxygen was started. If left blank the current directory will be used. |
77 | + |
78 | +OUTPUT_DIRECTORY = doc |
79 | + |
80 | +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create |
81 | +# 4096 sub-directories (in 2 levels) under the output directory of each output |
82 | +# format and will distribute the generated files over these directories. |
83 | +# Enabling this option can be useful when feeding doxygen a huge amount of |
84 | +# source files, where putting all generated files in the same directory would |
85 | +# otherwise cause performance problems for the file system. |
86 | + |
87 | +CREATE_SUBDIRS = NO |
88 | + |
89 | +# The OUTPUT_LANGUAGE tag is used to specify the language in which all |
90 | +# documentation generated by doxygen is written. Doxygen will use this |
91 | +# information to generate all constant output in the proper language. |
92 | +# The default language is English, other supported languages are: |
93 | +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, |
94 | +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, |
95 | +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English |
96 | +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, |
97 | +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, |
98 | +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. |
99 | + |
100 | +OUTPUT_LANGUAGE = English |
101 | + |
102 | +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will |
103 | +# include brief member descriptions after the members that are listed in |
104 | +# the file and class documentation (similar to JavaDoc). |
105 | +# Set to NO to disable this. |
106 | + |
107 | +BRIEF_MEMBER_DESC = YES |
108 | + |
109 | +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend |
110 | +# the brief description of a member or function before the detailed description. |
111 | +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the |
112 | +# brief descriptions will be completely suppressed. |
113 | + |
114 | +REPEAT_BRIEF = YES |
115 | + |
116 | +# This tag implements a quasi-intelligent brief description abbreviator |
117 | +# that is used to form the text in various listings. Each string |
118 | +# in this list, if found as the leading text of the brief description, will be |
119 | +# stripped from the text and the result after processing the whole list, is |
120 | +# used as the annotated text. Otherwise, the brief description is used as-is. |
121 | +# If left blank, the following values are used ("$name" is automatically |
122 | +# replaced with the name of the entity): "The $name class" "The $name widget" |
123 | +# "The $name file" "is" "provides" "specifies" "contains" |
124 | +# "represents" "a" "an" "the" |
125 | + |
126 | +ABBREVIATE_BRIEF = "The $name class" \ |
127 | + "The $name widget" \ |
128 | + "The $name file" \ |
129 | + is \ |
130 | + provides \ |
131 | + specifies \ |
132 | + contains \ |
133 | + represents \ |
134 | + a \ |
135 | + an \ |
136 | + the |
137 | + |
138 | +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then |
139 | +# Doxygen will generate a detailed section even if there is only a brief |
140 | +# description. |
141 | + |
142 | +ALWAYS_DETAILED_SEC = NO |
143 | + |
144 | +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all |
145 | +# inherited members of a class in the documentation of that class as if those |
146 | +# members were ordinary class members. Constructors, destructors and assignment |
147 | +# operators of the base classes will not be shown. |
148 | + |
149 | +INLINE_INHERITED_MEMB = NO |
150 | + |
151 | +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full |
152 | +# path before files name in the file list and in the header files. If set |
153 | +# to NO the shortest path that makes the file name unique will be used. |
154 | + |
155 | +FULL_PATH_NAMES = YES |
156 | + |
157 | +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag |
158 | +# can be used to strip a user-defined part of the path. Stripping is |
159 | +# only done if one of the specified strings matches the left-hand part of |
160 | +# the path. The tag can be used to show relative paths in the file list. |
161 | +# If left blank the directory from which doxygen is run is used as the |
162 | +# path to strip. Note that you specify absolute paths here, but also |
163 | +# relative paths, which will be relative from the directory where doxygen is |
164 | +# started. |
165 | + |
166 | +STRIP_FROM_PATH = |
167 | + |
168 | +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of |
169 | +# the path mentioned in the documentation of a class, which tells |
170 | +# the reader which header file to include in order to use a class. |
171 | +# If left blank only the name of the header file containing the class |
172 | +# definition is used. Otherwise one should specify the include paths that |
173 | +# are normally passed to the compiler using the -I flag. |
174 | + |
175 | +STRIP_FROM_INC_PATH = |
176 | + |
177 | +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter |
178 | +# (but less readable) file names. This can be useful if your file system |
179 | +# doesn't support long names like on DOS, Mac, or CD-ROM. |
180 | + |
181 | +SHORT_NAMES = NO |
182 | + |
183 | +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen |
184 | +# will interpret the first line (until the first dot) of a JavaDoc-style |
185 | +# comment as the brief description. If set to NO, the JavaDoc |
186 | +# comments will behave just like regular Qt-style comments |
187 | +# (thus requiring an explicit @brief command for a brief description.) |
188 | + |
189 | +JAVADOC_AUTOBRIEF = YES |
190 | + |
191 | +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will |
192 | +# interpret the first line (until the first dot) of a Qt-style |
193 | +# comment as the brief description. If set to NO, the comments |
194 | +# will behave just like regular Qt-style comments (thus requiring |
195 | +# an explicit \brief command for a brief description.) |
196 | + |
197 | +QT_AUTOBRIEF = YES |
198 | + |
199 | +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen |
200 | +# treat a multi-line C++ special comment block (i.e. a block of //! or /// |
201 | +# comments) as a brief description. This used to be the default behaviour. |
202 | +# The new default is to treat a multi-line C++ comment block as a detailed |
203 | +# description. Set this tag to YES if you prefer the old behaviour instead. |
204 | + |
205 | +MULTILINE_CPP_IS_BRIEF = NO |
206 | + |
207 | +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented |
208 | +# member inherits the documentation from any documented member that it |
209 | +# re-implements. |
210 | + |
211 | +INHERIT_DOCS = YES |
212 | + |
213 | +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce |
214 | +# a new page for each member. If set to NO, the documentation of a member will |
215 | +# be part of the file/class/namespace that contains it. |
216 | + |
217 | +SEPARATE_MEMBER_PAGES = NO |
218 | + |
219 | +# The TAB_SIZE tag can be used to set the number of spaces in a tab. |
220 | +# Doxygen uses this value to replace tabs by spaces in code fragments. |
221 | + |
222 | +TAB_SIZE = 4 |
223 | + |
224 | +# This tag can be used to specify a number of aliases that acts |
225 | +# as commands in the documentation. An alias has the form "name=value". |
226 | +# For example adding "sideeffect=\par Side Effects:\n" will allow you to |
227 | +# put the command \sideeffect (or @sideeffect) in the documentation, which |
228 | +# will result in a user-defined paragraph with heading "Side Effects:". |
229 | +# You can put \n's in the value part of an alias to insert newlines. |
230 | + |
231 | +ALIASES = |
232 | + |
233 | +# This tag can be used to specify a number of word-keyword mappings (TCL only). |
234 | +# A mapping has the form "name=value". For example adding |
235 | +# "class=itcl::class" will allow you to use the command class in the |
236 | +# itcl::class meaning. |
237 | + |
238 | +TCL_SUBST = |
239 | + |
240 | +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C |
241 | +# sources only. Doxygen will then generate output that is more tailored for C. |
242 | +# For instance, some of the names that are used will be different. The list |
243 | +# of all members will be omitted, etc. |
244 | + |
245 | +OPTIMIZE_OUTPUT_FOR_C = NO |
246 | + |
247 | +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java |
248 | +# sources only. Doxygen will then generate output that is more tailored for |
249 | +# Java. For instance, namespaces will be presented as packages, qualified |
250 | +# scopes will look different, etc. |
251 | + |
252 | +OPTIMIZE_OUTPUT_JAVA = NO |
253 | + |
254 | +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran |
255 | +# sources only. Doxygen will then generate output that is more tailored for |
256 | +# Fortran. |
257 | + |
258 | +OPTIMIZE_FOR_FORTRAN = NO |
259 | + |
260 | +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL |
261 | +# sources. Doxygen will then generate output that is tailored for |
262 | +# VHDL. |
263 | + |
264 | +OPTIMIZE_OUTPUT_VHDL = NO |
265 | + |
266 | +# Doxygen selects the parser to use depending on the extension of the files it |
267 | +# parses. With this tag you can assign which parser to use for a given |
268 | +# extension. Doxygen has a built-in mapping, but you can override or extend it |
269 | +# using this tag. The format is ext=language, where ext is a file extension, |
270 | +# and language is one of the parsers supported by doxygen: IDL, Java, |
271 | +# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, |
272 | +# C++. For instance to make doxygen treat .inc files as Fortran files (default |
273 | +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note |
274 | +# that for custom extensions you also need to set FILE_PATTERNS otherwise the |
275 | +# files are not read by doxygen. |
276 | + |
277 | +EXTENSION_MAPPING = |
278 | + |
279 | +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all |
280 | +# comments according to the Markdown format, which allows for more readable |
281 | +# documentation. See http://daringfireball.net/projects/markdown/ for details. |
282 | +# The output of markdown processing is further processed by doxygen, so you |
283 | +# can mix doxygen, HTML, and XML commands with Markdown formatting. |
284 | +# Disable only in case of backward compatibilities issues. |
285 | + |
286 | +MARKDOWN_SUPPORT = YES |
287 | + |
288 | +# When enabled doxygen tries to link words that correspond to documented classes, |
289 | +# or namespaces to their corresponding documentation. Such a link can be |
290 | +# prevented in individual cases by by putting a % sign in front of the word or |
291 | +# globally by setting AUTOLINK_SUPPORT to NO. |
292 | + |
293 | +AUTOLINK_SUPPORT = YES |
294 | + |
295 | +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want |
296 | +# to include (a tag file for) the STL sources as input, then you should |
297 | +# set this tag to YES in order to let doxygen match functions declarations and |
298 | +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. |
299 | +# func(std::string) {}). This also makes the inheritance and collaboration |
300 | +# diagrams that involve STL classes more complete and accurate. |
301 | + |
302 | +BUILTIN_STL_SUPPORT = NO |
303 | + |
304 | +# If you use Microsoft's C++/CLI language, you should set this option to YES to |
305 | +# enable parsing support. |
306 | + |
307 | +CPP_CLI_SUPPORT = NO |
308 | + |
309 | +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. |
310 | +# Doxygen will parse them like normal C++ but will assume all classes use public |
311 | +# instead of private inheritance when no explicit protection keyword is present. |
312 | + |
313 | +SIP_SUPPORT = NO |
314 | + |
315 | +# For Microsoft's IDL there are propget and propput attributes to indicate |
316 | +# getter and setter methods for a property. Setting this option to YES (the |
317 | +# default) will make doxygen replace the get and set methods by a property in |
318 | +# the documentation. This will only work if the methods are indeed getting or |
319 | +# setting a simple type. If this is not the case, or you want to show the |
320 | +# methods anyway, you should set this option to NO. |
321 | + |
322 | +IDL_PROPERTY_SUPPORT = YES |
323 | + |
324 | +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC |
325 | +# tag is set to YES, then doxygen will reuse the documentation of the first |
326 | +# member in the group (if any) for the other members of the group. By default |
327 | +# all members of a group must be documented explicitly. |
328 | + |
329 | +DISTRIBUTE_GROUP_DOC = NO |
330 | + |
331 | +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of |
332 | +# the same type (for instance a group of public functions) to be put as a |
333 | +# subgroup of that type (e.g. under the Public Functions section). Set it to |
334 | +# NO to prevent subgrouping. Alternatively, this can be done per class using |
335 | +# the \nosubgrouping command. |
336 | + |
337 | +SUBGROUPING = YES |
338 | + |
339 | +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and |
340 | +# unions are shown inside the group in which they are included (e.g. using |
341 | +# @ingroup) instead of on a separate page (for HTML and Man pages) or |
342 | +# section (for LaTeX and RTF). |
343 | + |
344 | +INLINE_GROUPED_CLASSES = NO |
345 | + |
346 | +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and |
347 | +# unions with only public data fields will be shown inline in the documentation |
348 | +# of the scope in which they are defined (i.e. file, namespace, or group |
349 | +# documentation), provided this scope is documented. If set to NO (the default), |
350 | +# structs, classes, and unions are shown on a separate page (for HTML and Man |
351 | +# pages) or section (for LaTeX and RTF). |
352 | + |
353 | +INLINE_SIMPLE_STRUCTS = NO |
354 | + |
355 | +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum |
356 | +# is documented as struct, union, or enum with the name of the typedef. So |
357 | +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct |
358 | +# with name TypeT. When disabled the typedef will appear as a member of a file, |
359 | +# namespace, or class. And the struct will be named TypeS. This can typically |
360 | +# be useful for C code in case the coding convention dictates that all compound |
361 | +# types are typedef'ed and only the typedef is referenced, never the tag name. |
362 | + |
363 | +TYPEDEF_HIDES_STRUCT = NO |
364 | + |
365 | +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to |
366 | +# determine which symbols to keep in memory and which to flush to disk. |
367 | +# When the cache is full, less often used symbols will be written to disk. |
368 | +# For small to medium size projects (<1000 input files) the default value is |
369 | +# probably good enough. For larger projects a too small cache size can cause |
370 | +# doxygen to be busy swapping symbols to and from disk most of the time |
371 | +# causing a significant performance penalty. |
372 | +# If the system has enough physical memory increasing the cache will improve the |
373 | +# performance by keeping more symbols in memory. Note that the value works on |
374 | +# a logarithmic scale so increasing the size by one will roughly double the |
375 | +# memory usage. The cache size is given by this formula: |
376 | +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, |
377 | +# corresponding to a cache size of 2^16 = 65536 symbols. |
378 | + |
379 | +SYMBOL_CACHE_SIZE = 0 |
380 | + |
381 | +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be |
382 | +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given |
383 | +# their name and scope. Since this can be an expensive process and often the |
384 | +# same symbol appear multiple times in the code, doxygen keeps a cache of |
385 | +# pre-resolved symbols. If the cache is too small doxygen will become slower. |
386 | +# If the cache is too large, memory is wasted. The cache size is given by this |
387 | +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, |
388 | +# corresponding to a cache size of 2^16 = 65536 symbols. |
389 | + |
390 | +LOOKUP_CACHE_SIZE = 0 |
391 | + |
392 | +#--------------------------------------------------------------------------- |
393 | +# Build related configuration options |
394 | +#--------------------------------------------------------------------------- |
395 | + |
396 | +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in |
397 | +# documentation are documented, even if no documentation was available. |
398 | +# Private class members and static file members will be hidden unless |
399 | +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES |
400 | + |
401 | +EXTRACT_ALL = YES |
402 | + |
403 | +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class |
404 | +# will be included in the documentation. |
405 | + |
406 | +EXTRACT_PRIVATE = YES |
407 | + |
408 | +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal |
409 | +# scope will be included in the documentation. |
410 | + |
411 | +EXTRACT_PACKAGE = NO |
412 | + |
413 | +# If the EXTRACT_STATIC tag is set to YES all static members of a file |
414 | +# will be included in the documentation. |
415 | + |
416 | +EXTRACT_STATIC = YES |
417 | + |
418 | +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) |
419 | +# defined locally in source files will be included in the documentation. |
420 | +# If set to NO only classes defined in header files are included. |
421 | + |
422 | +EXTRACT_LOCAL_CLASSES = YES |
423 | + |
424 | +# This flag is only useful for Objective-C code. When set to YES local |
425 | +# methods, which are defined in the implementation section but not in |
426 | +# the interface are included in the documentation. |
427 | +# If set to NO (the default) only methods in the interface are included. |
428 | + |
429 | +EXTRACT_LOCAL_METHODS = NO |
430 | + |
431 | +# If this flag is set to YES, the members of anonymous namespaces will be |
432 | +# extracted and appear in the documentation as a namespace called |
433 | +# 'anonymous_namespace{file}', where file will be replaced with the base |
434 | +# name of the file that contains the anonymous namespace. By default |
435 | +# anonymous namespaces are hidden. |
436 | + |
437 | +EXTRACT_ANON_NSPACES = NO |
438 | + |
439 | +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all |
440 | +# undocumented members of documented classes, files or namespaces. |
441 | +# If set to NO (the default) these members will be included in the |
442 | +# various overviews, but no documentation section is generated. |
443 | +# This option has no effect if EXTRACT_ALL is enabled. |
444 | + |
445 | +HIDE_UNDOC_MEMBERS = NO |
446 | + |
447 | +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all |
448 | +# undocumented classes that are normally visible in the class hierarchy. |
449 | +# If set to NO (the default) these classes will be included in the various |
450 | +# overviews. This option has no effect if EXTRACT_ALL is enabled. |
451 | + |
452 | +HIDE_UNDOC_CLASSES = NO |
453 | + |
454 | +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all |
455 | +# friend (class|struct|union) declarations. |
456 | +# If set to NO (the default) these declarations will be included in the |
457 | +# documentation. |
458 | + |
459 | +HIDE_FRIEND_COMPOUNDS = NO |
460 | + |
461 | +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any |
462 | +# documentation blocks found inside the body of a function. |
463 | +# If set to NO (the default) these blocks will be appended to the |
464 | +# function's detailed documentation block. |
465 | + |
466 | +HIDE_IN_BODY_DOCS = NO |
467 | + |
468 | +# The INTERNAL_DOCS tag determines if documentation |
469 | +# that is typed after a \internal command is included. If the tag is set |
470 | +# to NO (the default) then the documentation will be excluded. |
471 | +# Set it to YES to include the internal documentation. |
472 | + |
473 | +INTERNAL_DOCS = NO |
474 | + |
475 | +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate |
476 | +# file names in lower-case letters. If set to YES upper-case letters are also |
477 | +# allowed. This is useful if you have classes or files whose names only differ |
478 | +# in case and if your file system supports case sensitive file names. Windows |
479 | +# and Mac users are advised to set this option to NO. |
480 | + |
481 | +CASE_SENSE_NAMES = NO |
482 | + |
483 | +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen |
484 | +# will show members with their full class and namespace scopes in the |
485 | +# documentation. If set to YES the scope will be hidden. |
486 | + |
487 | +HIDE_SCOPE_NAMES = NO |
488 | + |
489 | +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen |
490 | +# will put a list of the files that are included by a file in the documentation |
491 | +# of that file. |
492 | + |
493 | +SHOW_INCLUDE_FILES = YES |
494 | + |
495 | +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen |
496 | +# will list include files with double quotes in the documentation |
497 | +# rather than with sharp brackets. |
498 | + |
499 | +FORCE_LOCAL_INCLUDES = NO |
500 | + |
501 | +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] |
502 | +# is inserted in the documentation for inline members. |
503 | + |
504 | +INLINE_INFO = YES |
505 | + |
506 | +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen |
507 | +# will sort the (detailed) documentation of file and class members |
508 | +# alphabetically by member name. If set to NO the members will appear in |
509 | +# declaration order. |
510 | + |
511 | +SORT_MEMBER_DOCS = YES |
512 | + |
513 | +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the |
514 | +# brief documentation of file, namespace and class members alphabetically |
515 | +# by member name. If set to NO (the default) the members will appear in |
516 | +# declaration order. |
517 | + |
518 | +SORT_BRIEF_DOCS = NO |
519 | + |
520 | +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen |
521 | +# will sort the (brief and detailed) documentation of class members so that |
522 | +# constructors and destructors are listed first. If set to NO (the default) |
523 | +# the constructors will appear in the respective orders defined by |
524 | +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. |
525 | +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO |
526 | +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. |
527 | + |
528 | +SORT_MEMBERS_CTORS_1ST = NO |
529 | + |
530 | +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the |
531 | +# hierarchy of group names into alphabetical order. If set to NO (the default) |
532 | +# the group names will appear in their defined order. |
533 | + |
534 | +SORT_GROUP_NAMES = NO |
535 | + |
536 | +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be |
537 | +# sorted by fully-qualified names, including namespaces. If set to |
538 | +# NO (the default), the class list will be sorted only by class name, |
539 | +# not including the namespace part. |
540 | +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. |
541 | +# Note: This option applies only to the class list, not to the |
542 | +# alphabetical list. |
543 | + |
544 | +SORT_BY_SCOPE_NAME = NO |
545 | + |
546 | +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to |
547 | +# do proper type resolution of all parameters of a function it will reject a |
548 | +# match between the prototype and the implementation of a member function even |
549 | +# if there is only one candidate or it is obvious which candidate to choose |
550 | +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen |
551 | +# will still accept a match between prototype and implementation in such cases. |
552 | + |
553 | +STRICT_PROTO_MATCHING = NO |
554 | + |
555 | +# The GENERATE_TODOLIST tag can be used to enable (YES) or |
556 | +# disable (NO) the todo list. This list is created by putting \todo |
557 | +# commands in the documentation. |
558 | + |
559 | +GENERATE_TODOLIST = YES |
560 | + |
561 | +# The GENERATE_TESTLIST tag can be used to enable (YES) or |
562 | +# disable (NO) the test list. This list is created by putting \test |
563 | +# commands in the documentation. |
564 | + |
565 | +GENERATE_TESTLIST = YES |
566 | + |
567 | +# The GENERATE_BUGLIST tag can be used to enable (YES) or |
568 | +# disable (NO) the bug list. This list is created by putting \bug |
569 | +# commands in the documentation. |
570 | + |
571 | +GENERATE_BUGLIST = YES |
572 | + |
573 | +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or |
574 | +# disable (NO) the deprecated list. This list is created by putting |
575 | +# \deprecated commands in the documentation. |
576 | + |
577 | +GENERATE_DEPRECATEDLIST= YES |
578 | + |
579 | +# The ENABLED_SECTIONS tag can be used to enable conditional |
580 | +# documentation sections, marked by \if section-label ... \endif |
581 | +# and \cond section-label ... \endcond blocks. |
582 | + |
583 | +ENABLED_SECTIONS = |
584 | + |
585 | +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines |
586 | +# the initial value of a variable or macro consists of for it to appear in |
587 | +# the documentation. If the initializer consists of more lines than specified |
588 | +# here it will be hidden. Use a value of 0 to hide initializers completely. |
589 | +# The appearance of the initializer of individual variables and macros in the |
590 | +# documentation can be controlled using \showinitializer or \hideinitializer |
591 | +# command in the documentation regardless of this setting. |
592 | + |
593 | +MAX_INITIALIZER_LINES = 30 |
594 | + |
595 | +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated |
596 | +# at the bottom of the documentation of classes and structs. If set to YES the |
597 | +# list will mention the files that were used to generate the documentation. |
598 | + |
599 | +SHOW_USED_FILES = YES |
600 | + |
601 | +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. |
602 | +# This will remove the Files entry from the Quick Index and from the |
603 | +# Folder Tree View (if specified). The default is YES. |
604 | + |
605 | +SHOW_FILES = YES |
606 | + |
607 | +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the |
608 | +# Namespaces page. This will remove the Namespaces entry from the Quick Index |
609 | +# and from the Folder Tree View (if specified). The default is YES. |
610 | + |
611 | +SHOW_NAMESPACES = YES |
612 | + |
613 | +# The FILE_VERSION_FILTER tag can be used to specify a program or script that |
614 | +# doxygen should invoke to get the current version for each file (typically from |
615 | +# the version control system). Doxygen will invoke the program by executing (via |
616 | +# popen()) the command <command> <input-file>, where <command> is the value of |
617 | +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file |
618 | +# provided by doxygen. Whatever the program writes to standard output |
619 | +# is used as the file version. See the manual for examples. |
620 | + |
621 | +FILE_VERSION_FILTER = |
622 | + |
623 | +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed |
624 | +# by doxygen. The layout file controls the global structure of the generated |
625 | +# output files in an output format independent way. To create the layout file |
626 | +# that represents doxygen's defaults, run doxygen with the -l option. |
627 | +# You can optionally specify a file name after the option, if omitted |
628 | +# DoxygenLayout.xml will be used as the name of the layout file. |
629 | + |
630 | +LAYOUT_FILE = |
631 | + |
632 | +# The CITE_BIB_FILES tag can be used to specify one or more bib files |
633 | +# containing the references data. This must be a list of .bib files. The |
634 | +# .bib extension is automatically appended if omitted. Using this command |
635 | +# requires the bibtex tool to be installed. See also |
636 | +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style |
637 | +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this |
638 | +# feature you need bibtex and perl available in the search path. Do not use |
639 | +# file names with spaces, bibtex cannot handle them. |
640 | + |
641 | +CITE_BIB_FILES = |
642 | + |
643 | +#--------------------------------------------------------------------------- |
644 | +# configuration options related to warning and progress messages |
645 | +#--------------------------------------------------------------------------- |
646 | + |
647 | +# The QUIET tag can be used to turn on/off the messages that are generated |
648 | +# by doxygen. Possible values are YES and NO. If left blank NO is used. |
649 | + |
650 | +QUIET = NO |
651 | + |
652 | +# The WARNINGS tag can be used to turn on/off the warning messages that are |
653 | +# generated by doxygen. Possible values are YES and NO. If left blank |
654 | +# NO is used. |
655 | + |
656 | +WARNINGS = YES |
657 | + |
658 | +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings |
659 | +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will |
660 | +# automatically be disabled. |
661 | + |
662 | +WARN_IF_UNDOCUMENTED = YES |
663 | + |
664 | +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for |
665 | +# potential errors in the documentation, such as not documenting some |
666 | +# parameters in a documented function, or documenting parameters that |
667 | +# don't exist or using markup commands wrongly. |
668 | + |
669 | +WARN_IF_DOC_ERROR = YES |
670 | + |
671 | +# The WARN_NO_PARAMDOC option can be enabled to get warnings for |
672 | +# functions that are documented, but have no documentation for their parameters |
673 | +# or return value. If set to NO (the default) doxygen will only warn about |
674 | +# wrong or incomplete parameter documentation, but not about the absence of |
675 | +# documentation. |
676 | + |
677 | +WARN_NO_PARAMDOC = NO |
678 | + |
679 | +# The WARN_FORMAT tag determines the format of the warning messages that |
680 | +# doxygen can produce. The string should contain the $file, $line, and $text |
681 | +# tags, which will be replaced by the file and line number from which the |
682 | +# warning originated and the warning text. Optionally the format may contain |
683 | +# $version, which will be replaced by the version of the file (if it could |
684 | +# be obtained via FILE_VERSION_FILTER) |
685 | + |
686 | +WARN_FORMAT = "$file:$line: $text" |
687 | + |
688 | +# The WARN_LOGFILE tag can be used to specify a file to which warning |
689 | +# and error messages should be written. If left blank the output is written |
690 | +# to stderr. |
691 | + |
692 | +WARN_LOGFILE = |
693 | + |
694 | +#--------------------------------------------------------------------------- |
695 | +# configuration options related to the input files |
696 | +#--------------------------------------------------------------------------- |
697 | + |
698 | +# The INPUT tag can be used to specify the files and/or directories that contain |
699 | +# documented source files. You may enter file names like "myfile.cpp" or |
700 | +# directories like "/usr/src/myproject". Separate the files or directories |
701 | +# with spaces. |
702 | + |
703 | +INPUT = ./src |
704 | + |
705 | +# This tag can be used to specify the character encoding of the source files |
706 | +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is |
707 | +# also the default input encoding. Doxygen uses libiconv (or the iconv built |
708 | +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for |
709 | +# the list of possible encodings. |
710 | + |
711 | +INPUT_ENCODING = UTF-8 |
712 | + |
713 | +# If the value of the INPUT tag contains directories, you can use the |
714 | +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
715 | +# and *.h) to filter out the source-files in the directories. If left |
716 | +# blank the following patterns are tested: |
717 | +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh |
718 | +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py |
719 | +# *.f90 *.f *.for *.vhd *.vhdl |
720 | + |
721 | +FILE_PATTERNS = *.c \ |
722 | + *.cc \ |
723 | + *.cxx \ |
724 | + *.cpp \ |
725 | + *.c++ \ |
726 | + *.d \ |
727 | + *.java \ |
728 | + *.ii \ |
729 | + *.ixx \ |
730 | + *.ipp \ |
731 | + *.i++ \ |
732 | + *.inl \ |
733 | + *.h \ |
734 | + *.hh \ |
735 | + *.hxx \ |
736 | + *.hpp \ |
737 | + *.h++ \ |
738 | + *.idl \ |
739 | + *.odl \ |
740 | + *.cs \ |
741 | + *.php \ |
742 | + *.php3 \ |
743 | + *.inc \ |
744 | + *.m \ |
745 | + *.markdown \ |
746 | + *.md \ |
747 | + *.mm \ |
748 | + *.dox \ |
749 | + *.py \ |
750 | + *.f90 \ |
751 | + *.f \ |
752 | + *.for \ |
753 | + *.vhd \ |
754 | + *.vhdl |
755 | + |
756 | +# The RECURSIVE tag can be used to turn specify whether or not subdirectories |
757 | +# should be searched for input files as well. Possible values are YES and NO. |
758 | +# If left blank NO is used. |
759 | + |
760 | +RECURSIVE = YES |
761 | + |
762 | +# The EXCLUDE tag can be used to specify files and/or directories that should be |
763 | +# excluded from the INPUT source files. This way you can easily exclude a |
764 | +# subdirectory from a directory tree whose root is specified with the INPUT tag. |
765 | +# Note that relative paths are relative to the directory from which doxygen is |
766 | +# run. |
767 | + |
768 | +EXCLUDE = |
769 | + |
770 | +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or |
771 | +# directories that are symbolic links (a Unix file system feature) are excluded |
772 | +# from the input. |
773 | + |
774 | +EXCLUDE_SYMLINKS = NO |
775 | + |
776 | +# If the value of the INPUT tag contains directories, you can use the |
777 | +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude |
778 | +# certain files from those directories. Note that the wildcards are matched |
779 | +# against the file with absolute path, so to exclude all test directories |
780 | +# for example use the pattern */test/* |
781 | + |
782 | +EXCLUDE_PATTERNS = |
783 | + |
784 | +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
785 | +# (namespaces, classes, functions, etc.) that should be excluded from the |
786 | +# output. The symbol name can be a fully qualified name, a word, or if the |
787 | +# wildcard * is used, a substring. Examples: ANamespace, AClass, |
788 | +# AClass::ANamespace, ANamespace::*Test |
789 | + |
790 | +EXCLUDE_SYMBOLS = |
791 | + |
792 | +# The EXAMPLE_PATH tag can be used to specify one or more files or |
793 | +# directories that contain example code fragments that are included (see |
794 | +# the \include command). |
795 | + |
796 | +EXAMPLE_PATH = |
797 | + |
798 | +# If the value of the EXAMPLE_PATH tag contains directories, you can use the |
799 | +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp |
800 | +# and *.h) to filter out the source-files in the directories. If left |
801 | +# blank all files are included. |
802 | + |
803 | +EXAMPLE_PATTERNS = * |
804 | + |
805 | +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be |
806 | +# searched for input files to be used with the \include or \dontinclude |
807 | +# commands irrespective of the value of the RECURSIVE tag. |
808 | +# Possible values are YES and NO. If left blank NO is used. |
809 | + |
810 | +EXAMPLE_RECURSIVE = NO |
811 | + |
812 | +# The IMAGE_PATH tag can be used to specify one or more files or |
813 | +# directories that contain image that are included in the documentation (see |
814 | +# the \image command). |
815 | + |
816 | +IMAGE_PATH = |
817 | + |
818 | +# The INPUT_FILTER tag can be used to specify a program that doxygen should |
819 | +# invoke to filter for each input file. Doxygen will invoke the filter program |
820 | +# by executing (via popen()) the command <filter> <input-file>, where <filter> |
821 | +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an |
822 | +# input file. Doxygen will then use the output that the filter program writes |
823 | +# to standard output. If FILTER_PATTERNS is specified, this tag will be |
824 | +# ignored. |
825 | + |
826 | +INPUT_FILTER = |
827 | + |
828 | +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern |
829 | +# basis. Doxygen will compare the file name with each pattern and apply the |
830 | +# filter if there is a match. The filters are a list of the form: |
831 | +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further |
832 | +# info on how filters are used. If FILTER_PATTERNS is empty or if |
833 | +# non of the patterns match the file name, INPUT_FILTER is applied. |
834 | + |
835 | +FILTER_PATTERNS = |
836 | + |
837 | +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using |
838 | +# INPUT_FILTER) will be used to filter the input files when producing source |
839 | +# files to browse (i.e. when SOURCE_BROWSER is set to YES). |
840 | + |
841 | +FILTER_SOURCE_FILES = NO |
842 | + |
843 | +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file |
844 | +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) |
845 | +# and it is also possible to disable source filtering for a specific pattern |
846 | +# using *.ext= (so without naming a filter). This option only has effect when |
847 | +# FILTER_SOURCE_FILES is enabled. |
848 | + |
849 | +FILTER_SOURCE_PATTERNS = |
850 | + |
851 | +# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that |
852 | +# is part of the input, its contents will be placed on the main page (index.html). |
853 | +# This can be useful if you have a project on for instance GitHub and want reuse |
854 | +# the introduction page also for the doxygen output. |
855 | + |
856 | +USE_MDFILE_AS_MAINPAGE = |
857 | + |
858 | +#--------------------------------------------------------------------------- |
859 | +# configuration options related to source browsing |
860 | +#--------------------------------------------------------------------------- |
861 | + |
862 | +# If the SOURCE_BROWSER tag is set to YES then a list of source files will |
863 | +# be generated. Documented entities will be cross-referenced with these sources. |
864 | +# Note: To get rid of all source code in the generated output, make sure also |
865 | +# VERBATIM_HEADERS is set to NO. |
866 | + |
867 | +SOURCE_BROWSER = NO |
868 | + |
869 | +# Setting the INLINE_SOURCES tag to YES will include the body |
870 | +# of functions and classes directly in the documentation. |
871 | + |
872 | +INLINE_SOURCES = NO |
873 | + |
874 | +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct |
875 | +# doxygen to hide any special comment blocks from generated source code |
876 | +# fragments. Normal C, C++ and Fortran comments will always remain visible. |
877 | + |
878 | +STRIP_CODE_COMMENTS = YES |
879 | + |
880 | +# If the REFERENCED_BY_RELATION tag is set to YES |
881 | +# then for each documented function all documented |
882 | +# functions referencing it will be listed. |
883 | + |
884 | +REFERENCED_BY_RELATION = NO |
885 | + |
886 | +# If the REFERENCES_RELATION tag is set to YES |
887 | +# then for each documented function all documented entities |
888 | +# called/used by that function will be listed. |
889 | + |
890 | +REFERENCES_RELATION = NO |
891 | + |
892 | +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) |
893 | +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from |
894 | +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will |
895 | +# link to the source code. Otherwise they will link to the documentation. |
896 | + |
897 | +REFERENCES_LINK_SOURCE = YES |
898 | + |
899 | +# If the USE_HTAGS tag is set to YES then the references to source code |
900 | +# will point to the HTML generated by the htags(1) tool instead of doxygen |
901 | +# built-in source browser. The htags tool is part of GNU's global source |
902 | +# tagging system (see http://www.gnu.org/software/global/global.html). You |
903 | +# will need version 4.8.6 or higher. |
904 | + |
905 | +USE_HTAGS = NO |
906 | + |
907 | +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen |
908 | +# will generate a verbatim copy of the header file for each class for |
909 | +# which an include is specified. Set to NO to disable this. |
910 | + |
911 | +VERBATIM_HEADERS = YES |
912 | + |
913 | +#--------------------------------------------------------------------------- |
914 | +# configuration options related to the alphabetical class index |
915 | +#--------------------------------------------------------------------------- |
916 | + |
917 | +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index |
918 | +# of all compounds will be generated. Enable this if the project |
919 | +# contains a lot of classes, structs, unions or interfaces. |
920 | + |
921 | +ALPHABETICAL_INDEX = YES |
922 | + |
923 | +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then |
924 | +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns |
925 | +# in which this list will be split (can be a number in the range [1..20]) |
926 | + |
927 | +COLS_IN_ALPHA_INDEX = 5 |
928 | + |
929 | +# In case all classes in a project start with a common prefix, all |
930 | +# classes will be put under the same header in the alphabetical index. |
931 | +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that |
932 | +# should be ignored while generating the index headers. |
933 | + |
934 | +IGNORE_PREFIX = |
935 | + |
936 | +#--------------------------------------------------------------------------- |
937 | +# configuration options related to the HTML output |
938 | +#--------------------------------------------------------------------------- |
939 | + |
940 | +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will |
941 | +# generate HTML output. |
942 | + |
943 | +GENERATE_HTML = YES |
944 | + |
945 | +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. |
946 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
947 | +# put in front of it. If left blank `html' will be used as the default path. |
948 | + |
949 | +HTML_OUTPUT = html |
950 | + |
951 | +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for |
952 | +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank |
953 | +# doxygen will generate files with .html extension. |
954 | + |
955 | +HTML_FILE_EXTENSION = .html |
956 | + |
957 | +# The HTML_HEADER tag can be used to specify a personal HTML header for |
958 | +# each generated HTML page. If it is left blank doxygen will generate a |
959 | +# standard header. Note that when using a custom header you are responsible |
960 | +# for the proper inclusion of any scripts and style sheets that doxygen |
961 | +# needs, which is dependent on the configuration options used. |
962 | +# It is advised to generate a default header using "doxygen -w html |
963 | +# header.html footer.html stylesheet.css YourConfigFile" and then modify |
964 | +# that header. Note that the header is subject to change so you typically |
965 | +# have to redo this when upgrading to a newer version of doxygen or when |
966 | +# changing the value of configuration settings such as GENERATE_TREEVIEW! |
967 | + |
968 | +HTML_HEADER = |
969 | + |
970 | +# The HTML_FOOTER tag can be used to specify a personal HTML footer for |
971 | +# each generated HTML page. If it is left blank doxygen will generate a |
972 | +# standard footer. |
973 | + |
974 | +HTML_FOOTER = |
975 | + |
976 | +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading |
977 | +# style sheet that is used by each HTML page. It can be used to |
978 | +# fine-tune the look of the HTML output. If left blank doxygen will |
979 | +# generate a default style sheet. Note that it is recommended to use |
980 | +# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this |
981 | +# tag will in the future become obsolete. |
982 | + |
983 | +HTML_STYLESHEET = |
984 | + |
985 | +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional |
986 | +# user-defined cascading style sheet that is included after the standard |
987 | +# style sheets created by doxygen. Using this option one can overrule |
988 | +# certain style aspects. This is preferred over using HTML_STYLESHEET |
989 | +# since it does not replace the standard style sheet and is therefor more |
990 | +# robust against future updates. Doxygen will copy the style sheet file to |
991 | +# the output directory. |
992 | + |
993 | +HTML_EXTRA_STYLESHEET = |
994 | + |
995 | +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or |
996 | +# other source files which should be copied to the HTML output directory. Note |
997 | +# that these files will be copied to the base HTML output directory. Use the |
998 | +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these |
999 | +# files. In the HTML_STYLESHEET file, use the file name only. Also note that |
1000 | +# the files will be copied as-is; there are no commands or markers available. |
1001 | + |
1002 | +HTML_EXTRA_FILES = |
1003 | + |
1004 | +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. |
1005 | +# Doxygen will adjust the colors in the style sheet and background images |
1006 | +# according to this color. Hue is specified as an angle on a colorwheel, |
1007 | +# see http://en.wikipedia.org/wiki/Hue for more information. |
1008 | +# For instance the value 0 represents red, 60 is yellow, 120 is green, |
1009 | +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. |
1010 | +# The allowed range is 0 to 359. |
1011 | + |
1012 | +HTML_COLORSTYLE_HUE = 220 |
1013 | + |
1014 | +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of |
1015 | +# the colors in the HTML output. For a value of 0 the output will use |
1016 | +# grayscales only. A value of 255 will produce the most vivid colors. |
1017 | + |
1018 | +HTML_COLORSTYLE_SAT = 100 |
1019 | + |
1020 | +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to |
1021 | +# the luminance component of the colors in the HTML output. Values below |
1022 | +# 100 gradually make the output lighter, whereas values above 100 make |
1023 | +# the output darker. The value divided by 100 is the actual gamma applied, |
1024 | +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, |
1025 | +# and 100 does not change the gamma. |
1026 | + |
1027 | +HTML_COLORSTYLE_GAMMA = 80 |
1028 | + |
1029 | +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML |
1030 | +# page will contain the date and time when the page was generated. Setting |
1031 | +# this to NO can help when comparing the output of multiple runs. |
1032 | + |
1033 | +HTML_TIMESTAMP = YES |
1034 | + |
1035 | +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML |
1036 | +# documentation will contain sections that can be hidden and shown after the |
1037 | +# page has loaded. |
1038 | + |
1039 | +HTML_DYNAMIC_SECTIONS = NO |
1040 | + |
1041 | +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of |
1042 | +# entries shown in the various tree structured indices initially; the user |
1043 | +# can expand and collapse entries dynamically later on. Doxygen will expand |
1044 | +# the tree to such a level that at most the specified number of entries are |
1045 | +# visible (unless a fully collapsed tree already exceeds this amount). |
1046 | +# So setting the number of entries 1 will produce a full collapsed tree by |
1047 | +# default. 0 is a special value representing an infinite number of entries |
1048 | +# and will result in a full expanded tree by default. |
1049 | + |
1050 | +HTML_INDEX_NUM_ENTRIES = 100 |
1051 | + |
1052 | +# If the GENERATE_DOCSET tag is set to YES, additional index files |
1053 | +# will be generated that can be used as input for Apple's Xcode 3 |
1054 | +# integrated development environment, introduced with OSX 10.5 (Leopard). |
1055 | +# To create a documentation set, doxygen will generate a Makefile in the |
1056 | +# HTML output directory. Running make will produce the docset in that |
1057 | +# directory and running "make install" will install the docset in |
1058 | +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find |
1059 | +# it at startup. |
1060 | +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html |
1061 | +# for more information. |
1062 | + |
1063 | +GENERATE_DOCSET = NO |
1064 | + |
1065 | +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the |
1066 | +# feed. A documentation feed provides an umbrella under which multiple |
1067 | +# documentation sets from a single provider (such as a company or product suite) |
1068 | +# can be grouped. |
1069 | + |
1070 | +DOCSET_FEEDNAME = "Doxygen generated docs" |
1071 | + |
1072 | +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that |
1073 | +# should uniquely identify the documentation set bundle. This should be a |
1074 | +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen |
1075 | +# will append .docset to the name. |
1076 | + |
1077 | +DOCSET_BUNDLE_ID = org.doxygen.Project |
1078 | + |
1079 | +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely |
1080 | +# identify the documentation publisher. This should be a reverse domain-name |
1081 | +# style string, e.g. com.mycompany.MyDocSet.documentation. |
1082 | + |
1083 | +DOCSET_PUBLISHER_ID = org.doxygen.Publisher |
1084 | + |
1085 | +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. |
1086 | + |
1087 | +DOCSET_PUBLISHER_NAME = Publisher |
1088 | + |
1089 | +# If the GENERATE_HTMLHELP tag is set to YES, additional index files |
1090 | +# will be generated that can be used as input for tools like the |
1091 | +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) |
1092 | +# of the generated HTML documentation. |
1093 | + |
1094 | +GENERATE_HTMLHELP = NO |
1095 | + |
1096 | +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can |
1097 | +# be used to specify the file name of the resulting .chm file. You |
1098 | +# can add a path in front of the file if the result should not be |
1099 | +# written to the html output directory. |
1100 | + |
1101 | +CHM_FILE = |
1102 | + |
1103 | +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can |
1104 | +# be used to specify the location (absolute path including file name) of |
1105 | +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run |
1106 | +# the HTML help compiler on the generated index.hhp. |
1107 | + |
1108 | +HHC_LOCATION = |
1109 | + |
1110 | +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag |
1111 | +# controls if a separate .chi index file is generated (YES) or that |
1112 | +# it should be included in the master .chm file (NO). |
1113 | + |
1114 | +GENERATE_CHI = NO |
1115 | + |
1116 | +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING |
1117 | +# is used to encode HtmlHelp index (hhk), content (hhc) and project file |
1118 | +# content. |
1119 | + |
1120 | +CHM_INDEX_ENCODING = |
1121 | + |
1122 | +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag |
1123 | +# controls whether a binary table of contents is generated (YES) or a |
1124 | +# normal table of contents (NO) in the .chm file. |
1125 | + |
1126 | +BINARY_TOC = NO |
1127 | + |
1128 | +# The TOC_EXPAND flag can be set to YES to add extra items for group members |
1129 | +# to the contents of the HTML help documentation and to the tree view. |
1130 | + |
1131 | +TOC_EXPAND = NO |
1132 | + |
1133 | +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and |
1134 | +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated |
1135 | +# that can be used as input for Qt's qhelpgenerator to generate a |
1136 | +# Qt Compressed Help (.qch) of the generated HTML documentation. |
1137 | + |
1138 | +GENERATE_QHP = NO |
1139 | + |
1140 | +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can |
1141 | +# be used to specify the file name of the resulting .qch file. |
1142 | +# The path specified is relative to the HTML output folder. |
1143 | + |
1144 | +QCH_FILE = |
1145 | + |
1146 | +# The QHP_NAMESPACE tag specifies the namespace to use when generating |
1147 | +# Qt Help Project output. For more information please see |
1148 | +# http://doc.trolltech.com/qthelpproject.html#namespace |
1149 | + |
1150 | +QHP_NAMESPACE = org.doxygen.Project |
1151 | + |
1152 | +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating |
1153 | +# Qt Help Project output. For more information please see |
1154 | +# http://doc.trolltech.com/qthelpproject.html#virtual-folders |
1155 | + |
1156 | +QHP_VIRTUAL_FOLDER = doc |
1157 | + |
1158 | +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to |
1159 | +# add. For more information please see |
1160 | +# http://doc.trolltech.com/qthelpproject.html#custom-filters |
1161 | + |
1162 | +QHP_CUST_FILTER_NAME = |
1163 | + |
1164 | +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the |
1165 | +# custom filter to add. For more information please see |
1166 | +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> |
1167 | +# Qt Help Project / Custom Filters</a>. |
1168 | + |
1169 | +QHP_CUST_FILTER_ATTRS = |
1170 | + |
1171 | +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this |
1172 | +# project's |
1173 | +# filter section matches. |
1174 | +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> |
1175 | +# Qt Help Project / Filter Attributes</a>. |
1176 | + |
1177 | +QHP_SECT_FILTER_ATTRS = |
1178 | + |
1179 | +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can |
1180 | +# be used to specify the location of Qt's qhelpgenerator. |
1181 | +# If non-empty doxygen will try to run qhelpgenerator on the generated |
1182 | +# .qhp file. |
1183 | + |
1184 | +QHG_LOCATION = |
1185 | + |
1186 | +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files |
1187 | +# will be generated, which together with the HTML files, form an Eclipse help |
1188 | +# plugin. To install this plugin and make it available under the help contents |
1189 | +# menu in Eclipse, the contents of the directory containing the HTML and XML |
1190 | +# files needs to be copied into the plugins directory of eclipse. The name of |
1191 | +# the directory within the plugins directory should be the same as |
1192 | +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before |
1193 | +# the help appears. |
1194 | + |
1195 | +GENERATE_ECLIPSEHELP = NO |
1196 | + |
1197 | +# A unique identifier for the eclipse help plugin. When installing the plugin |
1198 | +# the directory name containing the HTML and XML files should also have |
1199 | +# this name. |
1200 | + |
1201 | +ECLIPSE_DOC_ID = org.doxygen.Project |
1202 | + |
1203 | +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) |
1204 | +# at top of each HTML page. The value NO (the default) enables the index and |
1205 | +# the value YES disables it. Since the tabs have the same information as the |
1206 | +# navigation tree you can set this option to NO if you already set |
1207 | +# GENERATE_TREEVIEW to YES. |
1208 | + |
1209 | +DISABLE_INDEX = NO |
1210 | + |
1211 | +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index |
1212 | +# structure should be generated to display hierarchical information. |
1213 | +# If the tag value is set to YES, a side panel will be generated |
1214 | +# containing a tree-like index structure (just like the one that |
1215 | +# is generated for HTML Help). For this to work a browser that supports |
1216 | +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). |
1217 | +# Windows users are probably better off using the HTML help feature. |
1218 | +# Since the tree basically has the same information as the tab index you |
1219 | +# could consider to set DISABLE_INDEX to NO when enabling this option. |
1220 | + |
1221 | +GENERATE_TREEVIEW = NO |
1222 | + |
1223 | +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values |
1224 | +# (range [0,1..20]) that doxygen will group on one line in the generated HTML |
1225 | +# documentation. Note that a value of 0 will completely suppress the enum |
1226 | +# values from appearing in the overview section. |
1227 | + |
1228 | +ENUM_VALUES_PER_LINE = 4 |
1229 | + |
1230 | +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be |
1231 | +# used to set the initial width (in pixels) of the frame in which the tree |
1232 | +# is shown. |
1233 | + |
1234 | +TREEVIEW_WIDTH = 250 |
1235 | + |
1236 | +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open |
1237 | +# links to external symbols imported via tag files in a separate window. |
1238 | + |
1239 | +EXT_LINKS_IN_WINDOW = NO |
1240 | + |
1241 | +# Use this tag to change the font size of Latex formulas included |
1242 | +# as images in the HTML documentation. The default is 10. Note that |
1243 | +# when you change the font size after a successful doxygen run you need |
1244 | +# to manually remove any form_*.png images from the HTML output directory |
1245 | +# to force them to be regenerated. |
1246 | + |
1247 | +FORMULA_FONTSIZE = 10 |
1248 | + |
1249 | +# Use the FORMULA_TRANPARENT tag to determine whether or not the images |
1250 | +# generated for formulas are transparent PNGs. Transparent PNGs are |
1251 | +# not supported properly for IE 6.0, but are supported on all modern browsers. |
1252 | +# Note that when changing this option you need to delete any form_*.png files |
1253 | +# in the HTML output before the changes have effect. |
1254 | + |
1255 | +FORMULA_TRANSPARENT = YES |
1256 | + |
1257 | +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax |
1258 | +# (see http://www.mathjax.org) which uses client side Javascript for the |
1259 | +# rendering instead of using prerendered bitmaps. Use this if you do not |
1260 | +# have LaTeX installed or if you want to formulas look prettier in the HTML |
1261 | +# output. When enabled you may also need to install MathJax separately and |
1262 | +# configure the path to it using the MATHJAX_RELPATH option. |
1263 | + |
1264 | +USE_MATHJAX = NO |
1265 | + |
1266 | +# When MathJax is enabled you can set the default output format to be used for |
1267 | +# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and |
1268 | +# SVG. The default value is HTML-CSS, which is slower, but has the best |
1269 | +# compatibility. |
1270 | + |
1271 | +MATHJAX_FORMAT = HTML-CSS |
1272 | + |
1273 | +# When MathJax is enabled you need to specify the location relative to the |
1274 | +# HTML output directory using the MATHJAX_RELPATH option. The destination |
1275 | +# directory should contain the MathJax.js script. For instance, if the mathjax |
1276 | +# directory is located at the same level as the HTML output directory, then |
1277 | +# MATHJAX_RELPATH should be ../mathjax. The default value points to |
1278 | +# the MathJax Content Delivery Network so you can quickly see the result without |
1279 | +# installing MathJax. However, it is strongly recommended to install a local |
1280 | +# copy of MathJax from http://www.mathjax.org before deployment. |
1281 | + |
1282 | +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest |
1283 | + |
1284 | +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension |
1285 | +# names that should be enabled during MathJax rendering. |
1286 | + |
1287 | +MATHJAX_EXTENSIONS = |
1288 | + |
1289 | +# When the SEARCHENGINE tag is enabled doxygen will generate a search box |
1290 | +# for the HTML output. The underlying search engine uses javascript |
1291 | +# and DHTML and should work on any modern browser. Note that when using |
1292 | +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets |
1293 | +# (GENERATE_DOCSET) there is already a search function so this one should |
1294 | +# typically be disabled. For large projects the javascript based search engine |
1295 | +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. |
1296 | + |
1297 | +SEARCHENGINE = NO |
1298 | + |
1299 | +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be |
1300 | +# implemented using a web server instead of a web client using Javascript. |
1301 | +# There are two flavours of web server based search depending on the |
1302 | +# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for |
1303 | +# searching and an index file used by the script. When EXTERNAL_SEARCH is |
1304 | +# enabled the indexing and searching needs to be provided by external tools. |
1305 | +# See the manual for details. |
1306 | + |
1307 | +SERVER_BASED_SEARCH = NO |
1308 | + |
1309 | +# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP |
1310 | +# script for searching. Instead the search results are written to an XML file |
1311 | +# which needs to be processed by an external indexer. Doxygen will invoke an |
1312 | +# external search engine pointed to by the SEARCHENGINE_URL option to obtain |
1313 | +# the search results. Doxygen ships with an example indexer (doxyindexer) and |
1314 | +# search engine (doxysearch.cgi) which are based on the open source search engine |
1315 | +# library Xapian. See the manual for configuration details. |
1316 | + |
1317 | +EXTERNAL_SEARCH = NO |
1318 | + |
1319 | +# The SEARCHENGINE_URL should point to a search engine hosted by a web server |
1320 | +# which will returned the search results when EXTERNAL_SEARCH is enabled. |
1321 | +# Doxygen ships with an example search engine (doxysearch) which is based on |
1322 | +# the open source search engine library Xapian. See the manual for configuration |
1323 | +# details. |
1324 | + |
1325 | +SEARCHENGINE_URL = |
1326 | + |
1327 | +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed |
1328 | +# search data is written to a file for indexing by an external tool. With the |
1329 | +# SEARCHDATA_FILE tag the name of this file can be specified. |
1330 | + |
1331 | +SEARCHDATA_FILE = searchdata.xml |
1332 | + |
1333 | +# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the |
1334 | +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is |
1335 | +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple |
1336 | +# projects and redirect the results back to the right project. |
1337 | + |
1338 | +EXTERNAL_SEARCH_ID = |
1339 | + |
1340 | +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen |
1341 | +# projects other than the one defined by this configuration file, but that are |
1342 | +# all added to the same external search index. Each project needs to have a |
1343 | +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id |
1344 | +# of to a relative location where the documentation can be found. |
1345 | +# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... |
1346 | + |
1347 | +EXTRA_SEARCH_MAPPINGS = |
1348 | + |
1349 | +#--------------------------------------------------------------------------- |
1350 | +# configuration options related to the LaTeX output |
1351 | +#--------------------------------------------------------------------------- |
1352 | + |
1353 | +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will |
1354 | +# generate Latex output. |
1355 | + |
1356 | +GENERATE_LATEX = NO |
1357 | + |
1358 | +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. |
1359 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1360 | +# put in front of it. If left blank `latex' will be used as the default path. |
1361 | + |
1362 | +LATEX_OUTPUT = latex |
1363 | + |
1364 | +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be |
1365 | +# invoked. If left blank `latex' will be used as the default command name. |
1366 | +# Note that when enabling USE_PDFLATEX this option is only used for |
1367 | +# generating bitmaps for formulas in the HTML output, but not in the |
1368 | +# Makefile that is written to the output directory. |
1369 | + |
1370 | +LATEX_CMD_NAME = latex |
1371 | + |
1372 | +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to |
1373 | +# generate index for LaTeX. If left blank `makeindex' will be used as the |
1374 | +# default command name. |
1375 | + |
1376 | +MAKEINDEX_CMD_NAME = makeindex |
1377 | + |
1378 | +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact |
1379 | +# LaTeX documents. This may be useful for small projects and may help to |
1380 | +# save some trees in general. |
1381 | + |
1382 | +COMPACT_LATEX = NO |
1383 | + |
1384 | +# The PAPER_TYPE tag can be used to set the paper type that is used |
1385 | +# by the printer. Possible values are: a4, letter, legal and |
1386 | +# executive. If left blank a4wide will be used. |
1387 | + |
1388 | +PAPER_TYPE = a4 |
1389 | + |
1390 | +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX |
1391 | +# packages that should be included in the LaTeX output. |
1392 | + |
1393 | +EXTRA_PACKAGES = |
1394 | + |
1395 | +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for |
1396 | +# the generated latex document. The header should contain everything until |
1397 | +# the first chapter. If it is left blank doxygen will generate a |
1398 | +# standard header. Notice: only use this tag if you know what you are doing! |
1399 | + |
1400 | +LATEX_HEADER = |
1401 | + |
1402 | +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for |
1403 | +# the generated latex document. The footer should contain everything after |
1404 | +# the last chapter. If it is left blank doxygen will generate a |
1405 | +# standard footer. Notice: only use this tag if you know what you are doing! |
1406 | + |
1407 | +LATEX_FOOTER = |
1408 | + |
1409 | +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated |
1410 | +# is prepared for conversion to pdf (using ps2pdf). The pdf file will |
1411 | +# contain links (just like the HTML output) instead of page references |
1412 | +# This makes the output suitable for online browsing using a pdf viewer. |
1413 | + |
1414 | +PDF_HYPERLINKS = YES |
1415 | + |
1416 | +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of |
1417 | +# plain latex in the generated Makefile. Set this option to YES to get a |
1418 | +# higher quality PDF documentation. |
1419 | + |
1420 | +USE_PDFLATEX = YES |
1421 | + |
1422 | +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. |
1423 | +# command to the generated LaTeX files. This will instruct LaTeX to keep |
1424 | +# running if errors occur, instead of asking the user for help. |
1425 | +# This option is also used when generating formulas in HTML. |
1426 | + |
1427 | +LATEX_BATCHMODE = NO |
1428 | + |
1429 | +# If LATEX_HIDE_INDICES is set to YES then doxygen will not |
1430 | +# include the index chapters (such as File Index, Compound Index, etc.) |
1431 | +# in the output. |
1432 | + |
1433 | +LATEX_HIDE_INDICES = NO |
1434 | + |
1435 | +# If LATEX_SOURCE_CODE is set to YES then doxygen will include |
1436 | +# source code with syntax highlighting in the LaTeX output. |
1437 | +# Note that which sources are shown also depends on other settings |
1438 | +# such as SOURCE_BROWSER. |
1439 | + |
1440 | +LATEX_SOURCE_CODE = NO |
1441 | + |
1442 | +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the |
1443 | +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See |
1444 | +# http://en.wikipedia.org/wiki/BibTeX for more info. |
1445 | + |
1446 | +LATEX_BIB_STYLE = plain |
1447 | + |
1448 | +#--------------------------------------------------------------------------- |
1449 | +# configuration options related to the RTF output |
1450 | +#--------------------------------------------------------------------------- |
1451 | + |
1452 | +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output |
1453 | +# The RTF output is optimized for Word 97 and may not look very pretty with |
1454 | +# other RTF readers or editors. |
1455 | + |
1456 | +GENERATE_RTF = NO |
1457 | + |
1458 | +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. |
1459 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1460 | +# put in front of it. If left blank `rtf' will be used as the default path. |
1461 | + |
1462 | +RTF_OUTPUT = rtf |
1463 | + |
1464 | +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact |
1465 | +# RTF documents. This may be useful for small projects and may help to |
1466 | +# save some trees in general. |
1467 | + |
1468 | +COMPACT_RTF = NO |
1469 | + |
1470 | +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated |
1471 | +# will contain hyperlink fields. The RTF file will |
1472 | +# contain links (just like the HTML output) instead of page references. |
1473 | +# This makes the output suitable for online browsing using WORD or other |
1474 | +# programs which support those fields. |
1475 | +# Note: wordpad (write) and others do not support links. |
1476 | + |
1477 | +RTF_HYPERLINKS = NO |
1478 | + |
1479 | +# Load style sheet definitions from file. Syntax is similar to doxygen's |
1480 | +# config file, i.e. a series of assignments. You only have to provide |
1481 | +# replacements, missing definitions are set to their default value. |
1482 | + |
1483 | +RTF_STYLESHEET_FILE = |
1484 | + |
1485 | +# Set optional variables used in the generation of an rtf document. |
1486 | +# Syntax is similar to doxygen's config file. |
1487 | + |
1488 | +RTF_EXTENSIONS_FILE = |
1489 | + |
1490 | +#--------------------------------------------------------------------------- |
1491 | +# configuration options related to the man page output |
1492 | +#--------------------------------------------------------------------------- |
1493 | + |
1494 | +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will |
1495 | +# generate man pages |
1496 | + |
1497 | +GENERATE_MAN = NO |
1498 | + |
1499 | +# The MAN_OUTPUT tag is used to specify where the man pages will be put. |
1500 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1501 | +# put in front of it. If left blank `man' will be used as the default path. |
1502 | + |
1503 | +MAN_OUTPUT = man |
1504 | + |
1505 | +# The MAN_EXTENSION tag determines the extension that is added to |
1506 | +# the generated man pages (default is the subroutine's section .3) |
1507 | + |
1508 | +MAN_EXTENSION = .3 |
1509 | + |
1510 | +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, |
1511 | +# then it will generate one additional man file for each entity |
1512 | +# documented in the real man page(s). These additional files |
1513 | +# only source the real man page, but without them the man command |
1514 | +# would be unable to find the correct page. The default is NO. |
1515 | + |
1516 | +MAN_LINKS = NO |
1517 | + |
1518 | +#--------------------------------------------------------------------------- |
1519 | +# configuration options related to the XML output |
1520 | +#--------------------------------------------------------------------------- |
1521 | + |
1522 | +# If the GENERATE_XML tag is set to YES Doxygen will |
1523 | +# generate an XML file that captures the structure of |
1524 | +# the code including all documentation. |
1525 | + |
1526 | +GENERATE_XML = NO |
1527 | + |
1528 | +# The XML_OUTPUT tag is used to specify where the XML pages will be put. |
1529 | +# If a relative path is entered the value of OUTPUT_DIRECTORY will be |
1530 | +# put in front of it. If left blank `xml' will be used as the default path. |
1531 | + |
1532 | +XML_OUTPUT = xml |
1533 | + |
1534 | +# The XML_SCHEMA tag can be used to specify an XML schema, |
1535 | +# which can be used by a validating XML parser to check the |
1536 | +# syntax of the XML files. |
1537 | + |
1538 | +XML_SCHEMA = |
1539 | + |
1540 | +# The XML_DTD tag can be used to specify an XML DTD, |
1541 | +# which can be used by a validating XML parser to check the |
1542 | +# syntax of the XML files. |
1543 | + |
1544 | +XML_DTD = |
1545 | + |
1546 | +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will |
1547 | +# dump the program listings (including syntax highlighting |
1548 | +# and cross-referencing information) to the XML output. Note that |
1549 | +# enabling this will significantly increase the size of the XML output. |
1550 | + |
1551 | +XML_PROGRAMLISTING = YES |
1552 | + |
1553 | +#--------------------------------------------------------------------------- |
1554 | +# configuration options for the AutoGen Definitions output |
1555 | +#--------------------------------------------------------------------------- |
1556 | + |
1557 | +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will |
1558 | +# generate an AutoGen Definitions (see autogen.sf.net) file |
1559 | +# that captures the structure of the code including all |
1560 | +# documentation. Note that this feature is still experimental |
1561 | +# and incomplete at the moment. |
1562 | + |
1563 | +GENERATE_AUTOGEN_DEF = NO |
1564 | + |
1565 | +#--------------------------------------------------------------------------- |
1566 | +# configuration options related to the Perl module output |
1567 | +#--------------------------------------------------------------------------- |
1568 | + |
1569 | +# If the GENERATE_PERLMOD tag is set to YES Doxygen will |
1570 | +# generate a Perl module file that captures the structure of |
1571 | +# the code including all documentation. Note that this |
1572 | +# feature is still experimental and incomplete at the |
1573 | +# moment. |
1574 | + |
1575 | +GENERATE_PERLMOD = NO |
1576 | + |
1577 | +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate |
1578 | +# the necessary Makefile rules, Perl scripts and LaTeX code to be able |
1579 | +# to generate PDF and DVI output from the Perl module output. |
1580 | + |
1581 | +PERLMOD_LATEX = NO |
1582 | + |
1583 | +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be |
1584 | +# nicely formatted so it can be parsed by a human reader. This is useful |
1585 | +# if you want to understand what is going on. On the other hand, if this |
1586 | +# tag is set to NO the size of the Perl module output will be much smaller |
1587 | +# and Perl will parse it just the same. |
1588 | + |
1589 | +PERLMOD_PRETTY = YES |
1590 | + |
1591 | +# The names of the make variables in the generated doxyrules.make file |
1592 | +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. |
1593 | +# This is useful so different doxyrules.make files included by the same |
1594 | +# Makefile don't overwrite each other's variables. |
1595 | + |
1596 | +PERLMOD_MAKEVAR_PREFIX = |
1597 | + |
1598 | +#--------------------------------------------------------------------------- |
1599 | +# Configuration options related to the preprocessor |
1600 | +#--------------------------------------------------------------------------- |
1601 | + |
1602 | +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will |
1603 | +# evaluate all C-preprocessor directives found in the sources and include |
1604 | +# files. |
1605 | + |
1606 | +ENABLE_PREPROCESSING = YES |
1607 | + |
1608 | +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro |
1609 | +# names in the source code. If set to NO (the default) only conditional |
1610 | +# compilation will be performed. Macro expansion can be done in a controlled |
1611 | +# way by setting EXPAND_ONLY_PREDEF to YES. |
1612 | + |
1613 | +MACRO_EXPANSION = NO |
1614 | + |
1615 | +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES |
1616 | +# then the macro expansion is limited to the macros specified with the |
1617 | +# PREDEFINED and EXPAND_AS_DEFINED tags. |
1618 | + |
1619 | +EXPAND_ONLY_PREDEF = NO |
1620 | + |
1621 | +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files |
1622 | +# pointed to by INCLUDE_PATH will be searched when a #include is found. |
1623 | + |
1624 | +SEARCH_INCLUDES = YES |
1625 | + |
1626 | +# The INCLUDE_PATH tag can be used to specify one or more directories that |
1627 | +# contain include files that are not input files but should be processed by |
1628 | +# the preprocessor. |
1629 | + |
1630 | +INCLUDE_PATH = |
1631 | + |
1632 | +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard |
1633 | +# patterns (like *.h and *.hpp) to filter out the header-files in the |
1634 | +# directories. If left blank, the patterns specified with FILE_PATTERNS will |
1635 | +# be used. |
1636 | + |
1637 | +INCLUDE_FILE_PATTERNS = |
1638 | + |
1639 | +# The PREDEFINED tag can be used to specify one or more macro names that |
1640 | +# are defined before the preprocessor is started (similar to the -D option of |
1641 | +# gcc). The argument of the tag is a list of macros of the form: name |
1642 | +# or name=definition (no spaces). If the definition and the = are |
1643 | +# omitted =1 is assumed. To prevent a macro definition from being |
1644 | +# undefined via #undef or recursively expanded use the := operator |
1645 | +# instead of the = operator. |
1646 | + |
1647 | +PREDEFINED = |
1648 | + |
1649 | +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then |
1650 | +# this tag can be used to specify a list of macro names that should be expanded. |
1651 | +# The macro definition that is found in the sources will be used. |
1652 | +# Use the PREDEFINED tag if you want to use a different macro definition that |
1653 | +# overrules the definition found in the source code. |
1654 | + |
1655 | +EXPAND_AS_DEFINED = |
1656 | + |
1657 | +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then |
1658 | +# doxygen's preprocessor will remove all references to function-like macros |
1659 | +# that are alone on a line, have an all uppercase name, and do not end with a |
1660 | +# semicolon, because these will confuse the parser if not removed. |
1661 | + |
1662 | +SKIP_FUNCTION_MACROS = YES |
1663 | + |
1664 | +#--------------------------------------------------------------------------- |
1665 | +# Configuration::additions related to external references |
1666 | +#--------------------------------------------------------------------------- |
1667 | + |
1668 | +# The TAGFILES option can be used to specify one or more tagfiles. For each |
1669 | +# tag file the location of the external documentation should be added. The |
1670 | +# format of a tag file without this location is as follows: |
1671 | +# TAGFILES = file1 file2 ... |
1672 | +# Adding location for the tag files is done as follows: |
1673 | +# TAGFILES = file1=loc1 "file2 = loc2" ... |
1674 | +# where "loc1" and "loc2" can be relative or absolute paths |
1675 | +# or URLs. Note that each tag file must have a unique name (where the name does |
1676 | +# NOT include the path). If a tag file is not located in the directory in which |
1677 | +# doxygen is run, you must also specify the path to the tagfile here. |
1678 | + |
1679 | +TAGFILES = |
1680 | + |
1681 | +# When a file name is specified after GENERATE_TAGFILE, doxygen will create |
1682 | +# a tag file that is based on the input files it reads. |
1683 | + |
1684 | +GENERATE_TAGFILE = |
1685 | + |
1686 | +# If the ALLEXTERNALS tag is set to YES all external classes will be listed |
1687 | +# in the class index. If set to NO only the inherited external classes |
1688 | +# will be listed. |
1689 | + |
1690 | +ALLEXTERNALS = NO |
1691 | + |
1692 | +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed |
1693 | +# in the modules index. If set to NO, only the current project's groups will |
1694 | +# be listed. |
1695 | + |
1696 | +EXTERNAL_GROUPS = YES |
1697 | + |
1698 | +# The PERL_PATH should be the absolute path and name of the perl script |
1699 | +# interpreter (i.e. the result of `which perl'). |
1700 | + |
1701 | +PERL_PATH = /usr/bin/perl |
1702 | + |
1703 | +#--------------------------------------------------------------------------- |
1704 | +# Configuration options related to the dot tool |
1705 | +#--------------------------------------------------------------------------- |
1706 | + |
1707 | +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will |
1708 | +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base |
1709 | +# or super classes. Setting the tag to NO turns the diagrams off. Note that |
1710 | +# this option also works with HAVE_DOT disabled, but it is recommended to |
1711 | +# install and use dot, since it yields more powerful graphs. |
1712 | + |
1713 | +CLASS_DIAGRAMS = YES |
1714 | + |
1715 | +# You can define message sequence charts within doxygen comments using the \msc |
1716 | +# command. Doxygen will then run the mscgen tool (see |
1717 | +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the |
1718 | +# documentation. The MSCGEN_PATH tag allows you to specify the directory where |
1719 | +# the mscgen tool resides. If left empty the tool is assumed to be found in the |
1720 | +# default search path. |
1721 | + |
1722 | +MSCGEN_PATH = |
1723 | + |
1724 | +# If set to YES, the inheritance and collaboration graphs will hide |
1725 | +# inheritance and usage relations if the target is undocumented |
1726 | +# or is not a class. |
1727 | + |
1728 | +HIDE_UNDOC_RELATIONS = YES |
1729 | + |
1730 | +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is |
1731 | +# available from the path. This tool is part of Graphviz, a graph visualization |
1732 | +# toolkit from AT&T and Lucent Bell Labs. The other options in this section |
1733 | +# have no effect if this option is set to NO (the default) |
1734 | + |
1735 | +HAVE_DOT = NO |
1736 | + |
1737 | +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is |
1738 | +# allowed to run in parallel. When set to 0 (the default) doxygen will |
1739 | +# base this on the number of processors available in the system. You can set it |
1740 | +# explicitly to a value larger than 0 to get control over the balance |
1741 | +# between CPU load and processing speed. |
1742 | + |
1743 | +DOT_NUM_THREADS = 0 |
1744 | + |
1745 | +# By default doxygen will use the Helvetica font for all dot files that |
1746 | +# doxygen generates. When you want a differently looking font you can specify |
1747 | +# the font name using DOT_FONTNAME. You need to make sure dot is able to find |
1748 | +# the font, which can be done by putting it in a standard location or by setting |
1749 | +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the |
1750 | +# directory containing the font. |
1751 | + |
1752 | +DOT_FONTNAME = Helvetica |
1753 | + |
1754 | +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. |
1755 | +# The default size is 10pt. |
1756 | + |
1757 | +DOT_FONTSIZE = 10 |
1758 | + |
1759 | +# By default doxygen will tell dot to use the Helvetica font. |
1760 | +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to |
1761 | +# set the path where dot can find it. |
1762 | + |
1763 | +DOT_FONTPATH = |
1764 | + |
1765 | +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen |
1766 | +# will generate a graph for each documented class showing the direct and |
1767 | +# indirect inheritance relations. Setting this tag to YES will force the |
1768 | +# CLASS_DIAGRAMS tag to NO. |
1769 | + |
1770 | +CLASS_GRAPH = YES |
1771 | + |
1772 | +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen |
1773 | +# will generate a graph for each documented class showing the direct and |
1774 | +# indirect implementation dependencies (inheritance, containment, and |
1775 | +# class references variables) of the class with other documented classes. |
1776 | + |
1777 | +COLLABORATION_GRAPH = YES |
1778 | + |
1779 | +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen |
1780 | +# will generate a graph for groups, showing the direct groups dependencies |
1781 | + |
1782 | +GROUP_GRAPHS = YES |
1783 | + |
1784 | +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and |
1785 | +# collaboration diagrams in a style similar to the OMG's Unified Modeling |
1786 | +# Language. |
1787 | + |
1788 | +UML_LOOK = NO |
1789 | + |
1790 | +# If the UML_LOOK tag is enabled, the fields and methods are shown inside |
1791 | +# the class node. If there are many fields or methods and many nodes the |
1792 | +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS |
1793 | +# threshold limits the number of items for each type to make the size more |
1794 | +# managable. Set this to 0 for no limit. Note that the threshold may be |
1795 | +# exceeded by 50% before the limit is enforced. |
1796 | + |
1797 | +UML_LIMIT_NUM_FIELDS = 10 |
1798 | + |
1799 | +# If set to YES, the inheritance and collaboration graphs will show the |
1800 | +# relations between templates and their instances. |
1801 | + |
1802 | +TEMPLATE_RELATIONS = NO |
1803 | + |
1804 | +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT |
1805 | +# tags are set to YES then doxygen will generate a graph for each documented |
1806 | +# file showing the direct and indirect include dependencies of the file with |
1807 | +# other documented files. |
1808 | + |
1809 | +INCLUDE_GRAPH = YES |
1810 | + |
1811 | +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and |
1812 | +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each |
1813 | +# documented header file showing the documented files that directly or |
1814 | +# indirectly include this file. |
1815 | + |
1816 | +INCLUDED_BY_GRAPH = YES |
1817 | + |
1818 | +# If the CALL_GRAPH and HAVE_DOT options are set to YES then |
1819 | +# doxygen will generate a call dependency graph for every global function |
1820 | +# or class method. Note that enabling this option will significantly increase |
1821 | +# the time of a run. So in most cases it will be better to enable call graphs |
1822 | +# for selected functions only using the \callgraph command. |
1823 | + |
1824 | +CALL_GRAPH = NO |
1825 | + |
1826 | +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then |
1827 | +# doxygen will generate a caller dependency graph for every global function |
1828 | +# or class method. Note that enabling this option will significantly increase |
1829 | +# the time of a run. So in most cases it will be better to enable caller |
1830 | +# graphs for selected functions only using the \callergraph command. |
1831 | + |
1832 | +CALLER_GRAPH = NO |
1833 | + |
1834 | +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen |
1835 | +# will generate a graphical hierarchy of all classes instead of a textual one. |
1836 | + |
1837 | +GRAPHICAL_HIERARCHY = YES |
1838 | + |
1839 | +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES |
1840 | +# then doxygen will show the dependencies a directory has on other directories |
1841 | +# in a graphical way. The dependency relations are determined by the #include |
1842 | +# relations between the files in the directories. |
1843 | + |
1844 | +DIRECTORY_GRAPH = YES |
1845 | + |
1846 | +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images |
1847 | +# generated by dot. Possible values are svg, png, jpg, or gif. |
1848 | +# If left blank png will be used. If you choose svg you need to set |
1849 | +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files |
1850 | +# visible in IE 9+ (other browsers do not have this requirement). |
1851 | + |
1852 | +DOT_IMAGE_FORMAT = png |
1853 | + |
1854 | +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to |
1855 | +# enable generation of interactive SVG images that allow zooming and panning. |
1856 | +# Note that this requires a modern browser other than Internet Explorer. |
1857 | +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you |
1858 | +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files |
1859 | +# visible. Older versions of IE do not have SVG support. |
1860 | + |
1861 | +INTERACTIVE_SVG = NO |
1862 | + |
1863 | +# The tag DOT_PATH can be used to specify the path where the dot tool can be |
1864 | +# found. If left blank, it is assumed the dot tool can be found in the path. |
1865 | + |
1866 | +DOT_PATH = |
1867 | + |
1868 | +# The DOTFILE_DIRS tag can be used to specify one or more directories that |
1869 | +# contain dot files that are included in the documentation (see the |
1870 | +# \dotfile command). |
1871 | + |
1872 | +DOTFILE_DIRS = |
1873 | + |
1874 | +# The MSCFILE_DIRS tag can be used to specify one or more directories that |
1875 | +# contain msc files that are included in the documentation (see the |
1876 | +# \mscfile command). |
1877 | + |
1878 | +MSCFILE_DIRS = |
1879 | + |
1880 | +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of |
1881 | +# nodes that will be shown in the graph. If the number of nodes in a graph |
1882 | +# becomes larger than this value, doxygen will truncate the graph, which is |
1883 | +# visualized by representing a node as a red box. Note that doxygen if the |
1884 | +# number of direct children of the root node in a graph is already larger than |
1885 | +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note |
1886 | +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. |
1887 | + |
1888 | +DOT_GRAPH_MAX_NODES = 50 |
1889 | + |
1890 | +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the |
1891 | +# graphs generated by dot. A depth value of 3 means that only nodes reachable |
1892 | +# from the root by following a path via at most 3 edges will be shown. Nodes |
1893 | +# that lay further from the root node will be omitted. Note that setting this |
1894 | +# option to 1 or 2 may greatly reduce the computation time needed for large |
1895 | +# code bases. Also note that the size of a graph can be further restricted by |
1896 | +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. |
1897 | + |
1898 | +MAX_DOT_GRAPH_DEPTH = 0 |
1899 | + |
1900 | +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent |
1901 | +# background. This is disabled by default, because dot on Windows does not |
1902 | +# seem to support this out of the box. Warning: Depending on the platform used, |
1903 | +# enabling this option may lead to badly anti-aliased labels on the edges of |
1904 | +# a graph (i.e. they become hard to read). |
1905 | + |
1906 | +DOT_TRANSPARENT = NO |
1907 | + |
1908 | +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output |
1909 | +# files in one run (i.e. multiple -o and -T options on the command line). This |
1910 | +# makes dot run faster, but since only newer versions of dot (>1.8.10) |
1911 | +# support this, this feature is disabled by default. |
1912 | + |
1913 | +DOT_MULTI_TARGETS = NO |
1914 | + |
1915 | +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will |
1916 | +# generate a legend page explaining the meaning of the various boxes and |
1917 | +# arrows in the dot generated graphs. |
1918 | + |
1919 | +GENERATE_LEGEND = YES |
1920 | + |
1921 | +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will |
1922 | +# remove the intermediate dot files that are used to generate |
1923 | +# the various graphs. |
1924 | + |
1925 | +DOT_CLEANUP = YES |
1926 | |
1927 | === modified file 'plugins/Observability/src/Observability.cpp' |
1928 | --- plugins/Observability/src/Observability.cpp 2014-03-01 09:50:05 +0000 |
1929 | +++ plugins/Observability/src/Observability.cpp 2014-04-04 19:35:45 +0000 |
1930 | @@ -16,40 +16,41 @@ |
1931 | * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. |
1932 | */ |
1933 | |
1934 | +#include <QDebug> |
1935 | +#include <QKeyEvent> |
1936 | +#include <QMouseEvent> |
1937 | +#include <QPixmap> |
1938 | #include <QSettings> |
1939 | -#include <QPixmap> |
1940 | +#include <QString> |
1941 | #include <QTimer> |
1942 | -#include <QString> |
1943 | -#include <QDebug> |
1944 | -#include <QKeyEvent> |
1945 | -#include <QtNetwork> |
1946 | -#include <QKeyEvent> |
1947 | -#include <QMouseEvent> |
1948 | - |
1949 | -#include "StelIniParser.hpp" |
1950 | -#include "StelProjector.hpp" |
1951 | + |
1952 | +//#include <QtNetwork> // Why do we need a full part of the framwork again? |
1953 | + |
1954 | +#include "Observability.hpp" |
1955 | +#include "ObservabilityDialog.hpp" |
1956 | + |
1957 | +#include "Planet.hpp" |
1958 | +#include "SolarSystem.hpp" |
1959 | #include "StarMgr.hpp" |
1960 | -#include "StelObject.hpp" |
1961 | -#include "StelObserver.hpp" |
1962 | -#include "StelUtils.hpp" |
1963 | +#include "StelActionMgr.hpp" |
1964 | #include "StelApp.hpp" |
1965 | -#include "StelObjectMgr.hpp" |
1966 | +#include "StelCore.hpp" |
1967 | +#include "StelFader.hpp" |
1968 | +#include "StelFileMgr.hpp" |
1969 | +#include "StelGui.hpp" |
1970 | +#include "StelGuiItems.hpp" |
1971 | +#include "StelIniParser.hpp" |
1972 | #include "StelLocaleMgr.hpp" |
1973 | #include "StelModuleMgr.hpp" |
1974 | -#include "StelGui.hpp" |
1975 | -#include "StelGuiItems.hpp" |
1976 | #include "StelMovementMgr.hpp" |
1977 | -#include "StelFileMgr.hpp" |
1978 | -#include "StelVertexArray.hpp" |
1979 | -#include "StelCore.hpp" |
1980 | -#include "StelPainter.hpp" |
1981 | +#include "StelObject.hpp" |
1982 | +#include "StelObjectMgr.hpp" |
1983 | +#include "StelObserver.hpp" |
1984 | +#include "StelProjector.hpp" |
1985 | #include "StelSkyDrawer.hpp" |
1986 | -#include "Observability.hpp" |
1987 | -#include "ObservabilityDialog.hpp" |
1988 | +#include "StelUtils.hpp" |
1989 | +#include "ZoneArray.hpp" |
1990 | |
1991 | -#include "SolarSystem.hpp" |
1992 | -#include "Planet.hpp" |
1993 | -#include "StelFader.hpp" |
1994 | |
1995 | StelModule* ObservabilityStelPluginInterface::getStelModule() const |
1996 | { |
1997 | @@ -70,13 +71,15 @@ |
1998 | return info; |
1999 | } |
2000 | |
2001 | + |
2002 | + |
2003 | Observability::Observability() |
2004 | - : flagShowObservability(false), OnIcon(NULL), OffIcon(NULL), GlowIcon(NULL),toolbarButton(NULL) |
2005 | + : ObserverLoc(0.), flagShowReport(false), button(NULL) |
2006 | { |
2007 | setObjectName("Observability"); |
2008 | configDialog = new ObservabilityDialog(); |
2009 | |
2010 | - |
2011 | + // TODO: Migrate to static const? --BM |
2012 | // Some useful constants: |
2013 | Rad2Deg = 180./3.1415927; // Convert degrees into radians |
2014 | Rad2Hr = 12./3.1415927; // Convert hours into radians |
2015 | @@ -86,107 +89,37 @@ |
2016 | halfpi = 1.57079632675; // pi/2 |
2017 | MoonT = 29.530588; // Moon synodic period (used as first estimate of Full Moon). |
2018 | RefFullMoon = 2451564.696; // Reference Julian date of a Full Moon. |
2019 | - MoonPerilune = 0.0024236308; // Smallest Earth-Moon distance (in AU). |
2020 | + MoonPerilune = 0.0024236308; // Smallest Earth-Moon distance (in AU). |
2021 | + |
2022 | nextFullMoon = 0.0; |
2023 | prevFullMoon = 0.0; |
2024 | - RefracHoriz = 0.0; // Geometric altitude at refraction-corrected horizon. |
2025 | + refractedHorizonAlt = 0.0; |
2026 | selName = ""; |
2027 | |
2028 | - |
2029 | - |
2030 | -//////////////////////////// |
2031 | -// Read configuration: |
2032 | - |
2033 | - QSettings* conf = StelApp::getInstance().getSettings(); |
2034 | - // Setup defaults if not present |
2035 | - conf->beginGroup("Observability"); |
2036 | - if (!conf->contains("font_size")) |
2037 | - conf->setValue("font_size", 15); |
2038 | - |
2039 | - if (!conf->contains("font_color")) |
2040 | - conf->setValue("font_color", "0,0.5,1"); |
2041 | - |
2042 | - if (!conf->contains("show_AcroCos")) |
2043 | - conf->setValue("show_AcroCos", true); |
2044 | - |
2045 | - if (!conf->contains("show_Good_Nights")) |
2046 | - conf->setValue("show_Good_Nights", true); |
2047 | - |
2048 | - if (!conf->contains("show_Best_Night")) |
2049 | - conf->setValue("show_Best_Night", true); |
2050 | - |
2051 | - if (!conf->contains("show_Today")) |
2052 | - conf->setValue("show_Today", true); |
2053 | - |
2054 | - if (!conf->contains("Sun_Altitude")) |
2055 | - conf->setValue("Sun_Altitude", 12); |
2056 | - |
2057 | - if (!conf->contains("Horizon_Altitude")) |
2058 | - conf->setValue("Horizon_Altitude", 0); |
2059 | - |
2060 | - if (!conf->contains("show_FullMoon")) |
2061 | - conf->setValue("show_FullMoon", true); |
2062 | - |
2063 | -// if (!conf->contains("show_Crescent")) |
2064 | -// conf->setValue("show_Crescent", true); |
2065 | - |
2066 | -// if (!conf->contains("show_SuperMoon")) |
2067 | -// conf->setValue("show_SuperMoon", true); |
2068 | - |
2069 | - |
2070 | - // Load settings from main config file |
2071 | - fontSize = conf->value("font_size",15).toInt(); |
2072 | - iAltitude = conf->value("Sun_Altitude",12).toInt(); |
2073 | - iHorizAltitude = conf->value("Horizon_Altitude",0).toInt(); |
2074 | - AstroTwiAlti = -((double) iAltitude)/Rad2Deg ; |
2075 | - HorizAlti = ((double) iHorizAltitude)/Rad2Deg ; |
2076 | - font.setPixelSize(fontSize); |
2077 | - QString fontColorStr = conf->value("font_color", "0,0.5,1").toString(); |
2078 | - fontColor = StelUtils::strToVec3f(fontColorStr); |
2079 | - show_AcroCos = conf->value("show_AcroCos", true).toBool(); |
2080 | - show_Good_Nights = conf->value("show_Good_Nights", true).toBool(); |
2081 | - show_Best_Night = conf->value("show_Best_Night", true).toBool(); |
2082 | - show_Today = conf->value("show_Today", true).toBool(); |
2083 | - show_FullMoon = conf->value("show_FullMoon", true).toBool(); |
2084 | -// show_Crescent = conf->value("show_Crescent", true).toBool(); |
2085 | -// show_SuperMoon = conf->value("show_SuperMoon", true).toBool(); |
2086 | - |
2087 | - conf->endGroup(); |
2088 | -///////////////////////////////// |
2089 | - |
2090 | - // Apply format for date from main settings |
2091 | - if (conf->value("localization/date_display_format", "system_default").toString() == "ddmmyyyy") |
2092 | - setDateFormat(true); |
2093 | - else |
2094 | - setDateFormat(false); |
2095 | - |
2096 | // Dummy initial values for parameters and data vectors: |
2097 | mylat = 1000.; mylon = 1000.; |
2098 | myJD = 0.0; |
2099 | - currYear = 0; |
2100 | + curYear = 0; |
2101 | isStar = true; |
2102 | isMoon = false; |
2103 | isSun = false; |
2104 | isScreen = true; |
2105 | - raised=false; |
2106 | - |
2107 | - ObserverLoc[0]=0.0;ObserverLoc[1]=0.0;ObserverLoc[2]=0.0; |
2108 | - |
2109 | -//Get pointer to the Earth: |
2110 | + |
2111 | + //Get pointer to the Earth: |
2112 | PlanetP Earth = GETSTELMODULE(SolarSystem)->getEarth(); |
2113 | myEarth = Earth.data(); |
2114 | |
2115 | -// Get pointer to the Moon/Sun: |
2116 | + // Get pointer to the Moon/Sun: |
2117 | PlanetP Moon = GETSTELMODULE(SolarSystem)->getMoon(); |
2118 | myMoon = Moon.data(); |
2119 | |
2120 | - |
2121 | + // I think this can be done in a more simple way...--BM |
2122 | for (int i=0;i<366;i++) { |
2123 | - SunRA[i] = 0.0; SunDec[i] = 0.0; |
2124 | - ObjectRA[i] = 0.0; ObjectDec[i]=0.0; |
2125 | - SunSidT[0][i]=0.0; SunSidT[1][i]=0.0; |
2126 | - ObjectSidT[0][i]=0.0; ObjectSidT[1][i]=0.0; |
2127 | - ObjectH0[i] = 0.0; |
2128 | + sunRA[i] = 0.0; sunDec[i] = 0.0; |
2129 | + objectRA[i] = 0.0; objectDec[i]=0.0; |
2130 | + sunSidT[0][i]=0.0; sunSidT[1][i]=0.0; |
2131 | + objectSidT[0][i]=0.0; objectSidT[1][i]=0.0; |
2132 | + objectH0[i] = 0.0; |
2133 | yearJD[i] = 0.0; |
2134 | }; |
2135 | |
2136 | @@ -194,26 +127,33 @@ |
2137 | |
2138 | Observability::~Observability() |
2139 | { |
2140 | - if (GlowIcon!=NULL) |
2141 | - delete GlowIcon; |
2142 | - if (OnIcon!=NULL) |
2143 | - delete OnIcon; |
2144 | - if (OffIcon!=NULL) |
2145 | - delete OffIcon; |
2146 | - delete configDialog; |
2147 | + // Shouldn't this be in the deinit()? --BM |
2148 | + if (configDialog != NULL) |
2149 | + delete configDialog; |
2150 | } |
2151 | |
2152 | void Observability::updateMessageText() |
2153 | { |
2154 | // Set names of the months: |
2155 | - QString mons[12]={qc_("Jan", "short month name"), qc_("Feb", "short month name"), qc_("Mar", "short month name"), qc_("Apr", "short month name"), qc_("May", "short month name"), qc_("Jun", "short month name"), qc_("Jul", "short month name"), qc_("Aug", "short month name"), qc_("Sep", "short month name"), qc_("Oct", "short month name"), qc_("Nov", "short month name"), qc_("Dec", "short month name")}; |
2156 | - |
2157 | - for (int i=0;i<12;i++) { |
2158 | - months[i]=mons[i]; |
2159 | - }; |
2160 | - |
2161 | + monthNames.clear(); |
2162 | + monthNames << qc_("Jan", "short month name") |
2163 | + << qc_("Feb", "short month name") |
2164 | + << qc_("Mar", "short month name") |
2165 | + << qc_("Apr", "short month name") |
2166 | + << qc_("May", "short month name") |
2167 | + << qc_("Jun", "short month name") |
2168 | + << qc_("Jul", "short month name") |
2169 | + << qc_("Aug", "short month name") |
2170 | + << qc_("Sep", "short month name") |
2171 | + << qc_("Oct", "short month name") |
2172 | + << qc_("Nov", "short month name") |
2173 | + << qc_("Dec", "short month name"); |
2174 | + |
2175 | + // TRANSLATORS: Short for "hours". |
2176 | msgH = q_("h"); |
2177 | + // TRANSLATORS: Short for "minutes". |
2178 | msgM = q_("m"); |
2179 | + // TRANSLATORS: Short for "seconds". |
2180 | msgS = q_("s"); |
2181 | msgSetsAt = q_("Sets at %1 (in %2)"); |
2182 | msgRoseAt = q_("Rose at %1 (%2 ago)"); |
2183 | @@ -224,79 +164,82 @@ |
2184 | msgCulminatesAt = q_("Culminates at %1 (in %2) at %3 deg."); |
2185 | msgCulminatedAt = q_("Culminated at %1 (%2 ago) at %3 deg."); |
2186 | msgSrcNotObs = q_("Source is not observable."); |
2187 | - msgNoACRise = q_("No Acronychal nor Cosmical rise/set."); |
2188 | - msgGreatElong = q_("Greatest elongation: "); |
2189 | - msgLargSSep = q_("Largest Sun separation: "); |
2190 | - msgAtDeg = q_(" (at %1 deg.)"); |
2191 | + msgNoACRise = q_("No acronychal nor cosmical rise/set."); |
2192 | + msgGreatElong = q_("Greatest elongation: %1 (at %2 deg.)"); |
2193 | + msgLargSSep = q_("Largest Sun separation: %1 (at %2 deg.)"); |
2194 | msgNone = q_("None"); |
2195 | - msgAcroRise = q_("Acronychal rise/set"); |
2196 | - msgNoAcroRise = q_("No Acronychal rise/set."); |
2197 | - msgCosmRise = q_("Cosmical rise/set"); |
2198 | - msgNoCosmRise = q_("No Cosmical rise/set."); |
2199 | + // TRANSLATORS: The space at the end is significant - another sentence may follow. |
2200 | + msgAcroRise = q_("Acronychal rise/set: %1/%2. "); |
2201 | + // TRANSLATORS: The space at the end is significant - another sentence may follow. |
2202 | + msgNoAcroRise = q_("No acronychal rise/set. "); |
2203 | + msgCosmRise = q_("Cosmical rise/set: %1/%2."); |
2204 | + msgNoCosmRise = q_("No cosmical rise/set."); |
2205 | msgWholeYear = q_("Observable during the whole year."); |
2206 | msgNotObs = q_("Not observable at dark night."); |
2207 | - msgAboveHoriz = q_("Nights above horizon: "); |
2208 | + msgAboveHoriz = q_("Nights above horizon: %1"); |
2209 | msgToday = q_("TODAY:"); |
2210 | msgThisYear = q_("THIS YEAR:"); |
2211 | + // TRANSLATORS: The space at the end is significant - another sentence may follow. |
2212 | msgPrevFullMoon = q_("Previous Full Moon: %1 %2 at %3:%4. "); |
2213 | msgNextFullMoon = q_("Next Full Moon: %1 %2 at %3:%4. "); |
2214 | } |
2215 | |
2216 | double Observability::getCallOrder(StelModuleActionName actionName) const |
2217 | { |
2218 | - if (actionName==StelModule::ActionDraw) |
2219 | - return StelApp::getInstance().getModuleMgr().getModule("LandscapeMgr")->getCallOrder(actionName)+10.; |
2220 | - return 0; |
2221 | + if (actionName==StelModule::ActionDraw) |
2222 | + return StelApp::getInstance().getModuleMgr().getModule("LandscapeMgr")->getCallOrder(actionName)+10.; |
2223 | + return 0; |
2224 | } |
2225 | |
2226 | void Observability::init() |
2227 | { |
2228 | - qDebug() << "init called for Observability"; |
2229 | - |
2230 | - try |
2231 | - { |
2232 | - StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); |
2233 | - GlowIcon = new QPixmap(":/graphicGui/glow32x32.png"); |
2234 | - OnIcon = new QPixmap(":/observability/bt_observab_on.png"); |
2235 | - OffIcon = new QPixmap(":/observability/bt_observab_off.png"); |
2236 | - |
2237 | - addAction("actionShow_Observability", N_("Observability"), N_("Observability"), "enabled"); |
2238 | - addAction("actionShow_Observability_ConfigDialog", N_("Observability"), N_("Observability configuration window"), configDialog, "visible"); |
2239 | - toolbarButton = new StelButton(NULL, *OnIcon, *OffIcon, *GlowIcon, "actionShow_Observability"); |
2240 | - gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup"); |
2241 | - } |
2242 | - catch (std::exception &e) |
2243 | - { |
2244 | - qWarning() << "WARNING: unable create toolbar button for Observability plugin (or load gonfig GUI). " << e.what(); |
2245 | - }; |
2246 | - |
2247 | - updateMessageText(); |
2248 | - connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(updateMessageText())); |
2249 | + loadConfiguration(); |
2250 | + |
2251 | + StelAction* actionShow = addAction("actionShow_Observability", |
2252 | + N_("Observability"), |
2253 | + N_("Observability"), |
2254 | + "flagShowReport"); |
2255 | + // actionShow->setChecked(flagShowReport); //Unnecessary? |
2256 | + addAction("actionShow_Observability_ConfigDialog", |
2257 | + N_("Observability"), |
2258 | + N_("Observability configuration window"), |
2259 | + configDialog, "visible"); |
2260 | + |
2261 | + StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); |
2262 | + button = new StelButton(NULL, |
2263 | + QPixmap(":/observability/bt_observab_on.png"), |
2264 | + QPixmap(":/observability/bt_observab_off.png"), |
2265 | + QPixmap(":/graphicGui/glow32x32.png"), |
2266 | + actionShow); |
2267 | + gui->getButtonBar()->addButton(button, "065-pluginsGroup"); |
2268 | + |
2269 | + updateMessageText(); |
2270 | + connect(&StelApp::getInstance(), SIGNAL(languageChanged()), |
2271 | + this, SLOT(updateMessageText())); |
2272 | } |
2273 | |
2274 | ///////////////////////////////////////////// |
2275 | // MAIN CODE: |
2276 | void Observability::draw(StelCore* core) |
2277 | { |
2278 | - |
2279 | - if (!flagShowObservability) return; // Button is off. |
2280 | + if (!flagShowReport) |
2281 | + return; // Button is off. |
2282 | |
2283 | ///////////////////////////////////////////////////////////////// |
2284 | // PRELIMINARS: |
2285 | bool locChanged, yearChanged; |
2286 | StelObjectP selectedObject; |
2287 | - Planet* currPlanet; |
2288 | - PlanetP Object, parent; |
2289 | + PlanetP ssObject, parentPlanet; |
2290 | |
2291 | // Only execute plugin if we are on Earth. |
2292 | - if (core->getCurrentLocation().planetName != "Earth") {return;}; |
2293 | + if (core->getCurrentLocation().planetName != "Earth") |
2294 | + return; |
2295 | |
2296 | // Set the painter: |
2297 | - StelPainter paintresult(core->getProjection2d()); |
2298 | - paintresult.setColor(fontColor[0],fontColor[1],fontColor[2],1); |
2299 | + StelPainter painter(core->getProjection2d()); |
2300 | + painter.setColor(fontColor[0],fontColor[1],fontColor[2],1); |
2301 | font.setPixelSize(fontSize); |
2302 | - paintresult.setFont(font); |
2303 | - |
2304 | + painter.setFont(font); |
2305 | |
2306 | // Get current date, location, and check if there is something selected. |
2307 | double currlat = (core->getCurrentLocation().latitude)/Rad2Deg; |
2308 | @@ -312,7 +255,7 @@ |
2309 | double currLocalT = 24.*modf(currJD + GMTShift,&currJDint); |
2310 | |
2311 | int auxm, auxd, auxy; |
2312 | - StelUtils::getDateFromJulianDay(currJD,&auxy,&auxm,&auxd); |
2313 | + StelUtils::getDateFromJulianDay(currJD, &auxy, &auxm, &auxd); |
2314 | bool isSource = StelApp::getInstance().getStelObjectMgr().getWasSelected(); |
2315 | bool show_Year = show_Best_Night || show_Good_Nights || show_AcroCos; |
2316 | |
2317 | @@ -325,19 +268,25 @@ |
2318 | // Update JD. |
2319 | myJD = currJD; |
2320 | |
2321 | -// If we have changed the year, we must recompute the Sun's position for each new day: |
2322 | - if (auxy != currYear) { |
2323 | +// If the year changed, we must recompute the Sun's position for each new day: |
2324 | + if (auxy != curYear) |
2325 | + { |
2326 | yearChanged = true; |
2327 | - currYear = auxy; |
2328 | - SunRADec(core);} |
2329 | - else { |
2330 | + curYear = auxy; |
2331 | + updateSunData(core); |
2332 | + } |
2333 | + else |
2334 | + { |
2335 | yearChanged = false; |
2336 | }; |
2337 | |
2338 | // Have we changed the latitude or longitude? |
2339 | - if (currlat == mylat && currlon == mylon) { |
2340 | - locChanged = false;} |
2341 | - else { |
2342 | + if (currlat == mylat && currlon == mylon) |
2343 | + { |
2344 | + locChanged = false; |
2345 | + } |
2346 | + else |
2347 | + { |
2348 | locChanged = true; |
2349 | mylat = currlat; mylon = currlon; |
2350 | double temp1 = currheight*std::cos(currlat); |
2351 | @@ -350,16 +299,18 @@ |
2352 | |
2353 | // Add refraction, if necessary: |
2354 | Vec3d TempRefr; |
2355 | - TempRefr[0] = std::cos(HorizAlti); |
2356 | + TempRefr[0] = std::cos(horizonAltitude); |
2357 | TempRefr[1] = 0.0; |
2358 | - TempRefr[2] = std::sin(HorizAlti); |
2359 | + TempRefr[2] = std::sin(horizonAltitude); |
2360 | Vec3d CorrRefr = core->altAzToEquinoxEqu(TempRefr,StelCore::RefractionAuto); |
2361 | TempRefr = core->equinoxEquToAltAz(CorrRefr,StelCore::RefractionOff); |
2362 | double RefracAlt = std::asin(TempRefr[2]); |
2363 | |
2364 | - if (std::abs(RefracHoriz-RefracAlt)>2.91e-4) // Diference larger than 1 arcminute. |
2365 | - { // Configuration for refraction changed notably: |
2366 | - RefracHoriz = RefracAlt; |
2367 | + // If the diference is larger than 1 arcminute... |
2368 | + if (std::abs(refractedHorizonAlt-RefracAlt)>2.91e-4) |
2369 | + { |
2370 | + //... configuration for refraction changed notably. |
2371 | + refractedHorizonAlt = RefracAlt; |
2372 | configChanged = true; |
2373 | souChanged = true; |
2374 | }; |
2375 | @@ -372,7 +323,7 @@ |
2376 | // angles at twilight, and re-compute Sun/Moon ephemeris (if selected): |
2377 | if (locChanged || yearChanged || configChanged) |
2378 | { |
2379 | - SunHTwi(); |
2380 | + updateSunH(); |
2381 | lastJDMoon = 0.0; |
2382 | }; |
2383 | |
2384 | @@ -382,42 +333,48 @@ |
2385 | ////////////////////////////////////////////////////////////////// |
2386 | // NOW WE DEAL WITH THE SOURCE (OR SCREEN-CENTER) POSITION: |
2387 | |
2388 | - if (isScreen) souChanged=true; // Always re-compute everything for the screen center. |
2389 | + if (isScreen) // Always re-compute everything for the screen center. |
2390 | + souChanged = true; |
2391 | |
2392 | - if (isSource) { // There is something selected! |
2393 | + if (isSource) // There is something selected! |
2394 | + { |
2395 | |
2396 | // Get the selected source and its name: |
2397 | selectedObject = StelApp::getInstance().getStelObjectMgr().getSelectedObject()[0]; |
2398 | |
2399 | // Don't do anything for satellites: |
2400 | - if(selectedObject->getType()== "Satellite") return; |
2401 | - |
2402 | - QString tempName = selectedObject->getEnglishName(); |
2403 | - |
2404 | -// Check if the source is Sun or Moon (i.e., it changes quite a bit during one day): |
2405 | - isMoon = ("Moon" == tempName)?true:false; |
2406 | - isSun = ("Sun" == tempName)?true:false; |
2407 | + if(selectedObject->getType() == "Satellite") |
2408 | + return; |
2409 | + |
2410 | + QString name = selectedObject->getEnglishName(); |
2411 | + isMoon = ("Moon" == name); |
2412 | + isSun = ("Sun" == name); |
2413 | |
2414 | // If Moon is not selected (or was unselected), force re-compute of Full Moon next time it is selected: |
2415 | - if (!isMoon) {prevFullMoon=0.0; nextFullMoon=0.0;}; |
2416 | + if (!isMoon) |
2417 | + { |
2418 | + prevFullMoon = 0.0; |
2419 | + nextFullMoon = 0.0; |
2420 | + }; |
2421 | |
2422 | //Update position: |
2423 | EquPos = selectedObject->getEquinoxEquatorialPos(core); |
2424 | EquPos.normalize(); |
2425 | - LocPos = core->equinoxEquToAltAz(EquPos,StelCore::RefractionOff); |
2426 | + LocPos = core->equinoxEquToAltAz(EquPos, StelCore::RefractionOff); |
2427 | |
2428 | // Check if the user has changed the source (or if the source is Sun/Moon). |
2429 | - if (tempName == selName) |
2430 | + if (name == selName) |
2431 | { |
2432 | - souChanged = false;} |
2433 | + souChanged = false; |
2434 | + } |
2435 | else |
2436 | { // Check also if the (new) source belongs to the Solar System: |
2437 | |
2438 | souChanged = true; |
2439 | - selName = tempName; |
2440 | + selName = name; |
2441 | |
2442 | - currPlanet = dynamic_cast<Planet*>(selectedObject.data()); |
2443 | - isStar = (currPlanet)?false:true; |
2444 | + Planet* planet = dynamic_cast<Planet*>(selectedObject.data()); |
2445 | + isStar = (planet == NULL); |
2446 | |
2447 | if (!isStar && !isMoon && !isSun) // Object in the Solar System, but is not Sun nor Moon. |
2448 | { |
2449 | @@ -425,39 +382,45 @@ |
2450 | int gene = -1; |
2451 | |
2452 | // If object is a planet's moon, we get its parent planet: |
2453 | - Object = GETSTELMODULE(SolarSystem)->searchByEnglishName(selName); |
2454 | - |
2455 | - parent = Object->getParent(); |
2456 | - |
2457 | - if (parent) |
2458 | - { |
2459 | - while (parent) { |
2460 | - gene += 1; |
2461 | - parent = parent->getParent();} |
2462 | - }; |
2463 | - for (int g=0; g<gene;g++) { |
2464 | - Object = Object->getParent(); |
2465 | - }; |
2466 | - |
2467 | + ssObject = GETSTELMODULE(SolarSystem)->searchByEnglishName(selName); |
2468 | + // TODO: Isn't it easier just to use the planet object we just cast? --BM |
2469 | + |
2470 | + parentPlanet = ssObject->getParent(); |
2471 | + if (parentPlanet) |
2472 | + { |
2473 | + while (parentPlanet) |
2474 | + { |
2475 | + gene += 1; |
2476 | + parentPlanet = parentPlanet->getParent(); |
2477 | + } |
2478 | + } |
2479 | + for (int g=0; g<gene; g++) |
2480 | + { |
2481 | + ssObject = ssObject->getParent(); |
2482 | + } |
2483 | + |
2484 | // Now get a pointer to the planet's instance: |
2485 | - myPlanet = Object.data(); |
2486 | - }; |
2487 | - |
2488 | - }; |
2489 | + myPlanet = ssObject.data(); |
2490 | + } |
2491 | + } |
2492 | } |
2493 | - else { // There is no source selected! |
2494 | - |
2495 | -// If no source is selected, get the position vector of the screen center: |
2496 | - selName = ""; isStar=true; isMoon = false; isSun = false; isScreen=true; |
2497 | + else // There is no source selected! |
2498 | + { |
2499 | + // If no source is selected, get the position vector of the screen center: |
2500 | + selName.clear(); |
2501 | + isStar = true; |
2502 | + isMoon = false; |
2503 | + isSun = false; |
2504 | + isScreen = true; |
2505 | Vec3d currentPos = GETSTELMODULE(StelMovementMgr)->getViewDirectionJ2000(); |
2506 | currentPos.normalize(); |
2507 | EquPos = core->j2000ToEquinoxEqu(currentPos); |
2508 | - LocPos = core->j2000ToAltAz(currentPos,StelCore::RefractionOff); |
2509 | + LocPos = core->j2000ToAltAz(currentPos, StelCore::RefractionOff); |
2510 | } |
2511 | |
2512 | |
2513 | // Convert EquPos to RA/Dec: |
2514 | - toRADec(EquPos,selRA,selDec); |
2515 | + toRADec(EquPos, selRA, selDec); |
2516 | |
2517 | // Compute source's altitude (in radians): |
2518 | alti = std::asin(LocPos[2]); |
2519 | @@ -474,72 +437,92 @@ |
2520 | |
2521 | ///////////////////////////////////////////////////////////////// |
2522 | // NOW WE COMPUTE RISE/SET/TRANSIT TIMES FOR THE CURRENT DAY: |
2523 | - double currH = HourAngle(mylat,alti,selDec); |
2524 | - horizH = HourAngle(mylat,RefracHoriz,selDec); |
2525 | + double currH = calculateHourAngle(mylat,alti,selDec); |
2526 | + horizH = calculateHourAngle(mylat,refractedHorizonAlt,selDec); |
2527 | QString RS1, RS2, Cul; // strings with Rise/Set/Culmination times |
2528 | - double Rise=0, Set=0; // Actual Rise/Set times (in GMT). |
2529 | + double risingTime = 0, settingTime = 0; // Actual Rise/Set times (in GMT). |
2530 | int d1,m1,s1,d2,m2,s2,dc,mc,sc; // Integers for the time spans in hh:mm:ss. |
2531 | bool solvedMoon = false; // Check if solutions were found for Sun, Moon, or planet. |
2532 | bool transit = false; // Is the source above the horizon? Did it culminate? |
2533 | |
2534 | int ephHour, ephMinute, ephSecond; // Local time for selected ephemeris |
2535 | |
2536 | - if (show_Today) { // We show ephemeris for today (i.e., rise, set, and transit times). |
2537 | - |
2538 | - |
2539 | + if (show_Today) |
2540 | + { |
2541 | + // Today's ephemeris (rise, set, and transit times) |
2542 | if (!isStar) |
2543 | { |
2544 | - int Kind = (isSun)?1:0; // Set "Kind" according to the selected object. |
2545 | - Kind += (isMoon)?2:0; Kind += (!isSun && !isMoon)?3:0; |
2546 | - |
2547 | - solvedMoon = SolarSystemSolve(core, Kind); // False if fails; True otherwise. |
2548 | + int type = (isSun) ? 1:0; |
2549 | + type += (isMoon) ? 2:0; |
2550 | + type += (!isSun && !isMoon) ? 3:0; |
2551 | + |
2552 | + // Returns false if the calculation fails... |
2553 | + solvedMoon = calculateSolarSystemEvents(core, type); |
2554 | currH = std::abs(24.*(MoonCulm-myJD)/TFrac); |
2555 | transit = MoonCulm-myJD<0.0; |
2556 | - if (solvedMoon) { // If failed, Set and Rise will be dummy. |
2557 | - Set = std::abs(24.*(MoonSet-myJD)/TFrac); |
2558 | - Rise = std::abs(24.*(MoonRise-myJD)/TFrac); |
2559 | - }; |
2560 | - } else if (horizH>0.0) { // The source is not circumpolar and can be seen from this latitude. |
2561 | - |
2562 | - if ( LocPos[1]>0.0 ) { // The source is at the eastern side... |
2563 | - if ( currH>horizH ) { // ... and below the horizon. |
2564 | - Set = 24.-currH-horizH; |
2565 | - Rise = currH-horizH; |
2566 | - raised = false;} |
2567 | - else { // ... and above the horizon. |
2568 | - Rise = horizH-currH; |
2569 | - Set = 2.*horizH-Rise; |
2570 | - raised = true;}; |
2571 | - } |
2572 | - else { // The source is at the western side... |
2573 | - if ( currH>horizH ) { // ... and below the horizon. |
2574 | - Set = currH-horizH; |
2575 | - Rise = 24.-currH-horizH; |
2576 | - raised = false;} |
2577 | - else { // ... and above the horizon. |
2578 | - Rise = horizH+currH; |
2579 | - Set = horizH-currH; |
2580 | - raised = true;}; |
2581 | - }; |
2582 | - |
2583 | - }; |
2584 | - |
2585 | + if (solvedMoon) |
2586 | + { // If failed, Set and Rise will be dummy. |
2587 | + settingTime = std::abs(24.*(MoonSet-myJD)/TFrac); |
2588 | + risingTime = std::abs(24.*(MoonRise-myJD)/TFrac); |
2589 | + } |
2590 | + } |
2591 | + else if (horizH>0.0) |
2592 | + { // The source is not circumpolar and can be seen from this latitude. |
2593 | + |
2594 | + if ( LocPos[1]>0.0 ) // The source is at the eastern side... |
2595 | + { |
2596 | + if ( currH>horizH ) // ... and below the horizon. |
2597 | + { |
2598 | + settingTime = 24.-currH-horizH; |
2599 | + risingTime = currH-horizH; |
2600 | + hasRisen = false; |
2601 | + } |
2602 | + else // ... and above the horizon. |
2603 | + { |
2604 | + risingTime = horizH-currH; |
2605 | + settingTime = 2.*horizH-risingTime; |
2606 | + hasRisen = true; |
2607 | + } |
2608 | + } |
2609 | + else // The source is at the western side... |
2610 | + { |
2611 | + if ( currH>horizH ) // ... and below the horizon. |
2612 | + { |
2613 | + settingTime = currH-horizH; |
2614 | + risingTime = 24.-currH-horizH; |
2615 | + hasRisen = false; |
2616 | + } |
2617 | + else // ... and above the horizon. |
2618 | + { |
2619 | + risingTime = horizH+currH; |
2620 | + settingTime = horizH-currH; |
2621 | + hasRisen = true; |
2622 | + } |
2623 | + } |
2624 | + } |
2625 | + |
2626 | if ((solvedMoon && MoonRise>0.0) || (!isSun && !isMoon && horizH>0.0)) |
2627 | { |
2628 | - double2hms(TFrac*Set,d1,m1,s1); |
2629 | - double2hms(TFrac*Rise,d2,m2,s2); |
2630 | - |
2631 | -// Strings with time spans for rise/set/transit: |
2632 | - RS1 = (d1==0)?"":QString("%1%2 ").arg(d1).arg(msgH); RS1 += (m1==0)?"":QString("%1%2 ").arg(m1).arg(msgM); RS1 += QString("%1%2").arg(s1).arg(msgS); |
2633 | - RS2 = (d2==0)?"":QString("%1%2 ").arg(d2).arg(msgH); RS2 += (m2==0)?"":QString("%1%2 ").arg(m2).arg(msgM); RS2 += QString("%1%2").arg(s2).arg(msgS); |
2634 | - if (raised) |
2635 | + double2hms(TFrac*settingTime, d1, m1, s1); |
2636 | + double2hms(TFrac*risingTime, d2, m2, s2); |
2637 | + |
2638 | + // Strings with time spans for rise/set/transit: |
2639 | + RS1 = (d1==0)?"":QString("%1%2 ").arg(d1).arg(msgH); |
2640 | + RS1 += (m1==0)?"":QString("%1%2 ").arg(m1).arg(msgM); |
2641 | + RS1 += QString("%1%2").arg(s1).arg(msgS); |
2642 | + RS2 = (d2==0)?"":QString("%1%2 ").arg(d2).arg(msgH); |
2643 | + RS2 += (m2==0)?"":QString("%1%2 ").arg(m2).arg(msgM); |
2644 | + RS2 += QString("%1%2").arg(s2).arg(msgS); |
2645 | + if (hasRisen) |
2646 | { |
2647 | - double2hms(toUnsignedRA(currLocalT+TFrac*Set+12.),ephHour,ephMinute,ephSecond); |
2648 | - SetTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); // Local time for set. |
2649 | + double2hms(toUnsignedRA(currLocalT+TFrac*settingTime+12.), |
2650 | + ephHour, ephMinute, ephSecond); |
2651 | + SetTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QChar('0')); // Local time for set. |
2652 | |
2653 | - double2hms(toUnsignedRA(currLocalT-TFrac*Rise+12.),ephHour,ephMinute,ephSecond); // Local time for rise. |
2654 | + double2hms(toUnsignedRA(currLocalT-TFrac*risingTime+12.), |
2655 | + ephHour, ephMinute, ephSecond); // Local time for rise. |
2656 | RiseTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2657 | - |
2658 | + |
2659 | //RS1 = q_("Sets at %1 (in %2)").arg(SetTime).arg(RS1); |
2660 | //RS2 = q_("Rose at %1 (%2 ago)").arg(RiseTime).arg(RS2); |
2661 | RS1 = msgSetsAt.arg(SetTime).arg(RS1); |
2662 | @@ -547,54 +530,61 @@ |
2663 | } |
2664 | else |
2665 | { |
2666 | - double2hms(toUnsignedRA(currLocalT-TFrac*Set+12.),ephHour,ephMinute,ephSecond); |
2667 | + double2hms(toUnsignedRA(currLocalT-TFrac*settingTime+12.), |
2668 | + ephHour, ephMinute, ephSecond); |
2669 | SetTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2670 | - |
2671 | - double2hms(toUnsignedRA(currLocalT+TFrac*Rise+12.),ephHour,ephMinute,ephSecond); |
2672 | + |
2673 | + double2hms(toUnsignedRA(currLocalT+TFrac*risingTime+12.), |
2674 | + ephHour, ephMinute, ephSecond); |
2675 | RiseTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2676 | - |
2677 | + |
2678 | //RS1 = q_("Set at %1 (%2 ago)").arg(SetTime).arg(RS1); |
2679 | //RS2 = q_("Rises at %1 (in %2)").arg(RiseTime).arg(RS2); |
2680 | RS1 = msgSetAt.arg(SetTime).arg(RS1); |
2681 | RS2 = msgRisesAt.arg(RiseTime).arg(RS2); |
2682 | - }; |
2683 | + } |
2684 | } |
2685 | - else { // The source is either circumpolar or never rises: |
2686 | - (alti>RefracHoriz)? RS1 = msgCircumpolar: RS1 = msgNoRise; |
2687 | + else // The source is either circumpolar or never rises: |
2688 | + { |
2689 | + (alti>refractedHorizonAlt)? RS1 = msgCircumpolar: RS1 = msgNoRise; |
2690 | RS2 = ""; |
2691 | }; |
2692 | - |
2693 | -// Culmination: |
2694 | - |
2695 | - if (isStar) |
2696 | - { |
2697 | - culmAlt = std::abs(mylat-selDec); // 90.-altitude at transit. |
2698 | - transit = LocPos[1]<0.0; |
2699 | - }; |
2700 | - |
2701 | - if (culmAlt<halfpi-RefracHoriz) { // Source can be observed. |
2702 | - double altiAtCulmi = Rad2Deg*(halfpi-culmAlt-RefracHoriz); |
2703 | - double2hms(TFrac*currH,dc,mc,sc); |
2704 | - |
2705 | -// String with the time span for culmination: |
2706 | - Cul = (dc==0)?"":QString("%1%2 ").arg(dc).arg(msgH); Cul += (mc==0)?"":QString("%1%2 ").arg(mc).arg(msgM); Cul += QString("%1%2").arg(sc).arg(msgS); |
2707 | - if (transit==false) { |
2708 | - |
2709 | - double2hms(toUnsignedRA(currLocalT+TFrac*currH+12.),ephHour,ephMinute,ephSecond); // Local time at transit. |
2710 | - CulmTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2711 | - //Cul = q_("Culminates at %1 (in %2) at %3 deg.").arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2712 | - Cul = msgCulminatesAt.arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2713 | + |
2714 | + // Culmination: |
2715 | + |
2716 | + if (isStar) |
2717 | + { |
2718 | + culmAlt = std::abs(mylat-selDec); // 90.-altitude at transit. |
2719 | + transit = LocPos[1]<0.0; |
2720 | + }; |
2721 | + |
2722 | + if (culmAlt < (halfpi - refractedHorizonAlt)) // Source can be observed. |
2723 | + { |
2724 | + double altiAtCulmi = Rad2Deg*(halfpi-culmAlt-refractedHorizonAlt); |
2725 | + double2hms(TFrac*currH,dc,mc,sc); |
2726 | + |
2727 | + //String with the time span for culmination: |
2728 | + Cul = (dc==0)?"":QString("%1%2 ").arg(dc).arg(msgH); |
2729 | + Cul += (mc==0)?"":QString("%1%2 ").arg(mc).arg(msgM); |
2730 | + Cul += QString("%1%2").arg(sc).arg(msgS); |
2731 | + if (!transit) |
2732 | + { |
2733 | + double2hms(toUnsignedRA(currLocalT + TFrac*currH + 12.), |
2734 | + ephHour, ephMinute, ephSecond); // Local time at transit. |
2735 | + CulmTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2736 | + //Cul = q_("Culminates at %1 (in %2) at %3 deg.").arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2737 | + Cul = msgCulminatesAt.arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2738 | + } |
2739 | + else |
2740 | + { |
2741 | + double2hms(toUnsignedRA(currLocalT - TFrac*currH + 12.), |
2742 | + ephHour, ephMinute, ephSecond); |
2743 | + CulmTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2744 | + //Cul = q_("Culminated at %1 (%2 ago) at %3 deg.").arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2745 | + Cul = msgCulminatedAt.arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2746 | + } |
2747 | } |
2748 | - else |
2749 | - { |
2750 | - double2hms(toUnsignedRA(currLocalT-TFrac*currH+12.),ephHour,ephMinute,ephSecond); |
2751 | - CulmTime = QString("%1:%2").arg(ephHour).arg(ephMinute,2,10,QLatin1Char('0')); |
2752 | - //Cul = q_("Culminated at %1 (%2 ago) at %3 deg.").arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2753 | - Cul = msgCulminatedAt.arg(CulmTime).arg(Cul).arg(altiAtCulmi,0,'f',1); |
2754 | - }; |
2755 | - }; |
2756 | - |
2757 | - }; // This comes from show_Today==True |
2758 | + } // This comes from show_Today==True |
2759 | //////////////////////////////////////////////////////////// |
2760 | |
2761 | |
2762 | @@ -606,140 +596,175 @@ |
2763 | |
2764 | if (isSun) |
2765 | { |
2766 | - bestNight=""; ObsRange = ""; |
2767 | + lineBestNight.clear(); |
2768 | + lineObservableRange.clear(); |
2769 | } |
2770 | - else if (!isMoon && show_Year) { |
2771 | - |
2772 | - if (isStar==false && (souChanged || yearChanged)) { // Object moves. |
2773 | - PlanetRADec(core);} // Re-compute ephemeris. |
2774 | - |
2775 | - else { // Object is fixed on the sky. |
2776 | - double auxH = HourAngle(mylat,RefracHoriz,selDec); |
2777 | + else if (!isMoon && show_Year) |
2778 | + { |
2779 | + |
2780 | + if (!isStar && (souChanged || yearChanged)) // Object moves. |
2781 | + updatePlanetData(core); // Re-compute ephemeris. |
2782 | + else |
2783 | + { // Object is fixed on the sky. |
2784 | + double auxH = calculateHourAngle(mylat,refractedHorizonAlt,selDec); |
2785 | double auxSidT1 = toUnsignedRA(selRA - auxH); |
2786 | double auxSidT2 = toUnsignedRA(selRA + auxH); |
2787 | for (int i=0;i<nDays;i++) { |
2788 | - ObjectH0[i] = auxH; |
2789 | - ObjectRA[i] = selRA; |
2790 | - ObjectDec[i] = selDec; |
2791 | - ObjectSidT[0][i] = auxSidT1; |
2792 | - ObjectSidT[1][i] = auxSidT2; |
2793 | + objectH0[i] = auxH; |
2794 | + objectRA[i] = selRA; |
2795 | + objectDec[i] = selDec; |
2796 | + objectSidT[0][i] = auxSidT1; |
2797 | + objectSidT[1][i] = auxSidT2; |
2798 | }; |
2799 | }; |
2800 | |
2801 | // Determine source observability (only if something changed): |
2802 | - if ((souChanged || locChanged || yearChanged)) { |
2803 | - bestNight=""; ObsRange = ""; |
2804 | + if ((souChanged || locChanged || yearChanged)) |
2805 | + { |
2806 | + lineBestNight.clear(); |
2807 | + lineObservableRange.clear(); |
2808 | |
2809 | - if (culmAlt>=halfpi-RefracHoriz) { // Source cannot be seen. |
2810 | + // Check if the target cannot be seen. |
2811 | + if (culmAlt >= (halfpi - refractedHorizonAlt)) |
2812 | + { |
2813 | //ObsRange = q_("Source is not observable."); |
2814 | //AcroCos = q_("No Acronychal nor Cosmical rise/set."); |
2815 | - ObsRange = msgSrcNotObs; |
2816 | - AcroCos = msgNoACRise; |
2817 | + lineObservableRange = msgSrcNotObs; |
2818 | + lineAcroCos = msgNoACRise; |
2819 | } |
2820 | - else { // Source can be seen. |
2821 | + else |
2822 | + { // Source can be seen. |
2823 | |
2824 | /////////////////////////// |
2825 | // - Part 1. Determine the best observing night (i.e., opposition to the Sun): |
2826 | - if (show_Best_Night) { |
2827 | + if (show_Best_Night) |
2828 | + { |
2829 | int selday = 0; |
2830 | double deltaPhs = -1.0; // Initial dummy value |
2831 | double tempPhs; |
2832 | - for (int i=0;i<nDays;i++) { // Maximize the Sun-object separation. |
2833 | - tempPhs = Lambda(ObjectRA[i],ObjectDec[i],SunRA[i],SunDec[i]); |
2834 | - if (tempPhs>deltaPhs) {selday=i;deltaPhs=tempPhs;}; |
2835 | - }; |
2836 | + for (int i=0; i<nDays; i++) // Maximize the Sun-object separation. |
2837 | + { |
2838 | + tempPhs = Lambda(objectRA[i], objectDec[i], |
2839 | + sunRA[i], sunDec[i]); |
2840 | + if (tempPhs > deltaPhs) |
2841 | + { |
2842 | + selday = i; |
2843 | + deltaPhs = tempPhs; |
2844 | + } |
2845 | + } |
2846 | |
2847 | if (selName=="Mercury" || selName=="Venus") |
2848 | { |
2849 | - //bestNight = q_("Greatest elongation: "); |
2850 | - bestNight = msgGreatElong; |
2851 | - } else |
2852 | + lineBestNight = msgGreatElong; |
2853 | + } |
2854 | + else |
2855 | { |
2856 | - //bestNight = q_("Largest Sun separation: "); |
2857 | - bestNight = msgLargSSep; |
2858 | - }; |
2859 | - |
2860 | - //bestNight = bestNight + CalenDate(selday) + q_(" (at %1 deg.)").arg(deltaPhs*Rad2Deg,0,'f',1); |
2861 | - bestNight = bestNight + CalenDate(selday) + msgAtDeg.arg(deltaPhs*Rad2Deg,0,'f',1); |
2862 | - }; |
2863 | + lineBestNight = msgLargSSep; |
2864 | + } |
2865 | + |
2866 | + lineBestNight = lineBestNight |
2867 | + .arg(formatAsDate(selday)) |
2868 | + .arg(deltaPhs*Rad2Deg, 0, 'f', 1); |
2869 | + } |
2870 | |
2871 | /////////////////////////////// |
2872 | // - Part 2. Determine Acronychal and Cosmical rise and set: |
2873 | |
2874 | - if (show_AcroCos) { |
2875 | - int selRise, selSet, selRise2, selSet2; // days of year for Acronical and Cosmical rise/set. |
2876 | - int Acro = CheckAcro(selRise,selSet,selRise2,selSet2); |
2877 | - QString AcroRiseStr, AcroSetStr; |
2878 | - QString CosmRiseStr, CosmSetStr; |
2879 | - |
2880 | - AcroRiseStr = (selRise>0)?CalenDate(selRise):msgNone; |
2881 | - AcroSetStr = (selSet>0)?CalenDate(selSet):msgNone; |
2882 | - |
2883 | - CosmRiseStr = (selRise2>0)?CalenDate(selRise2):msgNone; |
2884 | - CosmSetStr = (selSet2>0)?CalenDate(selSet2):msgNone; |
2885 | - |
2886 | - //AcroCos = (Acro==3 || Acro==1)?QString("%1: %2/%3.").arg(q_("Acronychal rise/set")).arg(AcroRiseStr).arg(AcroSetStr):q_("No Acronychal rise/set."); |
2887 | - //AcroCos += (Acro==3 || Acro==2)?QString(" %1: %2/%3.").arg(q_("Cosmical rise/set")).arg(CosmRiseStr).arg(CosmSetStr):QString(" %1").arg(q_("No Cosmical rise/set.")); |
2888 | - AcroCos = (Acro==3 || Acro==1)?QString("%1: %2/%3.").arg(msgAcroRise).arg(AcroRiseStr).arg(AcroSetStr):msgNoAcroRise; |
2889 | - AcroCos += (Acro==3 || Acro==2)?QString(" %1: %2/%3.").arg(msgCosmRise).arg(CosmRiseStr).arg(CosmSetStr):QString(" %1").arg(msgNoCosmRise); |
2890 | - |
2891 | - }; |
2892 | + if (show_AcroCos) |
2893 | + { |
2894 | + int acroRise, acroSet, cosRise, cosSet; |
2895 | + int result = calculateAcroCos(acroRise, acroSet, |
2896 | + cosRise, cosSet); |
2897 | + QString acroRiseStr, acroSetStr; |
2898 | + QString cosRiseStr, cosSetStr; |
2899 | + // TODO: Possible error? Day 0 is 1 Jan. |
2900 | + acroRiseStr = (acroRise>0)?formatAsDate(acroRise):msgNone; |
2901 | + acroSetStr = (acroSet>0)?formatAsDate(acroSet):msgNone; |
2902 | + cosRiseStr = (cosRise>0)?formatAsDate(cosRise):msgNone; |
2903 | + cosSetStr = (cosSet>0)?formatAsDate(cosSet):msgNone; |
2904 | + |
2905 | + if (result==3 || result==1) |
2906 | + lineAcroCos = msgAcroRise |
2907 | + .arg(acroRiseStr) |
2908 | + .arg(acroSetStr); |
2909 | + else |
2910 | + lineAcroCos = msgNoAcroRise; |
2911 | + |
2912 | + if (result==3 || result==2) |
2913 | + lineAcroCos += msgCosmRise |
2914 | + .arg(cosRiseStr) |
2915 | + .arg(cosSetStr); |
2916 | + else |
2917 | + lineAcroCos += msgNoCosmRise; |
2918 | + } |
2919 | |
2920 | |
2921 | //////////////////////////// |
2922 | // - Part 3. Determine range of good nights |
2923 | // (i.e., above horizon before/after twilight): |
2924 | |
2925 | - if (show_Good_Nights) { |
2926 | + if (show_Good_Nights) |
2927 | + { |
2928 | int selday = 0; |
2929 | int selday2 = 0; |
2930 | bool bestBegun = false; // Are we inside a good time range? |
2931 | bool atLeastOne = false; |
2932 | - QString dateRange = ""; |
2933 | - bool PoleNight, twiGood; |
2934 | - |
2935 | - for (int i=0;i<nDays;i++) { |
2936 | - |
2937 | - PoleNight = SunSidT[0][i]<0.0 && std::abs(SunDec[i]-mylat)>=halfpi; // Is it night during 24h? |
2938 | - twiGood = (PoleNight && std::abs(ObjectDec[i]-mylat)<halfpi)?true:CheckRise(i); |
2939 | - if (twiGood && bestBegun == false) { |
2940 | + QString dateRange; |
2941 | + bool poleNight, twiGood; |
2942 | + |
2943 | + for (int i=0; i<nDays; i++) |
2944 | + { |
2945 | + |
2946 | + poleNight = sunSidT[0][i]<0.0 && std::abs(sunDec[i]-mylat)>=halfpi; // Is it night during 24h? |
2947 | + twiGood = (poleNight && std::abs(objectDec[i]-mylat)<halfpi)?true:CheckRise(i); |
2948 | + |
2949 | + if (twiGood && bestBegun == false) |
2950 | + { |
2951 | selday = i; |
2952 | bestBegun = true; |
2953 | atLeastOne = true; |
2954 | }; |
2955 | |
2956 | - if (!twiGood && bestBegun == true) { |
2957 | + if (!twiGood && bestBegun == true) |
2958 | + { |
2959 | selday2 = i; |
2960 | bestBegun = false; |
2961 | - if (selday2 > selday) { |
2962 | - if (dateRange!="") { dateRange += ", ";}; |
2963 | - dateRange += QString("%1").arg(RangeCalenDates(selday, selday2)); |
2964 | + if (selday2 > selday) |
2965 | + { |
2966 | + // FIXME: This kind of concatenation is bad for i18n. |
2967 | + if (!dateRange.isEmpty()) |
2968 | + dateRange += ", "; |
2969 | + dateRange += QString("%1").arg(formatAsDateRange(selday, selday2)); |
2970 | }; |
2971 | }; |
2972 | }; |
2973 | |
2974 | - if (bestBegun) { // There were good dates till the end of the year. |
2975 | - if (dateRange!="") { dateRange += ", ";}; |
2976 | - dateRange += RangeCalenDates(selday, 0); |
2977 | + // Check if there were good dates till the end of the year. |
2978 | + if (bestBegun) |
2979 | + { |
2980 | + // FIXME: This kind of concatenation is bad for i18n. |
2981 | + if (!dateRange.isEmpty()) |
2982 | + dateRange += ", "; |
2983 | + dateRange += formatAsDateRange(selday, 0); |
2984 | }; |
2985 | |
2986 | - if (dateRange == "") |
2987 | + if (dateRange.isEmpty()) |
2988 | { |
2989 | if (atLeastOne) |
2990 | - { // The whole year is good. |
2991 | + { |
2992 | //ObsRange = q_("Observable during the whole year."); |
2993 | - ObsRange = msgWholeYear; |
2994 | + lineObservableRange = msgWholeYear; |
2995 | } |
2996 | else |
2997 | { |
2998 | //ObsRange = q_("Not observable at dark night."); |
2999 | - ObsRange = msgNotObs; |
3000 | + lineObservableRange = msgNotObs; |
3001 | }; |
3002 | } |
3003 | else |
3004 | { |
3005 | - //ObsRange = QString("%1 %2").arg(q_("Nights above horizon: ")).arg(dateRange); |
3006 | - ObsRange = QString("%1 %2").arg(msgAboveHoriz).arg(dateRange); |
3007 | + // Nights when the target is above the horizon |
3008 | + lineObservableRange = msgAboveHoriz.arg(dateRange); |
3009 | }; |
3010 | |
3011 | }; // Comes from show_Good_Nights==True" |
3012 | @@ -749,41 +774,40 @@ |
3013 | |
3014 | // Print all results: |
3015 | |
3016 | - int spacing = (int) (1.3* ( (double) fontSize)); // between lines |
3017 | - int spacing2 = 6*fontSize; // between daily and yearly results |
3018 | + int lineSpacing = (int) (1.3* ( (double) fontSize)); // between lines |
3019 | + int groupSpacing = 6*fontSize; // between daily and yearly results |
3020 | int yLine = 8*fontSize+110; |
3021 | int xLine = 80; |
3022 | |
3023 | if (show_Today) |
3024 | { |
3025 | - paintresult.drawText(xLine, yLine,q_("TODAY:")); |
3026 | - paintresult.drawText(xLine+fontSize, yLine-spacing, RS2); |
3027 | - paintresult.drawText(xLine+fontSize, yLine-spacing*2, RS1); |
3028 | - paintresult.drawText(xLine+fontSize, yLine-spacing*3, Cul); |
3029 | - yLine -= spacing2; |
3030 | - }; |
3031 | + //renderer->drawText(TextParams(xLine, yLine,q_("TODAY:"))); |
3032 | + painter.drawText(xLine, yLine, msgToday); |
3033 | + painter.drawText(xLine + fontSize, yLine - lineSpacing, RS2); |
3034 | + painter.drawText(xLine + fontSize, yLine - lineSpacing*2, RS1); |
3035 | + painter.drawText(xLine + fontSize, yLine - lineSpacing*3, Cul); |
3036 | + yLine -= groupSpacing; |
3037 | + } |
3038 | |
3039 | if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year)) |
3040 | { |
3041 | - paintresult.drawText(xLine,yLine,q_("THIS YEAR:")); |
3042 | + painter.drawText(xLine, yLine, msgThisYear); |
3043 | if (show_Best_Night || show_FullMoon) |
3044 | { |
3045 | - yLine -= spacing; |
3046 | - paintresult.drawText(xLine+fontSize, yLine, bestNight); |
3047 | - }; |
3048 | - if (show_Good_Nights) |
3049 | - { |
3050 | - yLine -= spacing; |
3051 | - paintresult.drawText(xLine+fontSize, yLine, ObsRange); |
3052 | - }; |
3053 | - if (show_AcroCos) |
3054 | - { |
3055 | - yLine -= spacing; |
3056 | - paintresult.drawText(xLine+fontSize, yLine, AcroCos); |
3057 | - }; |
3058 | - |
3059 | - }; |
3060 | - |
3061 | + yLine -= lineSpacing; |
3062 | + painter.drawText(xLine + fontSize, yLine, lineBestNight); |
3063 | + } |
3064 | + if (show_Good_Nights) |
3065 | + { |
3066 | + yLine -= lineSpacing; |
3067 | + painter.drawText(xLine + fontSize, yLine, lineObservableRange); |
3068 | + } |
3069 | + if (show_AcroCos) |
3070 | + { |
3071 | + yLine -= lineSpacing; |
3072 | + painter.drawText(xLine + fontSize, yLine, lineAcroCos); |
3073 | + } |
3074 | + } |
3075 | } |
3076 | |
3077 | // END OF MAIN CODE |
3078 | @@ -795,16 +819,21 @@ |
3079 | |
3080 | //////////////////////////////////// |
3081 | // Returns the hour angle for a given altitude: |
3082 | -double Observability::HourAngle(double lat, double h, double Dec) |
3083 | +double Observability::calculateHourAngle(double latitude, |
3084 | + double elevation, |
3085 | + double declination) |
3086 | { |
3087 | - double Denom = std::cos(lat)*std::cos(Dec); |
3088 | - double Numer = (std::sin(h)-std::sin(lat)*std::sin(Dec)); |
3089 | - |
3090 | - if ( std::abs(Numer)>std::abs(Denom) ) |
3091 | - {return -0.5/86400.;} // Source doesn't reach that altitude. |
3092 | - else |
3093 | - {return Rad2Hr*std::acos(Numer/Denom);} |
3094 | - |
3095 | + double denom = std::cos(latitude)*std::cos(declination); |
3096 | + double numer = (std::sin(elevation)-std::sin(latitude)*std::sin(declination)); |
3097 | + |
3098 | + if ( std::abs(numer) > std::abs(denom) ) |
3099 | + { |
3100 | + return -0.5/86400.; // Source doesn't reach that altitude. |
3101 | + } |
3102 | + else |
3103 | + { |
3104 | + return Rad2Hr * std::acos(numer/denom); |
3105 | + } |
3106 | } |
3107 | //////////////////////////////////// |
3108 | |
3109 | @@ -823,9 +852,9 @@ |
3110 | // Returns the hour angle for a given a Sid. Time: |
3111 | double Observability::HourAngle2(double RA, double ST) |
3112 | { |
3113 | - double Htemp = toUnsignedRA(RA-ST/15.); |
3114 | - Htemp -= (Htemp>12.)?24.0:0.0; |
3115 | - return Htemp; |
3116 | + double result = toUnsignedRA(RA-ST/15.); |
3117 | + result -= (result > 12.) ? 24.0 : 0.0; |
3118 | + return result; |
3119 | |
3120 | } |
3121 | //////////////////////////////////// |
3122 | @@ -859,91 +888,78 @@ |
3123 | //////////////////////////////////// |
3124 | |
3125 | |
3126 | -/////////////////////////////////////////////// |
3127 | -// Returns the day and month of year (to put it in format '25 Apr') |
3128 | -QString Observability::CalenDate(int selday) |
3129 | +QString Observability::formatAsDate(int dayNumber) |
3130 | { |
3131 | - int day,month,year; |
3132 | - StelUtils::getDateFromJulianDay(yearJD[selday],&year,&month,&day); |
3133 | - |
3134 | - QString r; |
3135 | - if (getDateFormat()) |
3136 | - r = QString("%1 %2").arg(day).arg(months[month-1]); |
3137 | - else |
3138 | - r = QString("%1 %2").arg(months[month-1]).arg(day); |
3139 | - |
3140 | - return r; |
3141 | + int day, month, year; |
3142 | + StelUtils::getDateFromJulianDay(yearJD[dayNumber], &year, &month, &day); |
3143 | + |
3144 | + QString formatString = (getDateFormat()) ? "%1 %2" : "%2 %1"; |
3145 | + QString result = formatString.arg(day).arg(monthNames[month-1]); |
3146 | + return result; |
3147 | } |
3148 | -////////////////////////////////////////////// |
3149 | |
3150 | /////////////////////////////////////////////// |
3151 | // Returns the day and month of year (to put it in format '25 Apr') |
3152 | -QString Observability::RangeCalenDates(int fDoY, int sDoY) |
3153 | +QString Observability::formatAsDateRange(int startDay, int endDay) |
3154 | { |
3155 | - int day1,month1,year1,day2,month2,year2; |
3156 | + int sDay, sMonth, sYear, eDay, eMonth, eYear; |
3157 | QString range; |
3158 | - StelUtils::getDateFromJulianDay(yearJD[fDoY],&year1,&month1,&day1); |
3159 | - StelUtils::getDateFromJulianDay(yearJD[sDoY],&year2,&month2,&day2); |
3160 | - if (sDoY==0) |
3161 | - { |
3162 | - day2 = 31; |
3163 | - month2 = 12; |
3164 | - } |
3165 | - if (fDoY==0) |
3166 | - { |
3167 | - day1 = 1; |
3168 | - month1 = 1; |
3169 | - } |
3170 | - if (month1==month2) |
3171 | - { |
3172 | - if (getDateFormat()) |
3173 | - range = QString("%1 - %2 %3").arg(day1).arg(day2).arg(months[month1-1]); |
3174 | - else |
3175 | - range = QString("%3 %1 - %2").arg(day1).arg(day2).arg(months[month1-1]); |
3176 | + StelUtils::getDateFromJulianDay(yearJD[startDay], &sYear, &sMonth, &sDay); |
3177 | + StelUtils::getDateFromJulianDay(yearJD[endDay], &eYear, &eMonth, &eDay); |
3178 | + if (endDay == 0) |
3179 | + { |
3180 | + eDay = 31; |
3181 | + eMonth = 12; |
3182 | + } |
3183 | + if (startDay == 0) |
3184 | + { |
3185 | + sDay = 1; |
3186 | + sMonth = 1; |
3187 | + } |
3188 | + |
3189 | + // If it's the same month, display "X-Y Month" or "Month X-Y" |
3190 | + if (sMonth == eMonth) |
3191 | + { |
3192 | + QString formatString = (getDateFormat()) ? "%1 - %2 %3" : "%3 %1 - %2"; |
3193 | + range = formatString.arg(sDay).arg(eDay).arg(monthNames[sMonth-1]);; |
3194 | } |
3195 | else |
3196 | { |
3197 | - if (getDateFormat()) |
3198 | - range = QString("%1 %2 - %3 %4").arg(day1).arg(months[month1-1]).arg(day2).arg(months[month2-1]); |
3199 | - else |
3200 | - range = QString("%1 %2 - %3 %4").arg(months[month1-1]).arg(day1).arg(months[month2-1]).arg(day2); |
3201 | + QString formatString = (getDateFormat()) ? "%1 %2 - %3 %4" |
3202 | + : "%2 %1 - %4 %3"; |
3203 | + range = formatString.arg(sDay) |
3204 | + .arg(monthNames[sMonth-1]) |
3205 | + .arg(eDay) |
3206 | + .arg(monthNames[eMonth-1]); |
3207 | } |
3208 | |
3209 | return range; |
3210 | } |
3211 | ////////////////////////////////////////////// |
3212 | |
3213 | - |
3214 | -////////////////////////////////////////////////// |
3215 | -// Returns the RA and Dec of the selected planet |
3216 | -//for each day of the current year: |
3217 | -void Observability::PlanetRADec(StelCore *core) |
3218 | -{ |
3219 | - double TempH; |
3220 | - |
3221 | // Compute planet's position for each day of the current year: |
3222 | - |
3223 | - for (int i=0;i<nDays;i++) { |
3224 | - getPlanetCoords(core,yearJD[i],ObjectRA[i],ObjectDec[i],false); |
3225 | - TempH = HourAngle(mylat,RefracHoriz,ObjectDec[i]); |
3226 | - ObjectH0[i] = TempH; |
3227 | - ObjectSidT[0][i] = toUnsignedRA(ObjectRA[i]-TempH); |
3228 | - ObjectSidT[1][i] = toUnsignedRA(ObjectRA[i]+TempH); |
3229 | +void Observability::updatePlanetData(StelCore *core) |
3230 | +{ |
3231 | + double tempH; |
3232 | + for (int i=0; i<nDays; i++) |
3233 | + { |
3234 | + getPlanetCoords(core, yearJD[i], objectRA[i], objectDec[i], false); |
3235 | + tempH = calculateHourAngle(mylat, refractedHorizonAlt, objectDec[i]); |
3236 | + objectH0[i] = tempH; |
3237 | + objectSidT[0][i] = toUnsignedRA(objectRA[i]-tempH); |
3238 | + objectSidT[1][i] = toUnsignedRA(objectRA[i]+tempH); |
3239 | } |
3240 | |
3241 | // Return the planet to its current time: |
3242 | - getPlanetCoords(core,myJD,ObjectRA[0],ObjectDec[0],true); |
3243 | - |
3244 | - |
3245 | + getPlanetCoords(core, myJD, objectRA[0], objectDec[0], true); |
3246 | } |
3247 | |
3248 | ///////////////////////////////////////////////// |
3249 | // Computes the Sun's RA and Dec (and the JD) for |
3250 | // each day of the current year. |
3251 | -void Observability::SunRADec(StelCore* core) |
3252 | +void Observability::updateSunData(StelCore* core) |
3253 | { |
3254 | - int day,month,year,year2; |
3255 | - |
3256 | + int day, month, year, sameYear; |
3257 | // Get current date: |
3258 | StelUtils::getDateFromJulianDay(myJD,&year,&month,&day); |
3259 | |
3260 | @@ -951,18 +967,20 @@ |
3261 | StelUtils::getJDFromDate(&Jan1stJD,year,1,1,0,0,0); |
3262 | |
3263 | // Check if we are on a leap year: |
3264 | - StelUtils::getDateFromJulianDay(Jan1stJD+365.,&year2,&month,&day); |
3265 | - nDays = (year==year2)?366:365; |
3266 | + StelUtils::getDateFromJulianDay(Jan1stJD+365., &sameYear, &month, &day); |
3267 | + nDays = (year==sameYear)?366:365; |
3268 | |
3269 | // Compute Earth's position throughout the year: |
3270 | - for (int i=0;i<nDays;i++) { |
3271 | - yearJD[i] = Jan1stJD+(double)i; |
3272 | + Vec3d pos, sunPos; |
3273 | + for (int i=0; i<nDays; i++) |
3274 | + { |
3275 | + yearJD[i] = Jan1stJD + (double)i; |
3276 | myEarth->computePosition(yearJD[i]); |
3277 | myEarth->computeTransMatrix(yearJD[i]); |
3278 | - Pos1 = myEarth->getHeliocentricEclipticPos(); |
3279 | - Pos2 = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-Pos1)); |
3280 | - EarthPos[i] = -Pos1; |
3281 | - toRADec(Pos2,SunRA[i],SunDec[i]); |
3282 | + pos = myEarth->getHeliocentricEclipticPos(); |
3283 | + sunPos = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-pos)); |
3284 | + EarthPos[i] = -pos; |
3285 | + toRADec(sunPos,sunRA[i],sunDec[i]); |
3286 | }; |
3287 | |
3288 | //Return the Earth to its current time: |
3289 | @@ -974,53 +992,63 @@ |
3290 | |
3291 | //////////////////////////////////////////// |
3292 | // Computes Sun's Sidereal Times at twilight and culmination: |
3293 | -void Observability::SunHTwi() |
3294 | +void Observability::updateSunH() |
3295 | { |
3296 | - double TempH, TempH00; |
3297 | - |
3298 | - for (int i=0; i<nDays; i++) { |
3299 | - TempH = HourAngle(mylat,AstroTwiAlti,SunDec[i]); |
3300 | - TempH00 = HourAngle(mylat,RefracHoriz,SunDec[i]); |
3301 | - if (TempH>0.0) { |
3302 | - SunSidT[0][i] = toUnsignedRA(SunRA[i]-TempH*(1.00278)); |
3303 | - SunSidT[1][i] = toUnsignedRA(SunRA[i]+TempH*(1.00278));} |
3304 | - else { |
3305 | - SunSidT[0][i] = -1000.0; |
3306 | - SunSidT[1][i] = -1000.0;}; |
3307 | - if (TempH00>0.0) { |
3308 | - SunSidT[2][i] = toUnsignedRA(SunRA[i]+TempH00); |
3309 | - SunSidT[3][i] = toUnsignedRA(SunRA[i]-TempH00);} |
3310 | - else { |
3311 | - SunSidT[2][i] = -1000.0; |
3312 | - SunSidT[3][i] = -1000.0;}; |
3313 | - |
3314 | - |
3315 | - }; |
3316 | + double tempH, tempH00; |
3317 | + |
3318 | + for (int i=0; i<nDays; i++) |
3319 | + { |
3320 | + tempH = calculateHourAngle(mylat, twilightAltRad, sunDec[i]); |
3321 | + tempH00 = calculateHourAngle(mylat, refractedHorizonAlt, sunDec[i]); |
3322 | + if (tempH > 0.0) |
3323 | + { |
3324 | + sunSidT[0][i] = toUnsignedRA(sunRA[i]-tempH*(1.00278)); |
3325 | + sunSidT[1][i] = toUnsignedRA(sunRA[i]+tempH*(1.00278)); |
3326 | + } |
3327 | + else |
3328 | + { |
3329 | + sunSidT[0][i] = -1000.0; |
3330 | + sunSidT[1][i] = -1000.0; |
3331 | + } |
3332 | + |
3333 | + if (tempH00>0.0) |
3334 | + { |
3335 | + sunSidT[2][i] = toUnsignedRA(sunRA[i]+tempH00); |
3336 | + sunSidT[3][i] = toUnsignedRA(sunRA[i]-tempH00); |
3337 | + } |
3338 | + else |
3339 | + { |
3340 | + sunSidT[2][i] = -1000.0; |
3341 | + sunSidT[3][i] = -1000.0; |
3342 | + } |
3343 | + } |
3344 | } |
3345 | //////////////////////////////////////////// |
3346 | |
3347 | |
3348 | /////////////////////////////////////////// |
3349 | // Checks if a source can be observed with the Sun below the twilight altitude. |
3350 | -bool Observability::CheckRise(int i) |
3351 | +bool Observability::CheckRise(int day) |
3352 | { |
3353 | |
3354 | - // If Sun can't reach twilight elevation, return false: |
3355 | - if (SunSidT[0][i]<0.0 || SunSidT[1][i]<0.0) { return false;}; |
3356 | + // If Sun can't reach twilight elevation, the target is not visible. |
3357 | + if (sunSidT[0][day]<0.0 || sunSidT[1][day]<0.0) |
3358 | + return false; |
3359 | |
3360 | // Iterate over the whole year: |
3361 | int nBin = 1000; |
3362 | - double auxSid1 = SunSidT[0][i]; |
3363 | - auxSid1 += (SunSidT[0][i] < SunSidT[1][i])?24.0:0.0; |
3364 | - double deltaT = (auxSid1-SunSidT[1][i])/((double)nBin); |
3365 | - |
3366 | - double Hour; |
3367 | - for (int j=0;j<nBin;j++) { |
3368 | - Hour = toUnsignedRA(SunSidT[1][i]+deltaT*(double)j - ObjectRA[i]); |
3369 | - Hour -= (Hour>12.)?24.0:0.0; |
3370 | - if (std::abs(Hour)<ObjectH0[i] || (ObjectH0[i] < 0.0 && alti>0.0)) {return true;}; |
3371 | - }; |
3372 | - |
3373 | + double auxSid1 = sunSidT[0][day]; |
3374 | + auxSid1 += (sunSidT[0][day] < sunSidT[1][day]) ? 24.0 : 0.0; |
3375 | + double deltaT = (auxSid1-sunSidT[1][day]) / ((double)nBin); |
3376 | + |
3377 | + double hour; |
3378 | + for (int j=0; j<nBin; j++) |
3379 | + { |
3380 | + hour = toUnsignedRA(sunSidT[1][day]+deltaT*(double)j - objectRA[day]); |
3381 | + hour -= (hour>12.) ? 24.0 : 0.0; |
3382 | + if (std::abs(hour)<objectH0[day] || (objectH0[day] < 0.0 && alti>0.0)) |
3383 | + return true; |
3384 | + } |
3385 | |
3386 | return false; |
3387 | } |
3388 | @@ -1029,81 +1057,79 @@ |
3389 | |
3390 | /////////////////////////////////////////// |
3391 | // Finds the dates of Acronichal (Rise, Set) and Cosmical (Rise2, Set2) dates. |
3392 | -// Returns 0 if no dates found, 1 if Acro exists, 2 if Cosm exists, and 3 if both are found. |
3393 | -int Observability::CheckAcro(int &Rise, int &Set, int &Rise2, int &Set2) |
3394 | +int Observability::calculateAcroCos(int &acroRise, int &acroSet, |
3395 | + int &cosRise, int &cosSet) |
3396 | { |
3397 | - |
3398 | - Rise = -1; |
3399 | - Set = -1; |
3400 | - Rise2 = -1; |
3401 | - Set2 = -1; |
3402 | - |
3403 | - double BestDiffRise = 12.0; |
3404 | - double BestDiffSet = 12.0; |
3405 | - double BestDiffRise2 = 12.0; |
3406 | - double BestDiffSet2 = 12.0; |
3407 | - |
3408 | - double HourDiffRise, HourDiffSet, HourDiffRise2, HourDiffSet2; |
3409 | + acroRise = -1; |
3410 | + acroSet = -1; |
3411 | + cosRise = -1; |
3412 | + cosSet = -1; |
3413 | + |
3414 | + double bestDiffAcroRise = 12.0; |
3415 | + double bestDiffAcroSet = 12.0; |
3416 | + double bestDiffCosRise = 12.0; |
3417 | + double bestDiffCosSet = 12.0; |
3418 | + |
3419 | + double hourDiffAcroRise, hourDiffAcroSet, hourDiffCosRise, hourCosDiffSet; |
3420 | bool success = false; |
3421 | |
3422 | - for (int i=0;i<366;i++) |
3423 | + for (int i=0; i<366; i++) |
3424 | { |
3425 | - if (ObjectH0[i]>0.0 && SunSidT[2][i]>0.0 && SunSidT[3][i]>0.0) { |
3426 | + if (objectH0[i]>0.0 && sunSidT[2][i]>0.0 && sunSidT[3][i]>0.0) |
3427 | + { |
3428 | success = true; |
3429 | - HourDiffRise = toUnsignedRA(ObjectRA[i] - ObjectH0[i]); |
3430 | - HourDiffRise2 = HourDiffRise-SunSidT[3][i]; |
3431 | - HourDiffRise -= SunSidT[2][i]; |
3432 | - |
3433 | - HourDiffSet = toUnsignedRA(ObjectRA[i] + ObjectH0[i]); |
3434 | - HourDiffSet2 = HourDiffSet - SunSidT[2][i]; |
3435 | - HourDiffSet -= SunSidT[3][i]; |
3436 | - |
3437 | - // Acronychal Rise/Set: |
3438 | - if (std::abs(HourDiffRise)<BestDiffRise) |
3439 | - { |
3440 | - BestDiffRise = std::abs(HourDiffRise); |
3441 | - Rise = i; |
3442 | - }; |
3443 | - if (std::abs(HourDiffSet)<BestDiffSet) |
3444 | - { |
3445 | - BestDiffSet = std::abs(HourDiffSet); |
3446 | - Set = i; |
3447 | - }; |
3448 | - |
3449 | - // Cosmical Rise/Set: |
3450 | - if (std::abs(HourDiffRise2)<BestDiffRise2) |
3451 | - { |
3452 | - BestDiffRise2 = std::abs(HourDiffRise2); |
3453 | - Rise2 = i; |
3454 | - }; |
3455 | - if (std::abs(HourDiffSet2)<BestDiffSet2) |
3456 | - { |
3457 | - BestDiffSet2 = std::abs(HourDiffSet2); |
3458 | - Set2 = i; |
3459 | - }; |
3460 | - |
3461 | - |
3462 | + hourDiffAcroRise = toUnsignedRA(objectRA[i] - objectH0[i]); |
3463 | + hourDiffCosRise = hourDiffAcroRise-sunSidT[3][i]; |
3464 | + hourDiffAcroRise -= sunSidT[2][i]; |
3465 | + |
3466 | + hourDiffAcroSet = toUnsignedRA(objectRA[i] + objectH0[i]); |
3467 | + hourCosDiffSet = hourDiffAcroSet - sunSidT[2][i]; |
3468 | + hourDiffAcroSet -= sunSidT[3][i]; |
3469 | + |
3470 | + // Acronychal rise/set: |
3471 | + if (std::abs(hourDiffAcroRise) < bestDiffAcroRise) |
3472 | + { |
3473 | + bestDiffAcroRise = std::abs(hourDiffAcroRise); |
3474 | + acroRise = i; |
3475 | + }; |
3476 | + if (std::abs(hourDiffAcroSet) < bestDiffAcroSet) |
3477 | + { |
3478 | + bestDiffAcroSet = std::abs(hourDiffAcroSet); |
3479 | + acroSet = i; |
3480 | + }; |
3481 | + |
3482 | + // Cosmical Rise/Set: |
3483 | + if (std::abs(hourDiffCosRise) < bestDiffCosRise) |
3484 | + { |
3485 | + bestDiffCosRise = std::abs(hourDiffCosRise); |
3486 | + cosRise = i; |
3487 | + }; |
3488 | + if (std::abs(hourCosDiffSet) < bestDiffCosSet) |
3489 | + { |
3490 | + bestDiffCosSet = std::abs(hourCosDiffSet); |
3491 | + cosSet = i; |
3492 | + }; |
3493 | }; |
3494 | }; |
3495 | |
3496 | - Rise *= (BestDiffRise > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3497 | - Set *= (BestDiffSet > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3498 | - Rise2 *= (BestDiffRise2 > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3499 | - Set2 *= (BestDiffSet2 > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3500 | - int Result = (Rise>0 || Set>0)?1:0; |
3501 | - Result += (Rise2>0 || Set2>0)?2:0; |
3502 | - return (success)?Result:0; |
3503 | + acroRise *= (bestDiffAcroRise > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3504 | + acroSet *= (bestDiffAcroSet > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3505 | + cosRise *= (bestDiffCosRise > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3506 | + cosSet *= (bestDiffCosSet > 0.083)?-1:1; // Check that difference is lower than 5 minutes. |
3507 | + int result = (acroRise>0 || acroSet>0) ? 1 : 0; |
3508 | + result += (cosRise>0 || cosSet>0) ? 2 : 0; |
3509 | + return (success) ? result : 0; |
3510 | } |
3511 | /////////////////////////////////////////// |
3512 | |
3513 | |
3514 | //////////////////////////////////////////// |
3515 | // Convert an Equatorial Vec3d into RA and Dec: |
3516 | -void Observability::toRADec(Vec3d TempLoc, double &RA, double &Dec) |
3517 | +void Observability::toRADec(Vec3d vec3d, double& ra, double &dec) |
3518 | { |
3519 | - TempLoc.normalize(); |
3520 | - Dec = std::asin(TempLoc[2]); // in radians |
3521 | - RA = toUnsignedRA(std::atan2(TempLoc[1],TempLoc[0])*Rad2Hr); // in hours. |
3522 | + vec3d.normalize(); |
3523 | + dec = std::asin(vec3d[2]); // in radians |
3524 | + ra = toUnsignedRA(std::atan2(vec3d[1],vec3d[0])*Rad2Hr); // in hours. |
3525 | } |
3526 | //////////////////////////////////////////// |
3527 | |
3528 | @@ -1122,39 +1148,43 @@ |
3529 | ////////////////////////// |
3530 | // Get the coordinates of Sun or Moon for a given JD: |
3531 | // getBack controls whether Earth and Moon must be returned to their original positions after computation. |
3532 | -void Observability::getSunMoonCoords(StelCore *core, double JD, double &RASun, double &DecSun, double &RAMoon, double &DecMoon, double &EclLon, bool getBack) //, Vec3d &AltAzVector) |
3533 | +void Observability::getSunMoonCoords(StelCore *core, double jd, |
3534 | + double &raSun, double &decSun, |
3535 | + double &raMoon, double &decMoon, |
3536 | + double &eclLon, bool getBack) |
3537 | + //, Vec3d &AltAzVector) |
3538 | { |
3539 | |
3540 | if (getBack) // Return the Moon and Earth to their current position: |
3541 | { |
3542 | - myEarth->computePosition(JD); |
3543 | - myEarth->computeTransMatrix(JD); |
3544 | - myMoon->computePosition(JD); |
3545 | - myMoon->computeTransMatrix(JD); |
3546 | + myEarth->computePosition(jd); |
3547 | + myEarth->computeTransMatrix(jd); |
3548 | + myMoon->computePosition(jd); |
3549 | + myMoon->computeTransMatrix(jd); |
3550 | } |
3551 | - else |
3552 | - { // Compute coordinates: |
3553 | - myEarth->computePosition(JD); |
3554 | - myEarth->computeTransMatrix(JD); |
3555 | - Pos0 = myEarth->getHeliocentricEclipticPos(); |
3556 | - double currSidT; |
3557 | + else // Compute coordinates: |
3558 | + { |
3559 | + myEarth->computePosition(jd); |
3560 | + myEarth->computeTransMatrix(jd); |
3561 | + Vec3d earthPos = myEarth->getHeliocentricEclipticPos(); |
3562 | + double curSidT; |
3563 | |
3564 | // Sun coordinates: |
3565 | - Pos2 = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-Pos0)); |
3566 | - toRADec(Pos2,RASun,DecSun); |
3567 | + Vec3d sunPos = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-earthPos)); |
3568 | + toRADec(sunPos, raSun, decSun); |
3569 | |
3570 | // Moon coordinates: |
3571 | - currSidT = myEarth->getSiderealTime(JD)/Rad2Deg; |
3572 | - RotObserver = (Mat4d::zrotation(currSidT))*ObserverLoc; |
3573 | - LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-Pos0)); |
3574 | - myMoon->computePosition(JD); |
3575 | - myMoon->computeTransMatrix(JD); |
3576 | - Pos1 = myMoon->getHeliocentricEclipticPos(); |
3577 | - Pos2 = (core->j2000ToEquinoxEqu(LocTrans*Pos1))-RotObserver; |
3578 | - |
3579 | - EclLon = Pos1[0]*Pos0[1] - Pos1[1]*Pos0[0]; |
3580 | - |
3581 | - toRADec(Pos2,RAMoon,DecMoon); |
3582 | + curSidT = myEarth->getSiderealTime(jd)/Rad2Deg; |
3583 | + RotObserver = (Mat4d::zrotation(curSidT))*ObserverLoc; |
3584 | + LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-earthPos)); |
3585 | + myMoon->computePosition(jd); |
3586 | + myMoon->computeTransMatrix(jd); |
3587 | + Vec3d moonPos = myMoon->getHeliocentricEclipticPos(); |
3588 | + sunPos = (core->j2000ToEquinoxEqu(LocTrans*moonPos))-RotObserver; |
3589 | + |
3590 | + eclLon = moonPos[0]*earthPos[1] - moonPos[1]*earthPos[0]; |
3591 | + |
3592 | + toRADec(sunPos,raMoon,decMoon); |
3593 | }; |
3594 | } |
3595 | ////////////////////////////////////////////// |
3596 | @@ -1164,37 +1194,37 @@ |
3597 | ////////////////////////// |
3598 | // Get the Observer-to-Moon distance JD: |
3599 | // getBack controls whether Earth and Moon must be returned to their original positions after computation. |
3600 | -void Observability::getMoonDistance(StelCore *core, double JD, double &Distance, bool getBack) |
3601 | +void Observability::getMoonDistance(StelCore *core, double jd, double &distance, bool getBack) |
3602 | { |
3603 | |
3604 | if (getBack) // Return the Moon and Earth to their current position: |
3605 | { |
3606 | - myEarth->computePosition(JD); |
3607 | - myEarth->computeTransMatrix(JD); |
3608 | - myMoon->computePosition(JD); |
3609 | - myMoon->computeTransMatrix(JD); |
3610 | + myEarth->computePosition(jd); |
3611 | + myEarth->computeTransMatrix(jd); |
3612 | + myMoon->computePosition(jd); |
3613 | + myMoon->computeTransMatrix(jd); |
3614 | } |
3615 | else |
3616 | { // Compute coordinates: |
3617 | - myEarth->computePosition(JD); |
3618 | - myEarth->computeTransMatrix(JD); |
3619 | - Pos0 = myEarth->getHeliocentricEclipticPos(); |
3620 | -// double currSidT; |
3621 | + myEarth->computePosition(jd); |
3622 | + myEarth->computeTransMatrix(jd); |
3623 | + Vec3d earthPos = myEarth->getHeliocentricEclipticPos(); |
3624 | +// double curSidT; |
3625 | |
3626 | // Sun coordinates: |
3627 | // Pos2 = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-Pos0)); |
3628 | // toRADec(Pos2,RASun,DecSun); |
3629 | |
3630 | // Moon coordinates: |
3631 | -// currSidT = myEarth->getSiderealTime(JD)/Rad2Deg; |
3632 | -// RotObserver = (Mat4d::zrotation(currSidT))*ObserverLoc; |
3633 | - LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-Pos0)); |
3634 | - myMoon->computePosition(JD); |
3635 | - myMoon->computeTransMatrix(JD); |
3636 | +// curSidT = myEarth->getSiderealTime(JD)/Rad2Deg; |
3637 | +// RotObserver = (Mat4d::zrotation(curSidT))*ObserverLoc; |
3638 | + LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-earthPos)); |
3639 | + myMoon->computePosition(jd); |
3640 | + myMoon->computeTransMatrix(jd); |
3641 | Pos1 = myMoon->getHeliocentricEclipticPos(); |
3642 | Pos2 = (core->j2000ToEquinoxEqu(LocTrans*Pos1)); //-RotObserver; |
3643 | |
3644 | - Distance = std::sqrt(Pos2*Pos2); |
3645 | + distance = std::sqrt(Pos2*Pos2); |
3646 | |
3647 | // toRADec(Pos2,RAMoon,DecMoon); |
3648 | }; |
3649 | @@ -1236,180 +1266,190 @@ |
3650 | |
3651 | |
3652 | ////////////////////////////////////////////// |
3653 | -// Solves Moon's, Sun's, or Planet's ephemeris by bissection. Returns JD: |
3654 | -bool Observability::SolarSystemSolve(StelCore* core, int Kind) |
3655 | +// Solves Moon's, Sun's, or Planet's ephemeris by bissection. |
3656 | +bool Observability::calculateSolarSystemEvents(StelCore* core, int bodyType) |
3657 | { |
3658 | |
3659 | - int Niter = 100; |
3660 | + const int NUM_ITER = 100; |
3661 | int i; |
3662 | - double Hhoriz, RA, Dec, RAS, DecS, TempH, jd1, tempEphH, currSidT, EclLon; |
3663 | - Vec3d Observer; |
3664 | + double hHoriz, ra, dec, raSun, decSun, tempH, tempJd, tempEphH, curSidT, eclLon; |
3665 | + //Vec3d Observer; |
3666 | |
3667 | - Hhoriz = HourAngle(mylat,RefracHoriz,selDec); |
3668 | - bool raises = Hhoriz > 0.0; |
3669 | + hHoriz = calculateHourAngle(mylat, refractedHorizonAlt, selDec); |
3670 | + bool raises = hHoriz > 0.0; |
3671 | |
3672 | |
3673 | // Only recompute ephemeris from second to second (at least) |
3674 | // or if the source has changed (i.e., Sun <-> Moon). This saves resources: |
3675 | - if (std::abs(myJD-lastJDMoon)>JDsec || LastObject!=Kind || souChanged) |
3676 | + if (std::abs(myJD-lastJDMoon)>JDsec || lastType!=bodyType || souChanged) |
3677 | { |
3678 | |
3679 | // qDebug() << q_("%1 %2 %3 %4").arg(Kind).arg(LastObject).arg(myJD,0,'f',5).arg(lastJDMoon,0,'f',5); |
3680 | |
3681 | - LastObject = Kind; |
3682 | + lastType = bodyType; |
3683 | |
3684 | myEarth->computePosition(myJD); |
3685 | myEarth->computeTransMatrix(myJD); |
3686 | - Pos0 = myEarth->getHeliocentricEclipticPos(); |
3687 | + Vec3d earthPos = myEarth->getHeliocentricEclipticPos(); |
3688 | |
3689 | - if (Kind==1) |
3690 | - { // Sun position: |
3691 | - Pos2 = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-Pos0)); |
3692 | - } else if (Kind==2) |
3693 | - { // Moon position: |
3694 | - currSidT = myEarth->getSiderealTime(myJD)/Rad2Deg; |
3695 | - RotObserver = (Mat4d::zrotation(currSidT))*ObserverLoc; |
3696 | - LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-Pos0)); |
3697 | + if (bodyType == 1) // Sun position |
3698 | + { |
3699 | + Pos2 = core->j2000ToEquinoxEqu((core->matVsop87ToJ2000)*(-earthPos)); |
3700 | + } |
3701 | + else if (bodyType==2) // Moon position |
3702 | + { |
3703 | + curSidT = myEarth->getSiderealTime(myJD)/Rad2Deg; |
3704 | + RotObserver = (Mat4d::zrotation(curSidT))*ObserverLoc; |
3705 | + LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-earthPos)); |
3706 | myMoon->computePosition(myJD); |
3707 | myMoon->computeTransMatrix(myJD); |
3708 | Pos1 = myMoon->getHeliocentricEclipticPos(); |
3709 | Pos2 = (core->j2000ToEquinoxEqu(LocTrans*Pos1))-RotObserver; |
3710 | - } else |
3711 | - { // Planet position: |
3712 | - myPlanet->computePosition(myJD); |
3713 | - myPlanet->computeTransMatrix(myJD); |
3714 | - Pos1 = myPlanet->getHeliocentricEclipticPos(); |
3715 | - LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-Pos0)); |
3716 | - Pos2 = core->j2000ToEquinoxEqu(LocTrans*Pos1); |
3717 | + } |
3718 | + else // Planet position |
3719 | + { |
3720 | + myPlanet->computePosition(myJD); |
3721 | + myPlanet->computeTransMatrix(myJD); |
3722 | + Pos1 = myPlanet->getHeliocentricEclipticPos(); |
3723 | + LocTrans = (core->matVsop87ToJ2000)*(Mat4d::translation(-earthPos)); |
3724 | + Pos2 = core->j2000ToEquinoxEqu(LocTrans*Pos1); |
3725 | }; |
3726 | |
3727 | - toRADec(Pos2,RA,Dec); |
3728 | - Vec3d MoonAltAz = core->equinoxEquToAltAz(Pos2,StelCore::RefractionOff); |
3729 | - raised = MoonAltAz[2] > RefracHoriz; |
3730 | + toRADec(Pos2,ra,dec); |
3731 | + Vec3d moonAltAz = core->equinoxEquToAltAz(Pos2, StelCore::RefractionOff); |
3732 | + hasRisen = moonAltAz[2] > refractedHorizonAlt; |
3733 | |
3734 | // Initial guesses of rise/set/transit times. |
3735 | // They are called 'Moon', but are also used for the Sun or planet: |
3736 | |
3737 | - double Hcurr = -HourAngle(mylat,alti,selDec)*sign(LocPos[1]); |
3738 | + double Hcurr = -calculateHourAngle(mylat,alti,selDec)*sign(LocPos[1]); |
3739 | double SidT = toUnsignedRA(selRA + Hcurr); |
3740 | |
3741 | MoonCulm = -Hcurr; |
3742 | - MoonRise = (-Hhoriz-Hcurr); |
3743 | - MoonSet = (Hhoriz-Hcurr); |
3744 | + MoonRise = (-hHoriz-Hcurr); |
3745 | + MoonSet = (hHoriz-Hcurr); |
3746 | |
3747 | - if (raises) { |
3748 | - if (raised==false) { |
3749 | + if (raises) |
3750 | + { |
3751 | + if (!hasRisen) |
3752 | + { |
3753 | MoonRise += (MoonRise<0.0)?24.0:0.0; |
3754 | MoonSet -= (MoonSet>0.0)?24.0:0.0; |
3755 | - }; |
3756 | + } |
3757 | |
3758 | // Rise time: |
3759 | tempEphH = MoonRise*TFrac; |
3760 | MoonRise = myJD + (MoonRise/24.); |
3761 | - for (i=0; i<Niter; i++) |
3762 | + for (i=0; i<NUM_ITER; i++) |
3763 | { |
3764 | // Get modified coordinates: |
3765 | - jd1 = MoonRise; |
3766 | + tempJd = MoonRise; |
3767 | |
3768 | - if (Kind<3) |
3769 | + if (bodyType<3) |
3770 | { |
3771 | - getSunMoonCoords(core,jd1,RAS,DecS,RA,Dec,EclLon,false); |
3772 | + getSunMoonCoords(core, tempJd, |
3773 | + raSun, decSun, |
3774 | + ra, dec, |
3775 | + eclLon, false); |
3776 | } else |
3777 | { |
3778 | - getPlanetCoords(core,jd1,RA,Dec,false); |
3779 | + getPlanetCoords(core, tempJd, ra, dec, false); |
3780 | }; |
3781 | |
3782 | - if (Kind==1) {RA = RAS; Dec = DecS;}; |
3783 | + if (bodyType==1) {ra = raSun; dec = decSun;}; |
3784 | |
3785 | // Current hour angle at mod. coordinates: |
3786 | - Hcurr = toUnsignedRA(SidT-RA); |
3787 | - Hcurr -= (raised)?0.0:24.; |
3788 | + Hcurr = toUnsignedRA(SidT-ra); |
3789 | + Hcurr -= (hasRisen)?0.0:24.; |
3790 | Hcurr -= (Hcurr>12.)?24.0:0.0; |
3791 | |
3792 | // H at horizon for mod. coordinates: |
3793 | - Hhoriz = HourAngle(mylat,RefracHoriz,Dec); |
3794 | + hHoriz = calculateHourAngle(mylat,refractedHorizonAlt,dec); |
3795 | // Compute eph. times for mod. coordinates: |
3796 | - TempH = (-Hhoriz-Hcurr)*TFrac; |
3797 | - if (raised==false) TempH += (TempH<0.0)?24.0:0.0; |
3798 | + tempH = (-hHoriz-Hcurr)*TFrac; |
3799 | + if (hasRisen==false) tempH += (tempH<0.0)?24.0:0.0; |
3800 | // Check convergence: |
3801 | - if (std::abs(TempH-tempEphH)<JDsec) break; |
3802 | + if (std::abs(tempH-tempEphH)<JDsec) break; |
3803 | // Update rise-time estimate: |
3804 | - tempEphH = TempH; |
3805 | + tempEphH = tempH; |
3806 | MoonRise = myJD + (tempEphH/24.); |
3807 | }; |
3808 | |
3809 | // Set time: |
3810 | tempEphH = MoonSet; |
3811 | MoonSet = myJD + (MoonSet/24.); |
3812 | - for (i=0; i<Niter; i++) |
3813 | + for (i=0; i<NUM_ITER; i++) |
3814 | { |
3815 | // Get modified coordinates: |
3816 | - jd1 = MoonSet; |
3817 | - |
3818 | - if (Kind<3) |
3819 | - { |
3820 | - getSunMoonCoords(core,jd1,RAS,DecS,RA,Dec,EclLon,false); |
3821 | - } else |
3822 | - { |
3823 | - getPlanetCoords(core,jd1,RA,Dec,false); |
3824 | - }; |
3825 | - |
3826 | - if (Kind==1) {RA = RAS; Dec = DecS;}; |
3827 | - |
3828 | + tempJd = MoonSet; |
3829 | + |
3830 | + if (bodyType < 3) |
3831 | + getSunMoonCoords(core, tempJd, |
3832 | + raSun, decSun, |
3833 | + ra, dec, |
3834 | + eclLon, false); |
3835 | + else |
3836 | + getPlanetCoords(core, tempJd, ra, dec, false); |
3837 | + |
3838 | + if (bodyType==1) {ra = raSun; dec = decSun;}; |
3839 | + |
3840 | // Current hour angle at mod. coordinates: |
3841 | - Hcurr = toUnsignedRA(SidT-RA); |
3842 | - Hcurr -= (raised)?24.:0.; |
3843 | + Hcurr = toUnsignedRA(SidT-ra); |
3844 | + Hcurr -= (hasRisen)?24.:0.; |
3845 | Hcurr += (Hcurr<-12.)?24.0:0.0; |
3846 | // H at horizon for mod. coordinates: |
3847 | - Hhoriz = HourAngle(mylat,RefracHoriz,Dec); |
3848 | + hHoriz = calculateHourAngle(mylat, refractedHorizonAlt, dec); |
3849 | // Compute eph. times for mod. coordinates: |
3850 | - TempH = (Hhoriz-Hcurr)*TFrac; |
3851 | - if (raised==false) TempH -= (TempH>0.0)?24.0:0.0; |
3852 | + tempH = (hHoriz-Hcurr)*TFrac; |
3853 | + if (!hasRisen) |
3854 | + tempH -= (tempH>0.0)?24.0:0.0; |
3855 | // Check convergence: |
3856 | - if (std::abs(TempH-tempEphH)<JDsec) break; |
3857 | + if (std::abs(tempH-tempEphH)<JDsec) |
3858 | + break; |
3859 | // Update set-time estimate: |
3860 | - tempEphH = TempH; |
3861 | + tempEphH = tempH; |
3862 | MoonSet = myJD + (tempEphH/24.); |
3863 | }; |
3864 | } |
3865 | else // Comes from if(raises) |
3866 | { |
3867 | - MoonSet = -1.0; MoonRise = -1.0; |
3868 | + MoonSet = -1.0; |
3869 | + MoonRise = -1.0; |
3870 | }; |
3871 | |
3872 | // Culmination time: |
3873 | tempEphH = MoonCulm; |
3874 | MoonCulm = myJD + (MoonCulm/24.); |
3875 | |
3876 | - for (i=0; i<Niter; i++) |
3877 | + for (i=0; i<NUM_ITER; i++) |
3878 | { |
3879 | - // Get modified coordinates: |
3880 | - jd1 = MoonCulm; |
3881 | - |
3882 | - if (Kind<3) |
3883 | - { |
3884 | - getSunMoonCoords(core,jd1,RAS,DecS,RA,Dec,EclLon,false); |
3885 | - } else |
3886 | - { |
3887 | - getPlanetCoords(core,jd1,RA,Dec,false); |
3888 | - }; |
3889 | - |
3890 | - |
3891 | - if (Kind==1) {RA = RAS; Dec = DecS;}; |
3892 | + // Get modified coordinates: |
3893 | + tempJd = MoonCulm; |
3894 | + |
3895 | + if (bodyType<3) |
3896 | + { |
3897 | + getSunMoonCoords(core,tempJd,raSun,decSun,ra,dec,eclLon,false); |
3898 | + } else |
3899 | + { |
3900 | + getPlanetCoords(core,tempJd,ra,dec,false); |
3901 | + }; |
3902 | + |
3903 | + |
3904 | + if (bodyType==1) {ra = raSun; dec = decSun;}; |
3905 | |
3906 | |
3907 | // Current hour angle at mod. coordinates: |
3908 | - Hcurr = toUnsignedRA(SidT-RA); |
3909 | + Hcurr = toUnsignedRA(SidT-ra); |
3910 | Hcurr += (LocPos[1]<0.0)?24.0:-24.0; |
3911 | Hcurr -= (Hcurr>12.)?24.0:0.0; |
3912 | |
3913 | // Compute eph. times for mod. coordinates: |
3914 | - TempH = -Hcurr*TFrac; |
3915 | + tempH = -Hcurr*TFrac; |
3916 | // Check convergence: |
3917 | - if (std::abs(TempH-tempEphH)<JDsec) break; |
3918 | - tempEphH = TempH; |
3919 | + if (std::abs(tempH-tempEphH)<JDsec) break; |
3920 | + tempEphH = tempH; |
3921 | MoonCulm = myJD + (tempEphH/24.); |
3922 | - culmAlt = std::abs(mylat-Dec); // 90 - altitude at transit. |
3923 | + culmAlt = std::abs(mylat-dec); // 90 - altitude at transit. |
3924 | }; |
3925 | |
3926 | // qDebug() << q_("%1").arg(MoonCulm,0,'f',5); |
3927 | @@ -1423,7 +1463,7 @@ |
3928 | |
3929 | |
3930 | // Find out the days of Full Moon: |
3931 | - if (Kind==2 && show_FullMoon) // || show_SuperMoon)) |
3932 | + if (bodyType==2 && show_FullMoon) // || show_SuperMoon)) |
3933 | { |
3934 | |
3935 | // Only estimate date of Full Moon if we have changed Lunar month: |
3936 | @@ -1456,24 +1496,24 @@ |
3937 | Sec1 = iniEst1; // TempFullMoon - 0.05*MoonT; // Initial estimates of Full-Moon dates |
3938 | Sec2 = iniEst2; // TempFullMoon + 0.05*MoonT; |
3939 | |
3940 | - getSunMoonCoords(core,Sec1,RAS,DecS,RA,Dec,EclLon,false); |
3941 | - Temp1 = EclLon; //Lambda(RA,Dec,RAS,DecS); |
3942 | - getSunMoonCoords(core,Sec2,RAS,DecS,RA,Dec,EclLon,false); |
3943 | - Temp2 = EclLon; //Lambda(RA,Dec,RAS,DecS); |
3944 | + getSunMoonCoords(core,Sec1,raSun,decSun,ra,dec,eclLon,false); |
3945 | + Temp1 = eclLon; //Lambda(RA,Dec,RAS,DecS); |
3946 | + getSunMoonCoords(core,Sec2,raSun,decSun,ra,dec,eclLon,false); |
3947 | + Temp2 = eclLon; //Lambda(RA,Dec,RAS,DecS); |
3948 | |
3949 | |
3950 | for (int i=0; i<100; i++) // A limit of 100 iterations. |
3951 | { |
3952 | - Phase1 = (Sec2-Sec1)/(Temp1-Temp2)*Temp1+Sec1; |
3953 | - getSunMoonCoords(core,Phase1,RAS,DecS,RA,Dec,EclLon,false); |
3954 | - |
3955 | - if (Temp1*EclLon < 0.0) |
3956 | + Phase1 = (Sec2-Sec1)/(Temp1-Temp2)*Temp1+Sec1; |
3957 | + getSunMoonCoords(core,Phase1,raSun,decSun,ra,dec,eclLon,false); |
3958 | + |
3959 | + if (Temp1*eclLon < 0.0) |
3960 | { |
3961 | Sec2 = Phase1; |
3962 | - Temp2 = EclLon; |
3963 | + Temp2 = eclLon; |
3964 | } else { |
3965 | Sec1 = Phase1; |
3966 | - Temp1 = EclLon; |
3967 | + Temp1 = eclLon; |
3968 | |
3969 | }; |
3970 | |
3971 | @@ -1509,23 +1549,23 @@ |
3972 | double LocalNext = nextFullMoon+GMTShift+0.5; |
3973 | double intMoon; |
3974 | double LocalTMoon = 24.*modf(LocalPrev,&intMoon); |
3975 | - StelUtils::getDateFromJulianDay(intMoon,&fullYear,&fullMonth,&fullDay); |
3976 | + StelUtils::getDateFromJulianDay(intMoon, &fullYear, &fullMonth, &fullDay); |
3977 | double2hms(toUnsignedRA(LocalTMoon),fullHour,fullMinute,fullSecond); |
3978 | if (getDateFormat()) |
3979 | - bestNight = msgPrevFullMoon.arg(fullDay).arg(months[fullMonth-1]).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3980 | + lineBestNight = msgPrevFullMoon.arg(fullDay).arg(monthNames[fullMonth-1]).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3981 | else |
3982 | - bestNight = msgPrevFullMoon.arg(months[fullMonth-1]).arg(fullDay).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3983 | + lineBestNight = msgPrevFullMoon.arg(monthNames[fullMonth-1]).arg(fullDay).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3984 | |
3985 | LocalTMoon = 24.*modf(LocalNext,&intMoon); |
3986 | StelUtils::getDateFromJulianDay(intMoon,&fullYear,&fullMonth,&fullDay); |
3987 | double2hms(toUnsignedRA(LocalTMoon),fullHour,fullMinute,fullSecond); |
3988 | if (getDateFormat()) |
3989 | - bestNight += msgNextFullMoon.arg(fullDay).arg(months[fullMonth-1]).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3990 | + lineBestNight += msgNextFullMoon.arg(fullDay).arg(monthNames[fullMonth-1]).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3991 | else |
3992 | - bestNight += msgNextFullMoon.arg(months[fullMonth-1]).arg(fullDay).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3993 | + lineBestNight += msgNextFullMoon.arg(monthNames[fullMonth-1]).arg(fullDay).arg(fullHour).arg(fullMinute,2,10,QLatin1Char('0')); |
3994 | |
3995 | - ObsRange = ""; |
3996 | - AcroCos = ""; |
3997 | + lineObservableRange.clear(); |
3998 | + lineAcroCos.clear(); |
3999 | |
4000 | |
4001 | // Now, compute the days of all the Full Moons of the current year, and get the Earth/Moon distance: |
4002 | @@ -1553,22 +1593,22 @@ |
4003 | // ObsRange = q_("Greatest Full Moon: %1 "+months[fullMonth-1]+" (%2% of Moon at Perilune)").arg(fullDay).arg(MoonSize,0,'f',2); |
4004 | }; |
4005 | } |
4006 | - else if (Kind <3) |
4007 | + else if (bodyType <3) |
4008 | { |
4009 | - bestNight = ""; |
4010 | - ObsRange = ""; |
4011 | - AcroCos = ""; |
4012 | - |
4013 | + lineBestNight.clear(); |
4014 | + lineObservableRange.clear(); |
4015 | + lineAcroCos.clear(); |
4016 | }; |
4017 | |
4018 | |
4019 | // Return the Moon and Earth to its current position: |
4020 | - if (Kind<3) |
4021 | - { |
4022 | - getSunMoonCoords(core,myJD,RAS,DecS,RA,Dec,EclLon,true); |
4023 | - } else |
4024 | - { |
4025 | - getPlanetCoords(core,myJD,RA,Dec,true); |
4026 | + if (bodyType<3) |
4027 | + { |
4028 | + getSunMoonCoords(core, myJD, raSun, decSun, ra, dec, eclLon, true); |
4029 | + } |
4030 | + else |
4031 | + { |
4032 | + getPlanetCoords(core, myJD, ra, dec, true); |
4033 | }; |
4034 | |
4035 | |
4036 | @@ -1588,38 +1628,17 @@ |
4037 | return true; |
4038 | } |
4039 | |
4040 | -void Observability::restoreDefaults(void) |
4041 | -{ |
4042 | - restoreDefaultConfigIni(); |
4043 | - readSettingsFromConfig(); |
4044 | -} |
4045 | - |
4046 | -void Observability::restoreDefaultConfigIni(void) |
4047 | -{ |
4048 | +void Observability::resetConfiguration() |
4049 | +{ |
4050 | + // Remove the plug-in's group from the configuration, |
4051 | + // after that it will be loaded with default values. |
4052 | QSettings* conf = StelApp::getInstance().getSettings(); |
4053 | - |
4054 | - conf->beginGroup("Observability"); |
4055 | - |
4056 | - // delete all existing settings... |
4057 | - conf->remove(""); |
4058 | - |
4059 | - // Set defaults |
4060 | - conf->setValue("font_size", 15); |
4061 | - conf->setValue("Sun_Altitude", 12); |
4062 | - conf->setValue("Horizon_Altitude", 0); |
4063 | - conf->setValue("font_color", "0,0.5,1"); |
4064 | - conf->setValue("show_AcroCos", true); |
4065 | - conf->setValue("show_Good_Nights", true); |
4066 | - conf->setValue("show_Best_Night", true); |
4067 | - conf->setValue("show_Today", true); |
4068 | - conf->setValue("show_FullMoon", true); |
4069 | -// conf->setValue("show_Crescent", true); |
4070 | -// conf->setValue("show_SuperMoon", true); |
4071 | - |
4072 | - conf->endGroup(); |
4073 | + Q_ASSERT(conf); |
4074 | + conf->remove("Observability"); |
4075 | + loadConfiguration(); |
4076 | } |
4077 | |
4078 | -void Observability::readSettingsFromConfig(void) |
4079 | +void Observability::loadConfiguration() |
4080 | { |
4081 | QSettings* conf = StelApp::getInstance().getSettings(); |
4082 | |
4083 | @@ -1637,25 +1656,37 @@ |
4084 | // show_Crescent = conf->value("show_Crescent", true).toBool(); |
4085 | // show_SuperMoon = conf->value("show_SuperMoon", true).toBool(); |
4086 | |
4087 | - iAltitude = conf->value("Sun_Altitude", 12).toInt(); |
4088 | - AstroTwiAlti = -((double)iAltitude)/Rad2Deg ; |
4089 | + // For backwards compatibility, the value of this key is stored with |
4090 | + // inverted sign. |
4091 | + // TODO: Skip the sign inversion when the key is changed. |
4092 | + int altitude = -(conf->value("Sun_Altitude", 12).toInt()); |
4093 | + setTwilightAltitude(altitude); |
4094 | |
4095 | - iHorizAltitude = conf->value("Horizon_Altitude", 0).toInt(); |
4096 | - HorizAlti = ((double)iHorizAltitude)/Rad2Deg ; |
4097 | + altitude = conf->value("Horizon_Altitude", 0).toInt(); |
4098 | + setHorizonAltitude(altitude); |
4099 | |
4100 | - |
4101 | conf->endGroup(); |
4102 | + |
4103 | + // Load date format from main settings. |
4104 | + // TODO: Handle date format properly. |
4105 | + if (conf->value("localization/date_display_format", "system_default").toString() == "ddmmyyyy") |
4106 | + setDateFormat(true); |
4107 | + else |
4108 | + setDateFormat(false); |
4109 | } |
4110 | |
4111 | -void Observability::saveSettingsToConfig(void) |
4112 | +void Observability::saveConfiguration() |
4113 | { |
4114 | QSettings* conf = StelApp::getInstance().getSettings(); |
4115 | QString fontColorStr = QString("%1,%2,%3").arg(fontColor[0],0,'f',2).arg(fontColor[1],0,'f',2).arg(fontColor[2],0,'f',2); |
4116 | // Set updated values |
4117 | conf->beginGroup("Observability"); |
4118 | conf->setValue("font_size", fontSize); |
4119 | - conf->setValue("Sun_Altitude", iAltitude); |
4120 | - conf->setValue("Horizon_Altitude", iHorizAltitude); |
4121 | + // For backwards compatibility, the value of this key is stored with |
4122 | + // inverted sign. |
4123 | + // TODO: Skip the sign inversion when the key is changed. |
4124 | + conf->setValue("Sun_Altitude", -twilightAltDeg); |
4125 | + conf->setValue("Horizon_Altitude", horizonAltDeg); |
4126 | conf->setValue("font_color", fontColorStr); |
4127 | conf->setValue("show_AcroCos", show_AcroCos); |
4128 | conf->setValue("show_Good_Nights", show_Good_Nights); |
4129 | @@ -1667,20 +1698,33 @@ |
4130 | conf->endGroup(); |
4131 | } |
4132 | |
4133 | - |
4134 | - |
4135 | -void Observability::setShow(int output, bool setVal) |
4136 | -{ |
4137 | - switch(output) |
4138 | - { |
4139 | - case 1: {show_Today = setVal; break;} |
4140 | - case 2: {show_AcroCos = setVal; break;} |
4141 | - case 3: {show_Good_Nights = setVal; break;} |
4142 | - case 4: {show_Best_Night = setVal; break;} |
4143 | - case 5: {show_FullMoon = setVal; nextFullMoon=0.0; prevFullMoon=0.0; break;} |
4144 | -// case 6: {show_Crescent = setVal; break;} |
4145 | -// case 7: {show_SuperMoon = setVal; break;} |
4146 | - }; |
4147 | +void Observability::enableTodayField(bool enabled) |
4148 | +{ |
4149 | + show_Today = enabled; |
4150 | + configChanged = true; |
4151 | +} |
4152 | + |
4153 | +void Observability::enableAcroCosField(bool enabled) |
4154 | +{ |
4155 | + show_AcroCos = enabled; |
4156 | + configChanged = true; |
4157 | +} |
4158 | + |
4159 | +void Observability::enableGoodNightsField(bool enabled) |
4160 | +{ |
4161 | + show_Good_Nights = enabled; |
4162 | + configChanged = true; |
4163 | +} |
4164 | + |
4165 | +void Observability::enableOppositionField(bool enabled) |
4166 | +{ |
4167 | + show_Best_Night = enabled; |
4168 | + configChanged = true; |
4169 | +} |
4170 | + |
4171 | +void Observability::enableFullMoonField(bool enabled) |
4172 | +{ |
4173 | + show_FullMoon = enabled; |
4174 | configChanged = true; |
4175 | } |
4176 | |
4177 | @@ -1710,52 +1754,44 @@ |
4178 | return fontSize; |
4179 | } |
4180 | |
4181 | -int Observability::getSunAltitude(void) |
4182 | -{ |
4183 | - return iAltitude; |
4184 | -} |
4185 | - |
4186 | -int Observability::getHorizAltitude(void) |
4187 | -{ |
4188 | - return iHorizAltitude; |
4189 | -} |
4190 | - |
4191 | - |
4192 | -void Observability::setFontColor(int color, int value) |
4193 | -{ |
4194 | - float fValue = (float)(value) / 100.; |
4195 | - fontColor[color] = fValue; |
4196 | -} |
4197 | - |
4198 | -void Observability::setFontSize(int value) |
4199 | -{ |
4200 | - fontSize = value; |
4201 | -} |
4202 | - |
4203 | -void Observability::setSunAltitude(int value) |
4204 | -{ |
4205 | - AstroTwiAlti = -((double) value)/Rad2Deg ; |
4206 | - iAltitude = value; |
4207 | - configChanged = true; |
4208 | -} |
4209 | - |
4210 | -void Observability::setHorizAltitude(int value) |
4211 | -{ |
4212 | - HorizAlti = ((double) value)/Rad2Deg ; |
4213 | - iHorizAltitude = value; |
4214 | - configChanged = true; |
4215 | -} |
4216 | - |
4217 | - |
4218 | -/// END OF STUFF FOR THE GUI CONFIG. |
4219 | -/////////////////////////////// |
4220 | - |
4221 | - |
4222 | - |
4223 | - |
4224 | -// Enable the Observability: |
4225 | -void Observability::enableObservability(bool b) |
4226 | -{ |
4227 | - flagShowObservability = b; |
4228 | +int Observability::getTwilightAltitude() |
4229 | +{ |
4230 | + return twilightAltDeg; |
4231 | +} |
4232 | + |
4233 | +int Observability::getHorizonAltitude() |
4234 | +{ |
4235 | + return horizonAltDeg; |
4236 | +} |
4237 | + |
4238 | + |
4239 | +void Observability::setFontColor(const Vec3f& color) |
4240 | +{ |
4241 | + fontColor = color; // Vector3::operator =() is overloaded. :) |
4242 | +} |
4243 | + |
4244 | +void Observability::setFontSize(int size) |
4245 | +{ |
4246 | + fontSize = size; |
4247 | +} |
4248 | + |
4249 | +void Observability::setTwilightAltitude(int altitude) |
4250 | +{ |
4251 | + twilightAltRad = ((double) altitude)/Rad2Deg ; |
4252 | + twilightAltDeg = altitude; |
4253 | + configChanged = true; |
4254 | +} |
4255 | + |
4256 | +void Observability::setHorizonAltitude(int altitude) |
4257 | +{ |
4258 | + horizonAltitude = ((double) altitude)/Rad2Deg ; |
4259 | + horizonAltDeg = altitude; |
4260 | + configChanged = true; |
4261 | +} |
4262 | + |
4263 | + |
4264 | +void Observability::showReport(bool b) |
4265 | +{ |
4266 | + flagShowReport = b; |
4267 | } |
4268 | |
4269 | |
4270 | === modified file 'plugins/Observability/src/Observability.hpp' |
4271 | --- plugins/Observability/src/Observability.hpp 2013-09-11 09:43:19 +0000 |
4272 | +++ plugins/Observability/src/Observability.hpp 2014-04-04 19:35:45 +0000 |
4273 | @@ -30,10 +30,23 @@ |
4274 | class StelButton; |
4275 | class ObservabilityDialog; |
4276 | |
4277 | +//! Main class of the %Observability Analysis plug-in. |
4278 | +//! It provides an observability report for the currently selected object, |
4279 | +//! or for the point in the center of the screen if no object is selected. |
4280 | +//! The output is drawn directly onto the viewport. The color and font size can |
4281 | +//! be selected by the user from the plug-in's configuration window. |
4282 | +//! @see ObservabilityDialog |
4283 | +//! @todo Find a way to (optionally) put the report in the upper left corner |
4284 | +//! infobox. |
4285 | +//! @todo Decide whether to use flags or separate getters/setters to communicate |
4286 | +//! with the configuration window; if using flags, implement them properly w Qt. |
4287 | +//! @todo Handle re-loading of the Solar System at runtime. |
4288 | +//! @todo For each suspicious member variable, check if it can't be actually |
4289 | +//! a local variable. |
4290 | class Observability : public StelModule |
4291 | { |
4292 | Q_OBJECT |
4293 | - Q_PROPERTY(bool enabled READ getEnableObservability WRITE enableObservability) |
4294 | + Q_PROPERTY(bool flagShowReport READ isShownReport WRITE showReport) |
4295 | public: |
4296 | Observability(); |
4297 | virtual ~Observability(); |
4298 | @@ -42,39 +55,14 @@ |
4299 | virtual void draw(StelCore* core); |
4300 | virtual double getCallOrder(StelModuleActionName actionName) const; |
4301 | |
4302 | - |
4303 | //! Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin. |
4304 | virtual bool configureGui(bool show=true); |
4305 | |
4306 | |
4307 | - //! Set up the plugin with default values. |
4308 | - void restoreDefaults(void); |
4309 | - void restoreDefaultConfigIni(void); |
4310 | - |
4311 | - //! Read (or re-read) settings from the main config file. This will be called from init and also |
4312 | - //! when restoring defaults (i.e. from the configuration dialog / restore defaults button). |
4313 | - void readSettingsFromConfig(void); |
4314 | - |
4315 | - //! Save the settings to the main configuration file. |
4316 | - void saveSettingsToConfig(void); |
4317 | - |
4318 | - //! Set which output is shown. |
4319 | - //! @param output is the index of the output (e.g., 1 for today's ephemeris, 5 for Full Moon). |
4320 | - //! @param show is a boolean (true to show the output; false to hide it). |
4321 | - void setShow(int output, bool show); |
4322 | - |
4323 | - //! Set the font colors. Color is (0,1,2) for (R,G,B): |
4324 | - void setFontColor(int Color, int Value); |
4325 | - |
4326 | - //! Set the font size: |
4327 | - void setFontSize(int); |
4328 | - |
4329 | - //! Set the Sun altitude at twilight: |
4330 | - void setSunAltitude(int); |
4331 | - |
4332 | - //! Set the Sun altitude at twilight: |
4333 | - void setHorizAltitude(int); |
4334 | - |
4335 | + //! Read (or re-read) settings from the main config file. |
4336 | + //! Default values are provided for all settings. |
4337 | + //! Called in init() and resetConfiguration(). |
4338 | + void loadConfiguration(); |
4339 | |
4340 | //! get Show Flags from current configuration: |
4341 | bool getShowFlags(int); |
4342 | @@ -85,55 +73,107 @@ |
4343 | //! get current font size: |
4344 | int getFontSize(void); |
4345 | |
4346 | - //! get current Sun altitude at twilight: |
4347 | - int getSunAltitude(void); |
4348 | - |
4349 | - //! get current Horizon altitude: |
4350 | - int getHorizAltitude(void); |
4351 | - |
4352 | - bool getEnableObservability() const {return flagShowObservability;} |
4353 | + //! Get the user-defined Sun altitude at twilight. |
4354 | + //! @returns A value in degrees. |
4355 | + int getTwilightAltitude(); |
4356 | + |
4357 | + //! Get the user-defined altitude of the visual horizon. |
4358 | + int getHorizonAltitude(); |
4359 | + |
4360 | + bool isShownReport() const {return flagShowReport;} |
4361 | public slots: |
4362 | -//! Set whether observability will execute or not: |
4363 | - void enableObservability(bool b); |
4364 | - |
4365 | + //! Restore and reload the default plug-in settings. |
4366 | + void resetConfiguration(); |
4367 | + //! Save the plug-in's configuration to the main configuration file. |
4368 | + void saveConfiguration(); |
4369 | + |
4370 | + //! @name Fields displayed in the observability report. |
4371 | + //! @{ |
4372 | + |
4373 | + //! Display today's events (rise, set and transit times). |
4374 | + void enableTodayField(bool enabled = true); |
4375 | + //! Display acronychal and cosmical rising/setting. |
4376 | + void enableAcroCosField(bool enabled = true); |
4377 | + //! Display nights when the object is above the horizon after darkness. |
4378 | + void enableGoodNightsField(bool enabled = true); |
4379 | + //! Display when selected object is in opposition. |
4380 | + void enableOppositionField(bool enabled = true); |
4381 | + //! Display date of the full moon. |
4382 | + //! Has any effect only if the Moon is selected. |
4383 | + void enableFullMoonField(bool enabled = true); |
4384 | + //! @} |
4385 | + |
4386 | + |
4387 | + //! Set the color of the font used to display the report. |
4388 | + //! Applies only to what is drawn on the viewport. |
4389 | + //! @param color Color vector in Stellarium's RGB format. |
4390 | + void setFontColor(const Vec3f& color); |
4391 | + //! Set the size of the font used to display the report. |
4392 | + //! Applies only to what is drawn on the viewport. |
4393 | + void setFontSize(int size); |
4394 | + |
4395 | + //! Set the angular altitude below the horizon of the Sun at twilight. |
4396 | + //! This determines the boundaries of day/night for observation purposes. |
4397 | + //! @param altitude An angle in degrees; as this is altitude below |
4398 | + //! the horizon, it should be negative. |
4399 | + //! @note If you want the slider in the configuration dialog to be inverted, |
4400 | + //! you can use the @c invertedAppearance property of QSlider. |
4401 | + //! @todo Check if parameter is in the acceptable range? |
4402 | + void setTwilightAltitude(int altitude); |
4403 | + |
4404 | + //! Set the angular altitude of the visual horizon. |
4405 | + //! @param altitude An angle in degrees. |
4406 | + //! @todo Check if parameter is in the acceptable range? |
4407 | + void setHorizonAltitude(int altitude); |
4408 | + |
4409 | + //! Controls whether an observability report will be displayed. |
4410 | + void showReport(bool b); |
4411 | + |
4412 | + |
4413 | private slots: |
4414 | + //! Retranslates the user-visible strings when the language is changed. |
4415 | void updateMessageText(); |
4416 | |
4417 | + |
4418 | private: |
4419 | - |
4420 | - |
4421 | -//! Stuff for the configuration GUI: |
4422 | + //! Configuration window. |
4423 | ObservabilityDialog* configDialog; |
4424 | - QByteArray normalStyleSheet; |
4425 | - QByteArray nightStyleSheet; |
4426 | |
4427 | void setDateFormat(bool b) { dmyFormat=b; } |
4428 | bool getDateFormat(void) { return dmyFormat; } |
4429 | |
4430 | //! Computes the Hour Angle (culmination=0h) in absolute value (from 0h to 12h). |
4431 | +//! @todo The hour angle of what, exactly? --BM |
4432 | //! @param latitude latitude of the observer (in radians). |
4433 | //! @param elevation elevation angle of the object (horizon=0) in radians. |
4434 | //! @param declination declination of the object in radians. |
4435 | - virtual double HourAngle(double latitude,double elevation,double declination); |
4436 | + double calculateHourAngle(double latitude, |
4437 | + double elevation, |
4438 | + double declination); |
4439 | |
4440 | //! Computes the Hour Angle for a given Right Ascension and Sidereal Time. |
4441 | //! @param RA right ascension (hours). |
4442 | //! @param ST sidereal time (degrees). |
4443 | - virtual double HourAngle2(double RA, double ST); |
4444 | + double HourAngle2(double RA, double ST); |
4445 | |
4446 | -//! Solves Moon/Sun/Planet Rise/Set/Transit times for the current Julian day. This function updates the variables MoonRise, MoonSet, MoonCulm. Returns success status. |
4447 | -//! @param Kind is 1 for Sun, 2 for Moon, 3 for Solar-System planet. |
4448 | - virtual bool SolarSystemSolve(StelCore* core, int Kind); |
4449 | +//! Solves Moon/Sun/Planet Rise/Set/Transit times for the current Julian day. |
4450 | +//! This function updates the variables MoonRise, MoonSet, MoonCulm. |
4451 | +//! Returns success status. |
4452 | +//! @param[in] bodyType is 1 for Sun, 2 for Moon, 3 for Solar System object. |
4453 | + bool calculateSolarSystemEvents(StelCore* core, int bodyType); |
4454 | |
4455 | //! Finds the heliacal rise/set dates of the year for the currently-selected object. |
4456 | -//! @param Rise day of year of the Acronycal rise. |
4457 | -//! @param Set day of year of the Acronycal set. |
4458 | -//! @param Rise2 day of year of the Cosmical rise. |
4459 | -//! @param Set2 day of year of the Cosmical set. |
4460 | - virtual int CheckAcro(int &Rise, int &Set, int &Rise2, int &Set2); |
4461 | - |
4462 | - |
4463 | -//! computes the Sun or Moon coordinates at a given Julian date. |
4464 | +//! @param[out] acroRise day of year of the Acronycal rise. |
4465 | +//! @param[out] acroSet day of year of the Acronycal set. |
4466 | +//! @param[out] cosRise day of year of the Cosmical rise. |
4467 | +//! @param[out] cosSet day of year of the Cosmical set. |
4468 | +//! @returns 0 if no dates found, 1 if acronycal dates exist, |
4469 | +//! 2 if cosmical dates exist, and 3 if both are found. |
4470 | + int calculateAcroCos(int& acroRise, int& acroSet, |
4471 | + int& cosRise, int& cosSet); |
4472 | + |
4473 | + |
4474 | +//! Computes the Sun or Moon coordinates at a given Julian date. |
4475 | //! @param core the stellarium core. |
4476 | //! @param JD double for the Julian date. |
4477 | //! @param RASun right ascension of the Sun (in hours). |
4478 | @@ -142,7 +182,10 @@ |
4479 | //! @param DecMoon idem for the Moon. |
4480 | //! @param EclLon is the module of the vector product of Heliocentric Ecliptic Coordinates of Sun and Moon (projected over the Ecliptic plane). Useful to derive the dates of Full Moon. |
4481 | //! @param getBack controls whether Earth and Moon must be returned to their original positions after computation. |
4482 | - virtual void getSunMoonCoords(StelCore* core, double JD, double &RASun, double &DecSun, double &RAMoon, double &DecMoon, double &EclLon, bool getBack); |
4483 | + void getSunMoonCoords(StelCore* core, double jd, |
4484 | + double& raSun, double& decSun, |
4485 | + double& raMoon, double& decMoon, |
4486 | + double& eclLon, bool getBack); |
4487 | |
4488 | |
4489 | //! computes the selected-planet coordinates at a given Julian date. |
4490 | @@ -151,73 +194,103 @@ |
4491 | //! @param RA right ascension of the planet (in hours). |
4492 | //! @param Dec declination of the planet (in radians). |
4493 | //! @param getBack controls whether the planet must be returned to its original positions after computation. |
4494 | - virtual void getPlanetCoords(StelCore* core, double JD, double &RA, double &Dec, bool getBack); |
4495 | + void getPlanetCoords(StelCore* core, double JD, double &RA, double &Dec, bool getBack); |
4496 | |
4497 | -//! Comptues the Earth-Moon distance (in AU) at a given Julian date. The parameters are similar to those of getSunMoonCoords or getPlanetCoords. |
4498 | - virtual void getMoonDistance(StelCore* core, double JD, double &Distance, bool getBack); |
4499 | +//! Comptues the Earth-Moon distance (in AU) at a given Julian date. |
4500 | +//! The parameters are similar to those of getSunMoonCoords or getPlanetCoords. |
4501 | + void getMoonDistance(StelCore* core, |
4502 | + double jd, |
4503 | + double& distance, |
4504 | + bool getBack); |
4505 | |
4506 | //! Returns the angular separation (in radians) between two points. |
4507 | //! @param RA1 right ascension of point 1 (in hours) |
4508 | //! @param Dec1 declination of point 1 (in radians) |
4509 | //! @param RA2 idem for point 2 |
4510 | //! @param Dec2 idem for point 2 |
4511 | - virtual double Lambda(double RA1, double Dec1, double RA2, double Dec2); |
4512 | + double Lambda(double RA1, double Dec1, double RA2, double Dec2); |
4513 | |
4514 | //! Converts a time span in hours (given as double) in hh:mm:ss (integers). |
4515 | //! @param t time span (double, in hours). |
4516 | //! @param h hour (integer). |
4517 | //! @param m minute (integer). |
4518 | //! @param s second (integer). |
4519 | - virtual void double2hms(double t, int &h,int &m,int &s); |
4520 | + void double2hms(double t, int &h,int &m,int &s); |
4521 | |
4522 | //! Just returns the sign of a double; |
4523 | - virtual double sign(double d); |
4524 | - |
4525 | -//! Returns a string of date (e.g. "25 Apr") from a Day of Year (integer). |
4526 | -//! @param DoY Day of the year. |
4527 | - virtual QString CalenDate(int DoY); |
4528 | - |
4529 | -//! Returns a string of range dates (e.g. "25 Apr - 10 May") from a two Days of Year (integer). |
4530 | -//! @param fDoY first Day of the year. |
4531 | -//! @param sDoY second Day of the year. |
4532 | - virtual QString RangeCalenDates(int fDoY, int sDoY); |
4533 | + double sign(double d); |
4534 | + |
4535 | +//! Get a date string ("25 Apr") from an ordinal date (Xth day of the year). |
4536 | +//! @param dayNumber The ordinal number of a day of the year. (For example, |
4537 | +//! 25 April is the 115 or 116 day of the year.) |
4538 | +//! @todo Determine the exact format - leap year handling, etc. |
4539 | + QString formatAsDate(int dayNumber); |
4540 | + |
4541 | +//! Get a date range string ("25 Apr - 10 May") from two ordinal dates. |
4542 | +//! @see formatAsDate() |
4543 | +//! @param startDay number of the first day in the period. |
4544 | +//! @param endDay number of the last day in the period. |
4545 | + QString formatAsDateRange(int startDay, int endDay); |
4546 | |
4547 | //! Just subtracts/adds 24h to a RA (or HA), to make it fall within 0-24h. |
4548 | //! @param RA right ascension (in hours). |
4549 | - virtual double toUnsignedRA(double RA); |
4550 | + double toUnsignedRA(double RA); |
4551 | |
4552 | -//! Computes the RA, Dec and Rise/Set Sid. times of the selected planet for each day of the current year. |
4553 | +//! Prepare arrays with data for the selected object for each day of the year. |
4554 | +//! Computes the RA, Dec and rise/set sidereal times of the selected planet |
4555 | +//! for each day of the current year. |
4556 | //! @param core the current Stellarium core. |
4557 | - virtual void PlanetRADec(StelCore *core); |
4558 | + void updatePlanetData(StelCore* core); |
4559 | |
4560 | //! Computes the Sun's RA and Dec for each day of a given year. |
4561 | //! @param core current Stellarium core. |
4562 | - virtual void SunRADec(StelCore* core); |
4563 | + void updateSunData(StelCore* core); |
4564 | |
4565 | //! Computes the Sun's Sid. Times at astronomical twilight (for each year's day) |
4566 | - virtual void SunHTwi(); |
4567 | - |
4568 | -//! Just convert the Vec3d named TempLoc into RA/Dec: |
4569 | - virtual void toRADec(Vec3d TempLoc, double &RA, double &Dec); |
4570 | - |
4571 | -//! Vector to store the Julian Dates for the current year: |
4572 | + void updateSunH(); |
4573 | + |
4574 | + //! Convert an equatorial position vector to RA/Dec. |
4575 | + void toRADec(Vec3d vec3d, double& ra, double& dec); |
4576 | + |
4577 | + //! Table containing the Julian Dates of the days of the current year. |
4578 | double yearJD[366]; |
4579 | |
4580 | -//! Check if a source is observable during a given date: |
4581 | -//! @aparm i the day of the year. |
4582 | - virtual bool CheckRise(int i); |
4583 | +//! Check if a source is observable during a given date. |
4584 | +//! @param i the day of the year. |
4585 | + bool CheckRise(int day); |
4586 | |
4587 | //! Some useful constants and variables(almost self-explanatory). |
4588 | - double Rad2Deg, Rad2Hr, AstroTwiAlti, UA, TFrac, JDsec, Jan1stJD, halfpi, MoonT, nextFullMoon, prevFullMoon, RefFullMoon, GMTShift, MoonPerilune,RefracHoriz,HorizAlti; |
4589 | + double Rad2Deg, Rad2Hr, UA, TFrac, JDsec, Jan1stJD, halfpi, MoonT, nextFullMoon, prevFullMoon, RefFullMoon, GMTShift, MoonPerilune; |
4590 | + |
4591 | + //! User-defined angular altitude of astronomical twilight in radians. |
4592 | + //! See setTwilightAltitude() and getTwilightAltitude(). |
4593 | + double twilightAltRad; |
4594 | + //! User-defined angular altitude of astronomical twilight in degrees. |
4595 | + //! See setTwilightAltitude() and getTwilightAltitude(). |
4596 | + int twilightAltDeg; |
4597 | + |
4598 | + //! Geometric altitude at refraction-corrected horizon. |
4599 | + double refractedHorizonAlt; |
4600 | + //! User-defined angular altitude of the visual horizon in radians. |
4601 | + double horizonAltitude; |
4602 | + //! User-defined angular altitude of the visual horizon in degrees. |
4603 | + int horizonAltDeg; |
4604 | |
4605 | //! RA, Dec, observer latitude, object's elevation, and Hour Angle at horizon. |
4606 | double selRA, selDec, mylat, mylon, alti, horizH, culmAlt, myJD; |
4607 | |
4608 | //! Vectors to store Sun's RA, Dec, and Sid. Time at twilight and rise/set. |
4609 | - double SunRA[366], SunDec[366], SunSidT[4][366]; |
4610 | + double sunRA[366]; |
4611 | + double sunDec[366]; |
4612 | + //! Sidereal time of the Sun at twilight and rise/set through the year. |
4613 | + double sunSidT[4][366]; |
4614 | |
4615 | //! Vectors to store planet's RA, Dec, and Sid. Time at rise/set. |
4616 | - double ObjectRA[366], ObjectDec[366], ObjectH0[366], ObjectSidT[2][366]; |
4617 | + double objectRA[366]; |
4618 | + double objectDec[366]; |
4619 | + double objectH0[366]; |
4620 | + //! Table of the sidereal time of the object's rising/setting. |
4621 | + double objectSidT[2][366]; |
4622 | |
4623 | //! Rise/Set/Transit times for the Moon at current day: |
4624 | double MoonRise, MoonSet, MoonCulm, lastJDMoon; |
4625 | @@ -226,7 +299,7 @@ |
4626 | Vec3d EarthPos[366]; |
4627 | |
4628 | //! Position of the observer relative to the Earth Center or other coordinates: |
4629 | - Vec3d ObserverLoc, Pos0, Pos1, Pos2, RotObserver; //, Pos3; |
4630 | + Vec3d ObserverLoc, Pos1, Pos2, RotObserver; //, Pos3; |
4631 | |
4632 | //! Matrix to transform coordinates for Sun/Moon ephemeris: |
4633 | Mat4d LocTrans; |
4634 | @@ -237,44 +310,65 @@ |
4635 | Planet* myPlanet; |
4636 | |
4637 | |
4638 | -//! Current simulation year and number of days in the year.; |
4639 | - int currYear, nDays, iAltitude, iHorizAltitude; |
4640 | + //! Current simulation year. |
4641 | + int curYear; |
4642 | + //! Days in the current year (366 on leap years). |
4643 | + int nDays; |
4644 | |
4645 | -//! Useful auxiliary strings, to help checking changes in source/observer. Also to store results that must survive between iterations. |
4646 | - QString selName, bestNight, ObsRange, objname, AcroCos; |
4647 | + //! Untranslated name of the currently selected object. |
4648 | + //! Used to check if the selection has changed. |
4649 | + QString selName; |
4650 | + //! Cached copy of the "best night" line in the report. |
4651 | + QString lineBestNight; |
4652 | + //! Cached copy of the line reporting when the target is observable. |
4653 | + QString lineObservableRange; |
4654 | + //! Cached copy of the line reporting the acronical/cosmical rise and set. |
4655 | + QString lineAcroCos; |
4656 | |
4657 | //! Strings to save ephemeris Times: |
4658 | QString RiseTime, SetTime, CulmTime; |
4659 | |
4660 | -//! Just the names of the months. |
4661 | - QString months[12]; |
4662 | + //! Just the names of the months. |
4663 | + QStringList monthNames; |
4664 | |
4665 | -//! Using for storage date format [i18n] |
4666 | + //! Using for storage date format [i18n] |
4667 | bool dmyFormat; |
4668 | |
4669 | //! Equatorial and local coordinates of currently-selected source. |
4670 | Vec3d EquPos, LocPos; |
4671 | |
4672 | //! Some booleans to check the kind of source selected and the kind of output to produce. |
4673 | - bool isStar,isMoon,isSun,isScreen, raised, configChanged, souChanged; |
4674 | - int LastObject; |
4675 | + bool isStar, isMoon, isSun, isScreen; |
4676 | |
4677 | -//! Some booleans to select the kind of output. |
4678 | + //! This really shouldn't be handled like this... |
4679 | + bool hasRisen; |
4680 | + bool configChanged; |
4681 | + bool souChanged; |
4682 | + //! The last object type for which calculateSolarSystemEvents() was called. |
4683 | + int lastType; |
4684 | + |
4685 | + //! @name Flags controlling report contents. |
4686 | + //! @{ |
4687 | bool show_AcroCos, show_Good_Nights, show_Best_Night, show_Today, show_FullMoon; //, show_Crescent, show_SuperMoon; |
4688 | + //! @} |
4689 | |
4690 | -//! Parameters for the graphics (i.e., font, icons, etc.): |
4691 | + //! @name GUI elements |
4692 | + //! @{ |
4693 | + //! Parameters for the graphics. |
4694 | QFont font; |
4695 | Vec3f fontColor; |
4696 | - bool flagShowObservability; |
4697 | + bool flagShowReport; |
4698 | int fontSize; |
4699 | - QPixmap* OnIcon; |
4700 | - QPixmap* OffIcon; |
4701 | - QPixmap* GlowIcon; |
4702 | - StelButton* toolbarButton; |
4703 | + StelButton* button; |
4704 | + //! @} |
4705 | |
4706 | + //! @name Cached translated GUI strings. |
4707 | + //! @todo Decide whether to keep translation caching. |
4708 | + //! @{ |
4709 | QString msgSetsAt, msgRoseAt, msgSetAt, msgRisesAt, msgCircumpolar, msgNoRise, msgCulminatesAt, msgCulminatedAt, msgH, msgM, msgS; |
4710 | - QString msgSrcNotObs, msgNoACRise, msgGreatElong, msgLargSSep, msgAtDeg, msgNone, msgAcroRise, msgNoAcroRise, msgCosmRise, msgNoCosmRise; |
4711 | + QString msgSrcNotObs, msgNoACRise, msgGreatElong, msgLargSSep, msgNone, msgAcroRise, msgNoAcroRise, msgCosmRise, msgNoCosmRise; |
4712 | QString msgWholeYear, msgNotObs, msgAboveHoriz, msgToday, msgThisYear, msgPrevFullMoon, msgNextFullMoon; |
4713 | + //! @} |
4714 | |
4715 | }; |
4716 | |
4717 | |
4718 | === modified file 'plugins/Observability/src/gui/ObservabilityDialog.cpp' |
4719 | --- plugins/Observability/src/gui/ObservabilityDialog.cpp 2014-03-01 15:42:49 +0000 |
4720 | +++ plugins/Observability/src/gui/ObservabilityDialog.cpp 2014-04-04 19:35:45 +0000 |
4721 | @@ -52,6 +52,7 @@ |
4722 | { |
4723 | ui->retranslateUi(dialog); |
4724 | setAboutHtml(); |
4725 | + updateControls(); // Also re-translate the dynamic slider labels |
4726 | } |
4727 | } |
4728 | |
4729 | @@ -60,27 +61,55 @@ |
4730 | { |
4731 | ui->setupUi(dialog); |
4732 | ui->tabs->setCurrentIndex(0); |
4733 | - connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); |
4734 | + connect(&StelApp::getInstance(), |
4735 | + SIGNAL(languageChanged()), this, SLOT(retranslate())); |
4736 | |
4737 | + Observability* plugin = GETSTELMODULE(Observability); |
4738 | + |
4739 | // Settings: |
4740 | - connect(ui->Today, SIGNAL(stateChanged(int)), this, SLOT(setTodayFlag(int))); |
4741 | - connect(ui->AcroCos, SIGNAL(stateChanged(int)), this, SLOT(setAcroCosFlag(int))); |
4742 | - connect(ui->Opposition, SIGNAL(stateChanged(int)), this, SLOT(setOppositionFlag(int))); |
4743 | - connect(ui->Goods, SIGNAL(stateChanged(int)), this, SLOT(setGoodDatesFlag(int))); |
4744 | - connect(ui->FullMoon, SIGNAL(stateChanged(int)), this, SLOT(setFullMoonFlag(int))); |
4745 | -// connect(ui->Crescent, SIGNAL(stateChanged(int)), this, SLOT(setCrescentMoonFlag(int))); |
4746 | -// connect(ui->SuperMoon, SIGNAL(stateChanged(int)), this, SLOT(setSuperMoonFlag(int))); |
4747 | + |
4748 | + // clicked() is called only when the user makes an input, |
4749 | + // so we avoid an endless loop when setting the value in updateControls(). |
4750 | + connect(ui->todayCheckBox, SIGNAL(clicked(bool)), |
4751 | + plugin, SLOT(enableTodayField(bool))); |
4752 | + connect(ui->acroCosCheckBox, SIGNAL(clicked(bool)), |
4753 | + plugin, SLOT(enableAcroCosField(bool))); |
4754 | + connect(ui->oppositionCheckBox, SIGNAL(clicked(bool)), |
4755 | + plugin, SLOT(enableOppositionField(bool))); |
4756 | + connect(ui->goodNightsCheckBox, SIGNAL(clicked(bool)), |
4757 | + plugin, SLOT(enableGoodNightsField(bool))); |
4758 | + connect(ui->fullMoonCheckBox, SIGNAL(clicked(bool)), |
4759 | + plugin, SLOT(enableFullMoonField(bool))); |
4760 | |
4761 | - connect(ui->Red, SIGNAL(sliderMoved(int)), this, SLOT(setRed(int))); |
4762 | - connect(ui->Green, SIGNAL(sliderMoved(int)), this, SLOT(setGreen(int))); |
4763 | - connect(ui->Blue, SIGNAL(sliderMoved(int)), this, SLOT(setBlue(int))); |
4764 | - connect(ui->fontSize, SIGNAL(sliderMoved(int)), this, SLOT(setSize(int))); |
4765 | - connect(ui->SunAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setAltitude(int))); |
4766 | - connect(ui->HorizAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setHorizon(int))); |
4767 | + connect(ui->redSlider, SIGNAL(sliderMoved(int)), |
4768 | + this, SLOT(setColor())); |
4769 | + connect(ui->greenSlider, SIGNAL(sliderMoved(int)), |
4770 | + this, SLOT(setColor())); |
4771 | + connect(ui->blueSlider, SIGNAL(sliderMoved(int)), |
4772 | + this, SLOT(setColor())); |
4773 | + |
4774 | + // Isn't valueChanged() better? But then we'll have to block |
4775 | + // signlas when settting the slider values. |
4776 | + connect(ui->fontSize, SIGNAL(sliderMoved(int)), |
4777 | + plugin, SLOT(setFontSize(int))); |
4778 | + connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)), |
4779 | + plugin, SLOT(setTwilightAltitude(int))); |
4780 | + connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)), |
4781 | + this, SLOT(updateAltitudeLabel(int))); |
4782 | + connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)), |
4783 | + plugin, SLOT(setHorizonAltitude(int))); |
4784 | + connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)), |
4785 | + this, SLOT(updateHorizonLabel(int))); |
4786 | |
4787 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); |
4788 | - connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(restoreDefaults())); |
4789 | - connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSettings())); |
4790 | + connect(ui->restoreDefaultsButton, SIGNAL(clicked()), |
4791 | + plugin, SLOT(resetConfiguration())); |
4792 | + // TODO: The plug-in should emit a signal when settings are changed. |
4793 | + // This works, because slots are called in the order they were connected. |
4794 | + connect(ui->restoreDefaultsButton, SIGNAL(clicked()), |
4795 | + this, SLOT(updateControls())); |
4796 | + connect(ui->saveSettingsButton, SIGNAL(clicked()), |
4797 | + plugin, SLOT(saveConfiguration())); |
4798 | |
4799 | // About tab |
4800 | setAboutHtml(); |
4801 | @@ -88,8 +117,7 @@ |
4802 | Q_ASSERT(gui); |
4803 | ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet)); |
4804 | |
4805 | - updateGuiFromSettings(); |
4806 | - |
4807 | + updateControls(); |
4808 | } |
4809 | |
4810 | void ObservabilityDialog::setAboutHtml(void) |
4811 | @@ -118,121 +146,59 @@ |
4812 | ui->aboutTextBrowser->setHtml(html); |
4813 | } |
4814 | |
4815 | - |
4816 | -void ObservabilityDialog::restoreDefaults(void) |
4817 | -{ |
4818 | - qDebug() << "Observability::restoreDefaults"; |
4819 | - GETSTELMODULE(Observability)->restoreDefaults(); |
4820 | - GETSTELMODULE(Observability)->readSettingsFromConfig(); |
4821 | - updateGuiFromSettings(); |
4822 | -} |
4823 | - |
4824 | -void ObservabilityDialog::updateGuiFromSettings(void) |
4825 | -{ |
4826 | - ui->Today->setChecked(GETSTELMODULE(Observability)->getShowFlags(1)); |
4827 | - ui->AcroCos->setChecked(GETSTELMODULE(Observability)->getShowFlags(2)); |
4828 | - ui->Goods->setChecked(GETSTELMODULE(Observability)->getShowFlags(3)); |
4829 | - ui->Opposition->setChecked(GETSTELMODULE(Observability)->getShowFlags(4)); |
4830 | - ui->FullMoon->setChecked(GETSTELMODULE(Observability)->getShowFlags(5)); |
4831 | +void ObservabilityDialog::updateControls() |
4832 | +{ |
4833 | + Observability* plugin = GETSTELMODULE(Observability); |
4834 | + |
4835 | + ui->todayCheckBox->setChecked(plugin->getShowFlags(1)); |
4836 | + ui->acroCosCheckBox->setChecked(plugin->getShowFlags(2)); |
4837 | + ui->goodNightsCheckBox->setChecked(plugin->getShowFlags(3)); |
4838 | + ui->oppositionCheckBox->setChecked(plugin->getShowFlags(4)); |
4839 | + ui->fullMoonCheckBox->setChecked(plugin->getShowFlags(5)); |
4840 | // ui->Crescent->setChecked(GETSTELMODULE(Observability)->getShowFlags(6)); |
4841 | // ui->SuperMoon->setChecked(GETSTELMODULE(Observability)->getShowFlags(7)); |
4842 | |
4843 | - Vec3f currFont = GETSTELMODULE(Observability)->getFontColor(); |
4844 | - int Rv = (int)(100.*currFont[0]); |
4845 | - int Gv = (int)(100.*currFont[1]); |
4846 | - int Bv = (int)(100.*currFont[2]); |
4847 | - ui->Red->setValue(Rv); |
4848 | - ui->Green->setValue(Gv); |
4849 | - ui->Blue->setValue(Bv); |
4850 | - ui->fontSize->setValue(GETSTELMODULE(Observability)->getFontSize()); |
4851 | - int SAlti = GETSTELMODULE(Observability)->getSunAltitude(); |
4852 | - ui->SunAltitude->setValue(SAlti); |
4853 | - ui->AltiText->setText(QString("%1 -%2 %3").arg(q_("Sun altitude at twilight:")).arg(SAlti).arg(q_("deg."))); |
4854 | - |
4855 | - SAlti = GETSTELMODULE(Observability)->getHorizAltitude(); |
4856 | - ui->HorizAltitude->setValue(SAlti); |
4857 | - ui->HorizText->setText(QString("%1 %2 %3").arg(q_("Horizon altitude:")).arg(SAlti).arg(q_("deg."))); |
4858 | - |
4859 | -} |
4860 | - |
4861 | -void ObservabilityDialog::saveSettings(void) |
4862 | -{ |
4863 | - GETSTELMODULE(Observability)->saveSettingsToConfig(); |
4864 | -} |
4865 | - |
4866 | -void ObservabilityDialog::setTodayFlag(int checkState) |
4867 | -{ |
4868 | - bool b = checkState != Qt::Unchecked; |
4869 | - GETSTELMODULE(Observability)->setShow(1,b); |
4870 | -} |
4871 | - |
4872 | -void ObservabilityDialog::setAcroCosFlag(int checkState) |
4873 | -{ |
4874 | - bool b = checkState != Qt::Unchecked; |
4875 | - GETSTELMODULE(Observability)->setShow(2,b); |
4876 | -} |
4877 | - |
4878 | -void ObservabilityDialog::setGoodDatesFlag(int checkState) |
4879 | -{ |
4880 | - bool b = checkState != Qt::Unchecked; |
4881 | - GETSTELMODULE(Observability)->setShow(3,b); |
4882 | -} |
4883 | - |
4884 | -void ObservabilityDialog::setOppositionFlag(int checkState) |
4885 | -{ |
4886 | - bool b = checkState != Qt::Unchecked; |
4887 | - GETSTELMODULE(Observability)->setShow(4,b); |
4888 | -} |
4889 | - |
4890 | -void ObservabilityDialog::setFullMoonFlag(int checkState) |
4891 | -{ |
4892 | - bool b = checkState != Qt::Unchecked; |
4893 | - GETSTELMODULE(Observability)->setShow(5,b); |
4894 | -} |
4895 | - |
4896 | -//void ObservabilityDialog::setCrescentMoonFlag(int checkState) |
4897 | -//{ |
4898 | -// bool b = checkState != Qt::Unchecked; |
4899 | -// GETSTELMODULE(Observability)->setShow(6,b); |
4900 | -//} |
4901 | - |
4902 | -//void ObservabilityDialog::setSuperMoonFlag(int checkState) |
4903 | -//{ |
4904 | -// bool b = checkState != Qt::Unchecked; |
4905 | -// GETSTELMODULE(Observability)->setShow(7,b); |
4906 | -//} |
4907 | - |
4908 | -void ObservabilityDialog::setRed(int Value) |
4909 | -{ |
4910 | - GETSTELMODULE(Observability)->setFontColor(0,Value); |
4911 | -} |
4912 | - |
4913 | -void ObservabilityDialog::setGreen(int Value) |
4914 | -{ |
4915 | - GETSTELMODULE(Observability)->setFontColor(1,Value); |
4916 | -} |
4917 | - |
4918 | -void ObservabilityDialog::setBlue(int Value) |
4919 | -{ |
4920 | - GETSTELMODULE(Observability)->setFontColor(2,Value); |
4921 | -} |
4922 | - |
4923 | -void ObservabilityDialog::setSize(int Value) |
4924 | -{ |
4925 | - GETSTELMODULE(Observability)->setFontSize(Value); |
4926 | -} |
4927 | - |
4928 | -void ObservabilityDialog::setAltitude(int Value) |
4929 | -{ |
4930 | - ui->AltiText->setText(QString("%1 -%2 %3").arg(q_("Sun altitude at twilight:")).arg(Value).arg(q_("deg."))); |
4931 | - GETSTELMODULE(Observability)->setSunAltitude(Value); |
4932 | -} |
4933 | - |
4934 | - |
4935 | -void ObservabilityDialog::setHorizon(int Value) |
4936 | -{ |
4937 | - ui->HorizText->setText(QString("%1 %2 %3").arg(q_("Horizon altitude:")).arg(Value).arg(q_("deg."))); |
4938 | - GETSTELMODULE(Observability)->setHorizAltitude(Value); |
4939 | + Vec3f fontColor = plugin->getFontColor(); |
4940 | + int red = (int)(100.*fontColor[0]); |
4941 | + int green = (int)(100.*fontColor[1]); |
4942 | + int blue = (int)(100.*fontColor[2]); |
4943 | + ui->redSlider->setValue(red); |
4944 | + ui->greenSlider->setValue(green); |
4945 | + ui->blueSlider->setValue(blue); |
4946 | + |
4947 | + ui->fontSize->setValue(plugin->getFontSize()); |
4948 | + int sunAltitude = plugin->getTwilightAltitude(); |
4949 | + ui->sunAltitudeSlider->setValue(sunAltitude); |
4950 | + updateAltitudeLabel(sunAltitude); |
4951 | + int horizonAltitude = plugin->getHorizonAltitude(); |
4952 | + ui->horizonAltitudeSlider->setValue(horizonAltitude); |
4953 | + updateHorizonLabel(horizonAltitude); |
4954 | +} |
4955 | + |
4956 | +void ObservabilityDialog::setColor() |
4957 | +{ |
4958 | + int red = ui->redSlider->value(); |
4959 | + int green = ui->greenSlider->value(); |
4960 | + int blue = ui->blueSlider->value(); |
4961 | + |
4962 | + float fRed = (float)(red) / 100.; |
4963 | + float fGreen = (float)(green) / 100.; |
4964 | + float fBlue = (float)(blue) / 100.; |
4965 | + |
4966 | + Vec3f color(fRed, fGreen, fBlue); |
4967 | + GETSTELMODULE(Observability)->setFontColor(color); |
4968 | +} |
4969 | + |
4970 | +void ObservabilityDialog::updateAltitudeLabel(int altitude) |
4971 | +{ |
4972 | + // This allows translators to use their own conventions for degree signs. |
4973 | + ui->sunAltitudeLabel->setText(q_("Sun altitude at twilight: %1 deg.").arg(altitude)); |
4974 | +} |
4975 | + |
4976 | +void ObservabilityDialog::updateHorizonLabel(int horizon) |
4977 | +{ |
4978 | + // This allows translators to use their own conventions for degree signs. |
4979 | + ui->horizonAltitudeLabel->setText(q_("Horizon altitude: %1 deg.").arg(horizon)); |
4980 | } |
4981 | |
4982 | |
4983 | |
4984 | === modified file 'plugins/Observability/src/gui/ObservabilityDialog.hpp' |
4985 | --- plugins/Observability/src/gui/ObservabilityDialog.hpp 2013-01-17 13:17:38 +0000 |
4986 | +++ plugins/Observability/src/gui/ObservabilityDialog.hpp 2014-04-04 19:35:45 +0000 |
4987 | @@ -27,6 +27,8 @@ |
4988 | |
4989 | class Ui_ObservabilityDialog; |
4990 | |
4991 | +//! Configuration window of the %Observability Analysis plug-in. |
4992 | +//! @see Observability |
4993 | class ObservabilityDialog : public StelDialog |
4994 | { |
4995 | Q_OBJECT |
4996 | @@ -43,28 +45,18 @@ |
4997 | void retranslate(); |
4998 | |
4999 | private slots: |
5000 | - void setTodayFlag(int); |
This branch has errors in time calculation of rise and set for objects.