-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlog.txt
437 lines (344 loc) · 19.1 KB
/
log.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
Solar System Live
Development Log
2003 April 6
Added JavaScript logic to check the "UTC" or "Julian" radio
buttons for time selection when the corresponding edit field
is modified. If JavaScript is absent, no harm will be done; it
will just be as before.
Changed delimiters for date display in the UTC box to "-"
to conform to ISO-8601.
Loosened up parsing of date and time in the UTC box to accept
any delimiters within date and time specifications. A space
is still required between the date and time.
Added " " between items in the control panel to avoid
infelicitous line breaks when the window is made narrow.
Added a bgcolor="#FFFFFF" specification to the <body> declaration
to ensure the page background is white.
Added a <p> between the orrery image and the control panel to
keep the date and time edit fields from stepping on the image.
Added quoting to the Solar CGI script so arguments with embedded
blanks (for example, in the latitude and longitude fields) don't
cause "test" errors in the CGI script.
Modified parsedeg() to permit blanks as delimiters between
degree, minute, and second fields.
Due to some ancient code inherited from Home Planet, the
heliocentric viewpoint was truncated to an integral number
of degrees, losing any minutes and seconds or decimal fraction
specification. Now it's unlikely anybody will want to specify
the viewpoint so precisely, but it oughta work and now it does.
2003 April 20
If CACHE_WARNING is defined, a big HTML comment screed is now
included before the "<img src="> tag which includes the cached
image in the HTML result document warning users who look at the
source to figure out where the image is coming from not to link
to it in the cache directory.
Changed the "install" target to "mv" the executable into the
new /vitesse/server/cgi-executables directory.
Added a "-" option specification which marks the end of the
list of options identified by a leading "-" and changed the
order of arguments supplied by the cgi-bin/Solar script to move
the observing site longitude, latitude, and altitude to the end
and precede them with a "-" to prevent any attempt to use them
to spoof other option specifications.
The code which enforces the CPU time limit (to bail us out of
loops caused by bad handling of malformed requests) fell afoul
of the Protean signal handling in Solaris. I changed the "signal"
call to "sigset" and it seems to work now. I also changed the
time limit exceeded message to display in a red font.
The HTML code which references the orrery image was generated
before the image itself. This worked because the stdout
stream is buffered, and the size of HTML emitted was insufficient
to flush the buffer prior to generation of the image. Addition
of the the CACHE_WARNING changed all that, and led to a race
condition where the user's browser would try to fetch the image
before it was present in the cache, resulting in a broken image
which would be found if the page was refreshed. I moved the
image generation to before the HTML generation, in the process
moving the calculation of the planetary position table by a
new buildPlanets() function in planetp.c to before the
orrery generation. Before, it was done as a side effect of
generating the HTML planetary position table, and would cause
the orrery generation to fail if you ran the program in
(obsolete) non-HTML mode.
Modified the format for Right Ascension and Declination in the
position table generated by planetp.c so degree, minute, and
second (for RA) line up.
2005 January 7
Commented out the fclose() of the output file in gifout.c.
This was leading to a double close when vplanet.c closed
the non-stdout output file.
2005 May 28
Added the "i" (image size) option to the "u" option help
output.
Removed the obsolete "l" option from the option processing code.
Modified HTML generated by the "h" option to XHTML 1.0 compliant.
Added dynamic image support with the "j" option, as in Earth
and Moon Viewer. Setting the "j" option returns an HTTP reply
in which the GIF image is embedded. If the "w" option is
specified, a PPM file is returned with the MIME type
"image/x-portable-pixmap".
Added the "-f" option to enable stateless image generation.
If invoked without the "-f" option, the cache directory is used
as before, permitting compatibility with those who depend on
downloading images from the cache during transition.
2005 May 29
Echoing of asteroid and comet elements in astrelem.c did not include
the XHTML closing slash in the <br /> tags which separate the lines
of the elements--fixed.
Rewrote the stateless image request logic to parse QUERY_STRING
directly rather than require uncgi parsing of the request.
Created a SolarImage CGI script which simply changes to the
cgi-executable directory and runs the solar program without
any option fiddling or the need to invoke uncgi. This will get
rid of one uncgi execution per image generated.
Fixed the Solar CGI script to not append the solar-post.html epilogue
when a dynamic image is being returned.
Split the packargs() and unpackargs() functions out into a
separate packargs.c file to simplify deployment in other
applications.
2005 May 30
Removed obsolete server number and random cache file name generation
from the Solar CGI script.
2005 July 17
Integrated the current versions of astrelem.c and cometel.c, plus
the new files csvelements.c and jplelements.c from Your Sky, along
with the corresponding changes in vplanet.h, vplanet.c, and
astro.c. I added a check to prevent a buffer overflow in
unpacking "di=" arguments if somebody manages to dummy up arguments
with more lines of orbital elements than the program was compiled
for.
2005 July 18
Removed some ancient commented-out debug code from vplanet.c.
2005 July 22
Created an HTML file, elements_test.html, which invokes the test (.t)
version of the program with each of the orbital element formats we
support. This is intended to be run from the development directory
with a file: URL to verify orbital element parsing.
The calculation of how far to extend the orbit of a parabolic or
hyperbolic comet so as to fill the frame assumed an oblique view of
the orbit. We really ought to do this by extending until we clip
or hit some large limit, but I just increased the limit from 1.4 times
the diameter of the displayed solar system to twice the diameter, which
handles almost every plausible situation.
Integrated the new LANDGRAF code in gKepler() in asteroid.c to
handle comets with eccentricities up to 1.1.
2005 July 23
The Planet(x) macro in the planets() function of vsop87.c used
a && operator instead of a & to and the selection bits in the
"which" argument with the planet number, causing all planets to
be recalculated when only one planet was wanted while calculating
orrery orbits. This caused a lot of extra computation in the orbit
plotting phase.
When computing the orbital velocity of parabolic and hyperbolic comets
for segments of the orbit far removed from the Sun, the expression
used for the square of the velocity could go negative, resulting in
a NaN for the velocity when the square root was taken. This, in
turn, propagated into the Julian date and caused catastrophe in
the orbital position calculation in asteroid.c. I modified the
code to detect the negative velocity squared and simply use the
last valid velocity calculated for the balance of the calculation.
Since the object is receding from the Sun, this will compute more
segments than are required for smoothness, but since we're near the edge
of the solar system anyway, the actual increase in computation is
negligible.
2005 July 31
The scale for plots of the outer Solar System was fixed at 50 AU,
while the inner system scale was adjusted, when tracking an asteroid
or comet, to include it. Tracking KBOs could result in truncation of
the orbit or failing to plot the object. I added logic to orrery()
in vplanet.c scale the full system so a tracked object will be included,
The scale is limited to be between 50 and 150 AU.
2005 August 11
When generating a dynamic image for a stateless request, the parameter
block propagated the "-h" option, which set the "html" flag which,
in turn, caused the "Content-Type" to be set to "text/html" instead
of the correct "image/gif". This confused some browsers, especially
if the dynamic image URL was pasted directly into the location bar
instead of used in the context of an <img> tag. I added code to
clear the html flag when processing a dynamic image request.
The headers generated for a dynamic image request included a
"Cache-Control: no-cache" which was redundant since we now
automatically append a "Cache-Control: private" to all cgi-bin
requests in the Apache httpd.conf. I commented out the redundant
Cache-control item, explaining why. The "Pragma: no-cache",
intended for older browsers and caches, is still generated
for dynamic image requests.
2006 October 16
Added a cast to the result from unpackargs() in vplanet.c to
silence a GCC natter.
Integrated the embedded uncgi.c module and directCall logic from
Earth and Moon viewer to permit invocation without first running
uncgi and elimination of the intermediate shell script which
assembles the command line. As with Earth and Moon viewer, we
detect if uncgi has, in fact, been run, so existing saved
custom request URLs will continue to work. The SolarImage script
is no longer used--the embedded image is generated by a direct
invocation of Solar (which is now an executable program, not
a shell script).
The internal code which assembles the command line from the
environment variables set by uncgi() is substantially more picky
than the former shell script. Environment variables which supply
an option are all now checked to verify that the actually supply
the option they're expected to and ignored otherwise. While the
code was carefully audited before to verify that a user couldn't
do anything mischevious by twiddling the request page to change
the options in form input fields, this provides a higher level
of security by checking each option for validity before it is
placed on the synthetic command line.
Added protection against HTML injection in the result document
via HTML embedded in the asteroid/comet orbital elements input
field. The functions in htmlutil.c are used to escape HTML
metacharacters in the following places user input is echoed:
Echoing of orbital elements in the editable <textarea>
Display of the name of the object being tracked in the
Ephemeris table generated by updatePlanet() in planetp.c
Display of the object name in the echoed orbital elements
output by print_elements() in astrelem.c.
Changed the "install-test" and "install" targets in the
Makefile to copy the executable program into the CGI
directory as Solar.t or Solar respectively. Note that
the first time you install for production this will blow
away the previous shell script, so you should back it up
first.
Made all of the lengthy tables of periodic terms in
vsop87.c and astro.c "const".
Made arguments to functions in astro.c and vsop87.c
"const" where possible.
2007 January 15
If the last line of an orbital element specification lacked
a line feed character at the end, element_rs() in astrelem.c
would fail to parse it, which caused, for example, JPL orbital
elements specified in URLs like those in the Your Sky object
catalogue to fail. I added code to the WWW_elements processing
logic in vplanet.c to allocate a new buffer, copy the elements,
and append a new line character if none is supplied in the argument.
2007 July 3
Wrapped radio buttons and check boxes (excepting those whose labels
are links to help file documents) in <label> containers, which
allow the label as well as the control to be clicked in
competently-implemented browsers and improves accessibility
for non-graphical browsers.
Changed the name of the bitmap file containing the image icons
from "images.bmp" to "solar_images.bmp". Since this is kept
in the common CGI executables directory, it's best that it be
identified with the application that uses it.
Implemented a "colour scheme" facility, which allows choosing
the regular colour image on either the default or a white
background, black on white, white on black, or a night vision
presentation of red on black with all text in the page also
red on a black background. The "Images" icon bitmap has been updated
to include samples of the colours needed by the alternative
schemes.
2009 March 6
Some MPEC orbital elements now include right-justified comments on
the first (name) line. This could lead to a buffer overflow in
astrelem.c and cometel.c (both in the astro directory) because the
buffer on the stack into which the name field was stored was 80
characters in length and did not account for the trailing zero
character in this case. I increased the buffer size to 82
characters and converted all string copies in these files and
in csvelements.c to use strlcpy(), which I added to the astro
directory as strlcpy.c. This BSD function guarantees that a string
copy will not overflow the destination buffer whose length is
passed as a third argument, and that the destination string will
always be zero terminated.
Added code to astrelem.c to delete comments from the title line
of MPEC orbital elements. We detect a comment by the appearance of
five or more consecutive spaces after the object name and elide
anything from that point to the end of line.
2009 March 31
Processing of Julian day date specifications ("-e2" option)
used the civil time adjusted Julian day number (intended to
compute UTC time) instead of the original Julian day when
determining the UTC year, month, and day. This resulted, for
Julian day numbers with a fractional part of 0.5 or greater,
in the previous UTC date being displayed in the UTC input
field. I modified the option processing code in vplanet.c
to use the correct Julian day number when computing the
date.
2009 April 4
Incremented version number to 2.3.
Building on 64 bit platforms caused problems reading the BMP files
for icons and planet images. I added an include of stdint.h in vplanet.h
and revised bitmap.h to use its [u]intN_t types for all fields in
bitmap file headers. This seems to have corrected the colour map composition
problems seen in the initial 64 bit builds.
The code which prints the PPM file header in dump_ppm() in vplanet.c
ran into a format type compatibility warning in 64 bit builds. I
added an explicit cast to work around it.
The error handler for a buffer allocation failure by
escape_html_content() in htmlutil.c ran into a compiler warning
on 64 bit builds due to integer width incompatibility. I added
a cast to force type conformance.
2020 May 9
Incremented version number to 2.4. Note that this is used only
in directory nomenclature, not embedded anywhere in the source
or object code.
Converted all source files to current Fourmilab standard of no tabs
and no trailing spaces.
Fixed a number of compiler warnings in -Wall mode which had appeared
since the last build cycle. All of these were harmless except for a
possible buffer overflow in astrelem.c which could never happen with
valid elements. Well, now it can't happen even with invalid elements.
Added the current YourSky-derived icon files to the main build
directory, replacing the now-obsolete icons.bmp file.
Converted all of the HTML and CSS files in the webtree directory and
its help subdirectory to no tabs and no trailing white space.
Converted all GIF images in the webtree/help subdirector to PNG and
udpated all references to them to use the PNG files. Deleted the
GIF images.
2020 May 10
Changed the way the host key for stateless image generation requests
is managed. The public host key, distributed with the software, is
now in hostkey_PUB.h, while the private key used only at Fourmilab and
not distributed to avoid denial of service attacks, is in
hostkey_FOURMILAB.h, which is excluded from the Git repository by
.gitignore. The packargs.c file includes the private key if FOURMILAB
is defined, otherwise the public key is used. The Makefile build
target "solar" builds with the public key, while "fourmilab" uses the
private key.
Added a version number declaration to the Makefile and made the -u
option display the declared version.
2022 May 11
Made reference images from URLs for regression test:
solar1.gif
https://www.fourmilab.ch/cgi-bin/Solar?date=2&jd=2476948.34564&img=-k0&sys=-Sf&eyes=0&imgsize=640&orb=-b0&lat=47%B0&ns=North&lon=7%B0&ew=East&hlat=90%B0&hns=North&hlon=0%B0&edump=-xe&elements=+1P%2FHalley+49400+0.58597811+0.96714291+162.26269+111.33249+58.42008+19860205.89532+JPL+J863%2F77%0D%0A
./solar -oregress/cache/solar1.gif -b0 -t -i640 -e22476948.34564 -dA90 -DO0 47 7
1P/Halley 49400 0.58597811 0.96714291 162.26269 111.33249 58.42008 19860205.89532 JPL J863/77
solar2.gif
https://www.fourmilab.ch/cgi-bin/Solar?date=2&jd=2476948.34564&img=-k0&sys=-Sf&eyes=0&imgsize=640&orb=-b1&lat=47%B0&ns=North&lon=7%B0&ew=East&hlat=45&hns=North&hlon=30&edump=-xe&elements=20461+Dioretsa+51388+24.4459301+0.9027402+160.19391+102.19213+296.97833+359.0956660+13.80+0.15+JPL%0D%0A
./solar -oregress/cache/solar2.gif -b1 -t -i640 -e22476948.34564 -dA45 -DO30 47 7
20461 Dioretsa 51388 24.4459301 0.9027402 160.19391 102.19213 296.97833 359.0956660 13.80 0.15 JPL
solar3.gif
https://www.fourmilab.ch/cgi-bin/Solar?date=2&jd=2476948.34564&img=-k0&sys=-Si&stereo=-v&eyes=0&imgsize=320&orb=-b0&lat=47%B0&ns=North&lon=7%B0&ew=East&hlat=33&hns=North&hlon=0%B0&elements=
./solar -oregress/cache/solar3.gif -si -b0 -i320 -v0 -e22476948.34564 -dA33 -DO0 47 7
solar4.gif
https://www.fourmilab.ch/cgi-bin/Solar?date=2&jd=2476948.34564&img=-k0&sys=-Sf&eyes=0&imgsize=480&orb=-b2&lat=47%B0&ns=North&lon=7%B0&ew=East&hlat=90%B0&hns=North&hlon=0%B0&elements=
./solar -oregress/cache/solar4.gif -b2 -i480 -e22476948.34564 -dA90 -DO0 47 7
Implemented the regression test, run with "make check". This generates
the four test cases above using the built program in the development
directory and compares with reference copies in regress/expected, made
from the production Web application. These test asteroid and comet
orbit plotting, stereo image generation, and various orbital scale
options (log, real, and equal).
2022 May 12
Updated the *.md files in the repository parent directory to reflect
the state of the program and the license under which we're releasing
the source.
Updated the src/elements_prod.html file, which contains tests for the
various formats in which we accept asteroid and comet orbital
elements, to HTML 5, validated it, and added a test for interstellar
object 'Oumuamua, declared in JPL format.
Deleted the elements_test.html file, which simply ran the same tests
with the Solar.t server. We don't do testing that way any more.
Deleted the cgi_dir directory, which contained obsolete copies of the
CGI directory files dating from when we decoded query parameters via
a shell script.
Added the current solar-post.html file from the production CGI
directory to the src subdirectory.
Extended the "check" target in the Makefile to generate the HTML
corresponding to each of our image tests and verify that against
a saved reference copy. Note that since the dynamic image request
embedded in the HTML contains an expiration timestamp, we have to
prune that with "sed" before comparing the generated HTML with the
reference.