Format/typo check 2013/morgan1
I also included the dates for the two unnamed undated comets that the author referred to so that one can see what is meant: Comet Halley and Comet Hale-Bopp, labelled Ha and Hb in the program which is now noted in the README.md file too.
This commit is contained in:
1 parent
f9a3d86c7b
commit
1f92e5153f
1 file changed
+31
-13
+31
-13
@@ -18,6 +18,10 @@ echo "2013/10/03" | ./morgan1
|
||||
echo "1985/10/28" | ./morgan1
|
||||
|
||||
echo "1996/12/31" | ./morgan1
|
||||
|
||||
echo "1986/03/31" | ./morgan1 # Comet Halley (look for 'Ha')
|
||||
|
||||
echo "1997/04/01" | ./morgan1 # Comet Hale-Bopp (look for 'Hb')
|
||||
```
|
||||
|
||||
Try pressing the arrow keys when your focus is in the window.
|
||||
@@ -50,35 +54,49 @@ calendar](https://en.wikipedia.org/wiki/Julian_calendar) and
|
||||
[Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar) (10 days
|
||||
missing between 1582/10/04 and 1582/10/15).
|
||||
|
||||
The scale is logarithmic to be able to display the 8 planets without having
|
||||
Mercury, Venus, Earth and Mars squeezed around the Sun.
|
||||
The scale is logarithmic to be able to display the [8
|
||||
planets](http://news.bbc.co.uk/2/hi/5282440.stm) without having
|
||||
[Mercury](https://science.nasa.gov/mercury),
|
||||
[Venus](https://science.nasa.gov/venus/),
|
||||
[Earth](https://science.nasa.gov/earth/facts) and
|
||||
[Mars](https://science.nasa.gov/mars) squeezed around the
|
||||
[Sun](https://science.nasa.gov/sun/).
|
||||
|
||||
The size is not proportional either.
|
||||
|
||||
|
||||
### Bonus
|
||||
|
||||
It also displays the position of 2 famous comets during their last approach:
|
||||
|
||||
- The first one around the third IOCCC.
|
||||
- The second one between the thirteenth and fourteenth IOCCC.
|
||||
- The [first one](https://science.nasa.gov/solar-system/comets/1p-halley/)
|
||||
around the [third IOCCC](/years.html#1986).
|
||||
- The [second
|
||||
one](https://science.nasa.gov/solar-system/comets/c-1995-o1-hale-bopp/) between
|
||||
the [thirteenth](/years.html#1996) and [fourteenth](/years.html#1998) IOCCC.
|
||||
|
||||
|
||||
### Limitations
|
||||
|
||||
* ASCII character set is assumed.
|
||||
* A C99 compiler is required (for some `math.h` functions).
|
||||
* The position should be correct for years between (-1000; +3000)
|
||||
* The approximations done in the formula are OK for displaying the
|
||||
position around the sun but not for other applications like ephemeride or
|
||||
sky view from Earth (angles may be off by 1 or 2 degrees sometimes).
|
||||
* The approximations done in the formula are OK for displaying the position
|
||||
around the [Sun](https://science.nasa.gov/sun/) but not for other applications
|
||||
like [ephemeride](https://en.wikipedia.org/wiki/Ephemeris) or sky view from
|
||||
[Earth](https://science.nasa.gov/earth/facts) (angles may be off by 1 or 2
|
||||
degrees sometimes).
|
||||
|
||||
|
||||
### Obfuscation
|
||||
|
||||
* Reuse of 1 letter variables.
|
||||
* Only the main function with some `for` loops.
|
||||
* Only the `main()` function with some `for` loops.
|
||||
* Constants for orbital elements encoded in a string.
|
||||
* Hexadecimal and decimal values used inconsistently.
|
||||
* Comparisons order are not consistent.
|
||||
* A lot of stuff is done in the different parts of the for loop.
|
||||
* A lot of stuff is done in the different parts of the `for` loop.
|
||||
|
||||
|
||||
### Compilation warnings
|
||||
|
||||
@@ -104,10 +122,10 @@ morgan1.c:56:14: warning: '&&' within '||' [-Wlogical-op-parentheses]
|
||||
This is due to most of the parentheses and braces being removed when
|
||||
unnecessary.
|
||||
|
||||
To verify the display, you can look at one of this programs :
|
||||
* xephem : https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/
|
||||
* homeplanet : https://www.fourmilab.ch/homeplanet/
|
||||
* https://www.theplanetstoday.com
|
||||
To verify the display, you can look at one of these programs :
|
||||
* xephem : <https://web.archive.org/web/20130310133219/http://www.clearskyinstitute.com/xephem/>
|
||||
* homeplanet : <https://www.fourmilab.ch/homeplanet/>
|
||||
* <https://www.theplanetstoday.com>
|
||||
|
||||
|
||||
## Copyright and CC BY-SA 4.0 License:
|
||||
|
||||
Reference in new issue
Block a user