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