├── Altaz2StarAlignPointingErrors.html ├── AltazConstantMotionTrackingErrors.html ├── Calculators.html ├── DobFriction.html ├── FoldedNewtonian.html ├── JoyOfMirrorMaking └── 16 inch F3 meniscus mirror making class.html ├── NewtDesigner.html ├── ObjectContrastCalculator.htm ├── PitchLapCalc.html ├── PriAxisMountErrors.htm ├── RonchiExamples ├── 10 example.jpg ├── 25 example.jpg └── 6 example.jpg ├── SQMandNELMconverter.html ├── Strehl RMS PV calc.html ├── VisualDetectionCalculator.htm ├── airmass.htm ├── altazCalc.html ├── apertureCalc.html ├── artificialStarDistance.html ├── astroTimes.html ├── baffle.html ├── coordErrors.html ├── css ├── Altaz2StarAlignPointingErrors.css ├── AltazConstantMotionTrackingErrors.css ├── FoldingTelescopes.css ├── HerschelsGhosts.css ├── LeonFoucault.css ├── NewtDesigner.css ├── Parabolizing.css ├── Ronchi.css ├── Telescope Magnification.css ├── WalkaboutPage.css ├── ZipDob.css ├── apertureCalc.css ├── calc.css ├── diagonal.css ├── holomaskCalc.css ├── index.css ├── objectLib.css ├── presentations.css ├── rft.css ├── scopeToSky.css ├── standardPage.css ├── telescopeCriteriaCalc.css └── tm.css ├── diagonal.htm ├── diopterToFocalLengthConverter.html ├── encoderCalc.htm ├── equatTrackingRatesCalc.html ├── gaugeStudy.html ├── holomaskCalc.html ├── initializationErrorPlot.html ├── lib ├── Altaz2StarAlignPointingErrors.js ├── AltazConstantMotionTrackingErrors.js ├── DobFrictionCalc.js ├── NewtDesigner.js ├── NewtDesignerTestWithDiagToFLDistance7.jpg ├── P2 intrusion.jpg ├── PitchLapCalc.js ├── PriAxisMountErrorsCalc.js ├── Ronchi.js ├── SAC_DeepSky_ver81.zip ├── SAC_DeepSky_ver81 │ ├── Potpourri.txt │ ├── Readme.txt │ ├── Revhist.txt │ ├── SAC_DeepSky_Ver81_Fence.TXT │ ├── SAC_DeepSky_Ver81_QCQ.TXT │ ├── SAC_DeepSky_ver81_Excel.xls │ ├── Sacdoc.txt │ ├── The NGC on the Net.doc │ ├── The NGC on the Net.txt │ └── testcvs.txt ├── SQMandNELMconverterCalc.js ├── Strehl RMS PV calc.js ├── airmassCalc.js ├── altazCalc.js ├── apertureCalc.js ├── artificialStarDistanceCalc.js ├── astroTimes.js ├── baffle.js ├── binoLayoutForNewtDesigner1.jpg ├── binoLayoutForNewtDesigner2.jpg ├── binoLayoutForNewtDesigner3.jpg ├── binoLayoutForNewtDesigner4.jpg ├── calcLib unitTests.htm ├── calcLib.js ├── coordErrorsCalc.js ├── coordLib unitTests.htm ├── coordLib.js ├── diagonal.js ├── diopterToFocalLengthConverter.js ├── embedHtml.js ├── encoderCalc.js ├── encoderLib unitTests.htm ├── encoderLib.js ├── equatTrackingRatesCalc.js ├── eyepiece divergence study.jpg ├── foldedNewtonian.js ├── gaugeLib.js ├── gaugeStudy.js ├── holomaskCalc.js ├── holomaskLib unitTests.htm ├── holomaskLib.js ├── images │ └── base64images.js ├── initializationErrorPlot.js ├── initializationErrorPlotData.js ├── jqplot │ ├── excanvas.js │ ├── excanvas.min.js │ ├── jquery.jqplot.1.0.8r1250.zip │ ├── jquery.jqplot.css │ ├── jquery.jqplot.js │ ├── jquery.jqplot.min.css │ ├── jquery.jqplot.min.js │ ├── jquery.js │ ├── jquery.min.js │ └── plugins │ │ ├── jqplot.BezierCurveRenderer.js │ │ ├── jqplot.BezierCurveRenderer.min.js │ │ ├── jqplot.barRenderer.js │ │ ├── jqplot.barRenderer.min.js │ │ ├── jqplot.blockRenderer.js │ │ ├── jqplot.blockRenderer.min.js │ │ ├── jqplot.bubbleRenderer.js │ │ ├── jqplot.bubbleRenderer.min.js │ │ ├── jqplot.canvasAxisLabelRenderer.js │ │ ├── jqplot.canvasAxisLabelRenderer.min.js │ │ ├── jqplot.canvasAxisTickRenderer.js │ │ ├── jqplot.canvasAxisTickRenderer.min.js │ │ ├── jqplot.canvasOverlay.js │ │ ├── jqplot.canvasOverlay.min.js │ │ ├── jqplot.canvasTextRenderer.js │ │ ├── jqplot.canvasTextRenderer.min.js │ │ ├── jqplot.categoryAxisRenderer.js │ │ ├── jqplot.categoryAxisRenderer.min.js │ │ ├── jqplot.ciParser.js │ │ ├── jqplot.ciParser.min.js │ │ ├── jqplot.cursor.js │ │ ├── jqplot.cursor.min.js │ │ ├── jqplot.dateAxisRenderer.js │ │ ├── jqplot.dateAxisRenderer.min.js │ │ ├── jqplot.donutRenderer.js │ │ ├── jqplot.donutRenderer.min.js │ │ ├── jqplot.dragable.js │ │ ├── jqplot.dragable.min.js │ │ ├── jqplot.enhancedLegendRenderer.js │ │ ├── jqplot.enhancedLegendRenderer.min.js │ │ ├── jqplot.funnelRenderer.js │ │ ├── jqplot.funnelRenderer.min.js │ │ ├── jqplot.highlighter.js │ │ ├── jqplot.highlighter.min.js │ │ ├── jqplot.json2.js │ │ ├── jqplot.json2.min.js │ │ ├── jqplot.logAxisRenderer.js │ │ ├── jqplot.logAxisRenderer.min.js │ │ ├── jqplot.mekkoAxisRenderer.js │ │ ├── jqplot.mekkoAxisRenderer.min.js │ │ ├── jqplot.mekkoRenderer.js │ │ ├── jqplot.mekkoRenderer.min.js │ │ ├── jqplot.meterGaugeRenderer.js │ │ ├── jqplot.meterGaugeRenderer.min.js │ │ ├── jqplot.mobile.js │ │ ├── jqplot.mobile.min.js │ │ ├── jqplot.ohlcRenderer.js │ │ ├── jqplot.ohlcRenderer.min.js │ │ ├── jqplot.pieRenderer.js │ │ ├── jqplot.pieRenderer.min.js │ │ ├── jqplot.pointLabels.js │ │ ├── jqplot.pointLabels.min.js │ │ ├── jqplot.pyramidAxisRenderer.js │ │ ├── jqplot.pyramidAxisRenderer.min.js │ │ ├── jqplot.pyramidGridRenderer.js │ │ ├── jqplot.pyramidGridRenderer.min.js │ │ ├── jqplot.pyramidRenderer.js │ │ ├── jqplot.pyramidRenderer.min.js │ │ ├── jqplot.trendline.js │ │ └── jqplot.trendline.min.js ├── jquery │ ├── jquery cvs URL.txt │ ├── jquery-1.11.1.min.js │ ├── jquery-2.1.1.min.js │ ├── jquery-3.1.1.min.js │ ├── jquery-ui.min.js │ └── jquery.csv-0.71.min.js ├── json │ ├── BortleScale.js │ ├── MelBartels30InchDesignData.js │ ├── MelBartelsZipDobIIDesignData.js │ ├── SAC_DeepSky_Ver81_Json.js │ ├── SAC_DeepSky_Ver81_abbr.js │ ├── comaCorrectors.js │ ├── eyepieces.js │ ├── focusers.js │ ├── materialFriction.js │ ├── mountTypes.js │ ├── spiderTypes.js │ └── tubeTypes.js ├── lens CG.jpg ├── lockwood 42 inch f3.75 54 pt support.jpg ├── magnitudeCalc.js ├── matrix initialization errors.xls ├── meniscusMirrorMakingClass.js ├── mirror cell 54 pt support naming.jpg ├── motorCalc.js ├── motorLib unitTests.htm ├── motorLib.js ├── objectContrastCalc.js ├── objectLib data mining.htm ├── objectLib unitTests.htm ├── objectLib.js ├── objectLibCalc.js ├── pitch lap calc examples.jpg ├── precessionCalc.js ├── qunit │ ├── qunit-2.17.1.css │ └── qunit-2.17.1.js ├── refractionCalc.js ├── rotational vectors test example.jpg ├── sagittaCalc.js ├── scopeToSky.js ├── sharedLib unitTests.htm ├── sharedLib.js ├── slumpingCalc.js ├── telescopeCriteriaCalc.js ├── threeAxisLib unitTests.htm ├── threeAxisLib.js ├── trajLib unitTests.htm ├── trajLib.js ├── trajectoryCalc.js ├── underscore │ ├── Underscore.js_files │ │ ├── Underscore Test Suite_files │ │ │ ├── arrays.js.download │ │ │ ├── chaining.js.download │ │ │ ├── collections.js.download │ │ │ ├── cross-document.js.download │ │ │ ├── functions.js.download │ │ │ ├── objects.js.download │ │ │ ├── placeholder.html │ │ │ ├── qunit-extras.js.download │ │ │ ├── qunit.css │ │ │ ├── qunit.js.download │ │ │ ├── saved_resource.html │ │ │ ├── underscore.js.download │ │ │ └── utility.js.download │ │ ├── a_documentcloud_project.png │ │ ├── underscore.js │ │ └── underscore.png │ └── underscore-min.js └── visualDetectionCalc.js ├── magnitude.html ├── motorCalc.htm ├── objectLib.html ├── precession.html ├── readme.txt ├── refraction.htm ├── ronchi.html ├── sagitta.html ├── scopeToSky.html ├── slumpingCalc.html ├── telescopeCriteriaCalc - old.html ├── telescopeCriteriaCalc.html ├── tm.html └── trajectory.htm /AltazConstantMotionTrackingErrors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Altazimuth telescope constant motion tracking errors 7 | 8 | 9 | 10 |
11 |

Altazimuth telescope constant motion tracking errors

12 |

by Mel Bartels

13 |
14 | 15 |
16 | 17 |
18 | 19 | This browser does not support the canvas element. Please use a more recent browser. 20 | 21 |
22 | 23 |
24 | Latitude in degrees 25 |
26 | Acceptable drift error in arcseconds 27 |
28 | Tracking time in seconds 29 |
30 |
31 | 32 |
33 | 34 |
35 |
36 |

Notes

37 | How long can an altazimuth telescope track with constant rates of speed in the azimuth and altitude axes?
38 |
39 | An altazimuth telescope's drive rates vary continuously, more so in certain parts of the sky. Further, the rate of change in the drive rates changes. If the drive rates are left unchanged, eventually the tracking error will build to an unacceptable level. This calculator illustrates tracking errors. The error threshold and the time of constant drive rates can be varied.
40 |
41 | The calculator shows that, as expected, error increases as the telescope is pointed upward. However, surprisingly a modest pattern emerges. Because of the quasi-exponential increase of the error, the time is more important than an arbitrary error limit.
42 |
43 | Finally, the calculator shows that it will be difficult to reverse engineer the pointing position from the change in drive rates. For too much of the sky, the drive rates do not vary that greatly. Besides in a polar aligned scope, other than refraction, the drive rate never varies from the sidereal tracking rate.
44 |
45 | Mel Bartels 46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Calculators.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to my calculators 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /DobFriction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner Rocker Designer 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /FoldedNewtonian.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner Lowrider Designer 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /ObjectContrastCalculator.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Object Contrast Calculator 8 | 9 | 10 | 11 | 12 | 13 |

Object Contrast Calculator

14 | 15 |

Object surface brightness (MPAS) = 16 | 17 |
     or 18 | 19 | from object magnitude 20 | 21 | and size in arc-minutes 22 | 23 | by 24 | 25 |
26 |
27 | Sky background brightness (SQM MPAS reading) = 28 | 29 |
30 |
31 | 32 |

Results

33 |
34 |
35 |

Interpreting the results

36 | MPAS stands for Magnitude Per Arc-second Squared.
37 | Sky background brightness is 21.5 MPAS for a dark site, 18.5 MPAS for a city site.
38 | Detectable contrast for objects of large apparent size is 3-6%.
39 | Very faint objects smaller than five degree apparent size can be impossible to see; the larger the apparent size the better as long as the apparent size does not exceed the eyepiece's apparent field of view.
40 |

by Mel Bartels

41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /RonchiExamples/10 example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/RonchiExamples/10 example.jpg -------------------------------------------------------------------------------- /RonchiExamples/25 example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/RonchiExamples/25 example.jpg -------------------------------------------------------------------------------- /RonchiExamples/6 example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/RonchiExamples/6 example.jpg -------------------------------------------------------------------------------- /SQMandNELMconverter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SQM to NELM Converter 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 |
17 |
18 | Enter Sky Quality Meter reading 19 | 20 | 21 | unaided eye magnitude is 22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 | Enter unaided eye magnitude limit 30 | 31 | 32 | SQM reading is 33 | 34 |
35 |
36 |
37 | 38 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Strehl RMS PV calc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Strehl, RMS and Peak-Valley Calculator 7 | 8 | 9 | 10 | 11 |
12 |

Strehl, RMS and Peak-Valley Calculator

13 |

Enter either a Strehl, RMS or Peak-Valley. Press the corresponding button to calculate the other values.

14 | 15 | 16 | 17 | 20 | 23 | 26 | 27 | 28 | 31 | 34 | 37 | 38 | 39 | 42 | 45 | 48 | 49 |
18 | Strehl = 19 | 21 | 22 | 24 | 25 |
29 | RMS = 30 | 32 | 33 | 35 | 36 |
40 | Peak-Valley = 41 | 43 | 44 | 46 | 47 |
50 | 51 |
52 |
53 |
54 | Notes:
55 |
56 | The conversions assume a smooth optical figure.
57 |
58 | A Strehl of 1.0 means that all the light is focused to a point. Because of diffraction caused by the finite aperture, at least 16% of the light will be thrown outside the point in the form of surrounding rings of diminishing brightness, and the point will become a disk containing at most 84% of the light. The linear size of this Airy Disk depends on the focal ratio.
59 |
60 | A quarter-wave optic has a Strehl of 0.80, an RMS of 1/14 wave and a Peak-Valley of 1/4 wave. The Airy Disk will contain 64% of the light and the surrounding diffractions rings 36% of the light.
61 |
62 | See my Rating Mirrors webpage for more.
63 |
64 | Mel Bartels 65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /VisualDetectionCalculator.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner Visual Designer 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /airmass.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Airmass Calculator 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | Interpreting the chart:
16 |
17 | Plots airmass versus elevation in degrees. Airmass is the amount of atmosphere the light travels through. An airmass of one means the light traverses one atmosphere on the way to your eyes. Air mass is important in astronomy because light is not only extinguished at a rate approximately 0.2 magnitudes per atmosphere but also the light is smeared resulting in poor seeing.
18 |
19 | Mel Bartels 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /altazCalc.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/altazCalc.html -------------------------------------------------------------------------------- /apertureCalc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner relationship between aperture, eyepiece, eye and field of view 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /artificialStarDistance.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Artificial Star Testing Distance 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 |
17 |
18 | Unit of measurement 19 | inches 20 | millimeters 21 |
22 | Mirror diameter 23 | 24 | focal length 25 | 26 |
27 | 28 | distance = 29 | 30 |
31 |
32 |
33 | 34 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /astroTimes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Astronomical Times Calculator 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 20 | 21 | 22 | 25 | 28 | 29 | 30 | 33 | 36 | 37 | 38 | 41 | 44 | 45 | 46 | 49 | 52 | 53 | 54 | 57 | 60 | 61 | 62 | 67 | 72 | 73 | 74 |
16 | 17 | Astronomical Times Calculator

18 |
19 |
23 | Date and time = 24 | 26 | 27 |
31 | Timezone (hrs) offset from GMT = 32 | 34 | 35 |
39 | Longitude east of GMT = 40 | 42 | 43 |
47 | Local sidereal time = 48 | 50 | 51 |
55 | Julian Day = 56 | 58 | 59 |
63 |
64 | 65 |

66 |
68 |
69 | 70 |

71 |
75 |
76 |
77 | Notes:
78 |
79 | Shows relationship between datetime, timezone and Julian Day; as well as Julian Day, longitude and sidereal time.
80 |
81 | Both time zone and longitude are positive when east of the prime meridian and negative when west. For instance, the USA has negative timezones and negative longitudes.
82 |
83 | Sidereal time and Julian Date are calculated from the input datetime and longitude and the computer's timezone.
84 | Datetime is calculated from the input Julian Date and timezone. Longitude and local sidereal time are ignored.
85 |
86 | Mel Bartels 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /baffle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner Focuser Designer 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /coordErrors.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/coordErrors.html -------------------------------------------------------------------------------- /css/Altaz2StarAlignPointingErrors.css: -------------------------------------------------------------------------------- 1 | #header 2 | { 3 | text-align: center; 4 | } 5 | 6 | #DivCanvas, #DivControls 7 | { 8 | float: left; 9 | margin-left: 30px; 10 | } 11 | 12 | #DivFooter 13 | { 14 | clear: both; 15 | } 16 | 17 | input[type="text"] 18 | { 19 | width: 50px; 20 | } 21 | 22 | #btnPlot 23 | { 24 | width: 200px; 25 | } -------------------------------------------------------------------------------- /css/AltazConstantMotionTrackingErrors.css: -------------------------------------------------------------------------------- 1 | #header { 2 | text-align: center; 3 | } 4 | 5 | #DivCanvas, #DivControls { 6 | float: left; 7 | margin-left: 30px; 8 | } 9 | 10 | #DivFooter { 11 | clear: both; 12 | } 13 | 14 | input[type="text"] { 15 | width: 50px; 16 | } 17 | 18 | .label { 19 | display: block; 20 | float: left; 21 | clear: left; 22 | width: 240px; 23 | text-align: right; 24 | margin-right: 10px; 25 | } 26 | 27 | #btnPlot { 28 | width: 100px; 29 | } -------------------------------------------------------------------------------- /css/FoldingTelescopes.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | html { 18 | height: 100%; 19 | color: darkslategray; 20 | font-family: Verdana, Geneva, sans-serif; 21 | margin-left: 10px; 22 | } 23 | 24 | a:link { 25 | text-decoration: none; 26 | } 27 | a:hover { 28 | text-decoration: underline; 29 | } 30 | 31 | * { 32 | -moz-box-sizing: border-box; 33 | -webkit-box-sizing: border-box; 34 | box-sizing: border-box; 35 | } 36 | 37 | #accordion .ui-accordion-header a { 38 | color: white; 39 | line-height: 40px; 40 | display: block; 41 | width: 100%; 42 | } 43 | 44 | #accordion .ui-accordion-content > * { 45 | } 46 | 47 | .titleFlexArea { 48 | display: flex; 49 | align-items: center; 50 | } 51 | 52 | .titleImg { 53 | width: 95%; 54 | height: 95%; 55 | } 56 | 57 | /* 58 | http://mydevice.io/devices/ 59 | Samsung S4 css resolution is 360x640 60 | iPad css resolution is 768x1024 61 | 62 | */ 63 | 64 | @media all and (min-width: 0px) { 65 | #accordion { 66 | width: 100%; 67 | margin: 20px auto; 68 | } 69 | .accordianTitle { 70 | background-color: darkgray; 71 | width: 100%; 72 | clear: both; 73 | padding: 0px 10px; 74 | } 75 | .notAccordionContent { 76 | clear: both; 77 | width: 100%; 78 | margin-left: auto; 79 | margin-right: auto; 80 | } 81 | .genImage { 82 | width: 100%; 83 | height: 100%; 84 | } 85 | } 86 | 87 | @media all and (min-width: 768px) { 88 | #accordion { 89 | width: 70%; 90 | margin: 40px auto; 91 | } 92 | .accordianTitle { 93 | background-color: darkgray; 94 | width: 70%; 95 | clear: both; 96 | padding: 0px 10px; 97 | } 98 | .notAccordionContent { 99 | clear: both; 100 | width: 70%; 101 | margin-left: auto; 102 | margin-right: auto; 103 | } 104 | .genImage { 105 | width: 40%; 106 | height: 40%; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /css/HerschelsGhosts.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | } 6 | 7 | .imageTextWrap { 8 | float: right; 9 | } 10 | 11 | .IFN { 12 | display: block; 13 | float: left; 14 | width: 480px; 15 | height: 720px; 16 | border: 1px solid lightgray; 17 | padding: 10px; 18 | } 19 | 20 | .IFNimage { 21 | width: 400px; 22 | height: auto; 23 | } 24 | 25 | @media all and (min-width: 0px) { 26 | html { 27 | width: 95%; 28 | } 29 | img { 30 | margin: 10px; 31 | width: 80%; 32 | height: 80%; 33 | } 34 | } 35 | @media all and (min-width: 768px) { 36 | html { 37 | width: 80%; 38 | } 39 | img { 40 | margin: 10px; 41 | width: 30%; 42 | height: 30%; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /css/LeonFoucault.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | 6 | width:80%; 7 | } 8 | 9 | img { 10 | Border: 1px solid black; 11 | } 12 | -------------------------------------------------------------------------------- /css/Parabolizing.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | color: darkslategray; 26 | font-family: Verdana, Geneva, sans-serif; 27 | margin-left: 10px; 28 | } 29 | 30 | a:link { 31 | text-decoration: none; 32 | } 33 | a:hover { 34 | text-decoration: underline; 35 | } 36 | 37 | .links { 38 | background-color: lightgray; 39 | padding: 5px; 40 | } 41 | 42 | .titleFlexArea { 43 | display: flex; 44 | align-items: center; 45 | } 46 | 47 | .titleImg { 48 | float: left; 49 | padding: 1%; 50 | width: 80%; 51 | height: 80%; 52 | } 53 | 54 | /* 55 | http://mydevice.io/devices/ 56 | Samsung S4 css resolution is 360x640 57 | iPad css resolution is 768x1024 58 | 59 | */ 60 | 61 | @media all and (min-width: 0px) { 62 | .titleSection { 63 | clear: both; 64 | width: 100%; 65 | margin-left: auto; 66 | margin-right: auto; 67 | } 68 | .textSection { 69 | clear: both; 70 | width: 100%; 71 | margin-left: auto; 72 | margin-right: auto; 73 | } 74 | .genImage { 75 | width: 100%; 76 | height: 100%; 77 | } 78 | } 79 | 80 | @media all and (min-width: 768px) { 81 | .titleSection { 82 | clear: both; 83 | width: 70%; 84 | margin-left: auto; 85 | margin-right: auto; 86 | } 87 | .textSection { 88 | clear: both; 89 | width: 70%; 90 | margin-left: auto; 91 | margin-right: auto; 92 | } 93 | .genImage { 94 | width: 40%; 95 | height: 40%; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /css/Ronchi.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | } 6 | 7 | .title { 8 | text-align: center; 9 | } 10 | 11 | .grid-container { 12 | display: grid; 13 | grid-template-columns: repeat(auto-fit, minmax(min(100%/4, max(180px, 100%/10)), 1fr)); 14 | } 15 | 16 | .grid-item { 17 | margin: 1px; 18 | padding: 1px; 19 | border: 2px solid white; 20 | background: #e3e3e3; 21 | } 22 | 23 | .label { 24 | text-align: right; 25 | } 26 | 27 | .inputTextShort { 28 | width: 50px; 29 | } 30 | 31 | .inputText { 32 | width: 50px; 33 | } 34 | 35 | .inputTextLong { 36 | width: 75px; 37 | } 38 | 39 | #sliderOffset, #sliderParabolicCorrection { 40 | width: 150px; 41 | vertical-align: middle; 42 | } 43 | 44 | .floatLeftDiv { 45 | float: left; 46 | padding: 10px; 47 | } 48 | 49 | .inputDiv { 50 | padding: 5px; 51 | // don't breakup explanatory text from the user input area 52 | white-space: nowrap; 53 | } 54 | 55 | .exampleDiv { 56 | padding: 5px; 57 | background-color: lightgray; 58 | } 59 | 60 | .floatLeftRonchigramsDiv { 61 | float: left; 62 | padding: 5px; 63 | } 64 | 65 | .zonalErrorsTableDiv { 66 | float: left; 67 | padding: 0px 15px 15px 15px; 68 | } 69 | 70 | .zonalErrorsViewDiv { 71 | float: left; 72 | } 73 | 74 | .MLErrorsDiv { 75 | float: left; 76 | } 77 | 78 | .discussionDiv { 79 | float: left; 80 | width: 30%; 81 | padding: 5px; 82 | } 83 | 84 | .zonalErrorsNotesDiv { 85 | float: left; 86 | width: 30%; 87 | padding: 5px; 88 | } 89 | 90 | .MLToleranceNotesDiv { 91 | float: left; 92 | width: 30%; 93 | padding: 5px; 94 | } 95 | 96 | .clearFloat { 97 | clear: both; 98 | } 99 | 100 | .exBtn { 101 | width: 100px; 102 | } 103 | 104 | @media all and (min-width: 0px) { 105 | .bigImage { 106 | width: 100%; 107 | height: 100%; 108 | } 109 | .smallImage { 110 | width: 30%; 111 | height: 30%; 112 | } 113 | } 114 | 115 | @media all and (min-width: 768px) { 116 | .bigImage { 117 | width: 50%; 118 | height: 50%; 119 | } 120 | .smallImage { 121 | width: 15%; 122 | height: 15%; 123 | } 124 | } 125 | 126 | -------------------------------------------------------------------------------- /css/Telescope Magnification.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | } 6 | table, td, ttr { 7 | border: 1px solid black; 8 | cellpadding: 1px; 9 | cellspacing: 2px; 10 | border-collapse: collapse; 11 | } 12 | table tr:first-child { 13 | font-weight: bold; 14 | } 15 | .inputText { 16 | width: 50px; 17 | } 18 | @media all and (min-width: 0px) { 19 | html { 20 | width: 95%; 21 | } 22 | img { 23 | margin: 10px; 24 | width: 60%; 25 | height: 60%; 26 | } 27 | .bigImage { 28 | width: 70%; 29 | height: 70%; 30 | } 31 | } 32 | @media all and (min-width: 768px) { 33 | html { 34 | width: 80%; 35 | } 36 | img { 37 | margin: 10px; 38 | width: 40%; 39 | height: 40%; 40 | } 41 | .bigImage { 42 | width: 50%; 43 | height: 50%; 44 | } 45 | } 46 | .imageTextWrap { 47 | float: right; 48 | } -------------------------------------------------------------------------------- /css/WalkaboutPage.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | } 6 | @media all and (min-width: 0px) { 7 | html { 8 | width: 95%; 9 | } 10 | img { 11 | margin: 10px; 12 | } 13 | } 14 | @media all and (min-width: 768px) { 15 | html { 16 | width: 80%; 17 | } 18 | img { 19 | margin: 10px; 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /css/ZipDob.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | color: darkslategray; 26 | font-family: Verdana, Geneva, sans-serif; 27 | margin-left: 10px; 28 | } 29 | 30 | a:link { 31 | text-decoration: none; 32 | } 33 | a:hover { 34 | text-decoration: underline; 35 | } 36 | 37 | .links { 38 | background-color: lightgray; 39 | padding: 5px; 40 | } 41 | 42 | .flexArea { 43 | display: flex; 44 | align-items: center; 45 | } 46 | 47 | .titleText { 48 | text-align: center; 49 | } 50 | 51 | .titleImg { 52 | padding: 1%; 53 | width: 33%; 54 | height: 33%; 55 | } 56 | 57 | table, td, ttr { 58 | border: 1px solid black; 59 | cellpadding: 1px; 60 | cellspacing: 2px; 61 | border-collapse: collapse; 62 | } 63 | 64 | table tr:first-child { 65 | font-weight: bold; 66 | } 67 | 68 | .boldRed { 69 | vertical-align: top; 70 | font-weight: bold; 71 | color: red; 72 | } 73 | 74 | .tableCellImageText { 75 | text-align: center; 76 | vertical-align: top; 77 | white-space: nowrap; 78 | } 79 | 80 | .starCountTable td { 81 | width: 130px; 82 | } 83 | 84 | .exitPupilTable td { 85 | width: 100px; 86 | } 87 | 88 | .optimizedFR { 89 | width: 100%; 90 | } 91 | 92 | .M31compareTable td { 93 | width: 270px; 94 | } 95 | 96 | .maxApertureTable td { 97 | width: 130px; 98 | } 99 | 100 | .noFloat { 101 | clear: both; 102 | } 103 | 104 | .fullSize { 105 | width: 100%; 106 | height: 100%; 107 | } 108 | 109 | /* 110 | http://mydevice.io/devices/ 111 | Samsung S4 css resolution is 360x640 112 | iPad css resolution is 768x1024 113 | 114 | */ 115 | 116 | @media all and (min-width: 0px) { 117 | .titleSection { 118 | clear: both; 119 | width: 100%; 120 | margin-left: auto; 121 | margin-right: auto; 122 | } 123 | .textSection { 124 | clear: both; 125 | width: 100%; 126 | margin-left: auto; 127 | margin-right: auto; 128 | } 129 | .genImage { 130 | width: 100%; 131 | height: 100%; 132 | } 133 | .telescope { 134 | float: left; 135 | height: 250px; 136 | width: 250px; 137 | } 138 | } 139 | 140 | @media all and (min-width: 768px) { 141 | .titleSection { 142 | clear: both; 143 | width: 70%; 144 | margin-left: auto; 145 | margin-right: auto; 146 | } 147 | .textSection { 148 | clear: both; 149 | width: 70%; 150 | margin-left: auto; 151 | margin-right: auto; 152 | } 153 | .genImage { 154 | width: 40%; 155 | height: 40%; 156 | } 157 | .telescope { 158 | float: left; 159 | height: 250px; 160 | width: 250px; 161 | padding: 10px 10px; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /css/apertureCalc.css: -------------------------------------------------------------------------------- 1 | .inputText { 2 | width: 35px; 3 | } 4 | -------------------------------------------------------------------------------- /css/calc.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | color: darkslategray; 26 | font-family: Verdana, Geneva, sans-serif; 27 | margin-left: 10px; 28 | } 29 | 30 | a:link { 31 | text-decoration: none; 32 | } 33 | a:hover { 34 | text-decoration: underline; 35 | } 36 | 37 | .links { 38 | background-color: lightgray; 39 | padding: 5px; 40 | } 41 | 42 | #percent, #aperture 43 | { 44 | clear: both; 45 | text-align: left; 46 | } 47 | 48 | #footer 49 | { 50 | clear: both; 51 | } 52 | 53 | .title { 54 | text-align: center; 55 | } 56 | 57 | .label { 58 | text-align: right; 59 | } 60 | 61 | .verticalAlignTop { 62 | vertical-align: top; 63 | } 64 | 65 | .inputText { 66 | width: 100px; 67 | } 68 | 69 | .coordText { 70 | text-align: right; 71 | width: 100px; 72 | } 73 | 74 | .sagittaButton { 75 | width: 220px; 76 | } 77 | 78 | #diagChart { 79 | margin-top: 20px; 80 | margin-bottom: 20px; 81 | margin-left: 20px; 82 | width: 800px; 83 | height: 300px; 84 | } 85 | 86 | #visualDetectionCalcChart, #airmassChart, #refractionChart { 87 | margin-top: 20px; 88 | margin-left: 20px; 89 | width: 600px; 90 | height: 300px; 91 | } 92 | 93 | #priAxisMountErrorsPlot { 94 | margin-top: 20px; 95 | margin-left: 20px; 96 | width: 700px; 97 | height: 400px; 98 | } 99 | 100 | .pitchLapDiv { 101 | margin: 10px; 102 | float: left; 103 | } 104 | 105 | .pitchLapNotes { 106 | text-align: left; 107 | } 108 | 109 | @media all and (min-width: 0px) { 110 | .genImage { 111 | width: 100%; 112 | height: 100%; 113 | } 114 | } 115 | 116 | @media all and (min-width: 768px) { 117 | .genImage { 118 | width: 50%; 119 | height: 50%; 120 | } 121 | } 122 | 123 | -------------------------------------------------------------------------------- /css/diagonal.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | color: darkslategray; 26 | font-family: Verdana, Geneva, sans-serif; 27 | margin-left: 10px; 28 | } 29 | 30 | a:link { 31 | text-decoration: none; 32 | } 33 | 34 | a:hover { 35 | text-decoration: underline; 36 | } 37 | 38 | .links { 39 | background-color: lightgray; 40 | padding: 5px; 41 | } 42 | 43 | .title { 44 | text-align: center; 45 | } 46 | 47 | .label { 48 | text-align: right; 49 | } 50 | 51 | .verticalAlignTop { 52 | vertical-align: top; 53 | } 54 | 55 | .inputText { 56 | width: 100px; 57 | } 58 | 59 | .inputDiags { 60 | width: 500px; 61 | } 62 | 63 | #diagChart { 64 | margin-top: 20px; 65 | margin-bottom: 20px; 66 | margin-left: 20px; 67 | width: 800px; 68 | height: 300px; 69 | } 70 | 71 | @media all and (min-width: 0px) { 72 | .genImage { 73 | width: 100%; 74 | height: 100%; 75 | } 76 | } 77 | 78 | @media all and (min-width: 768px) { 79 | .genImage { 80 | width: 50%; 81 | height: 50%; 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /css/holomaskCalc.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 50px; 3 | } 4 | 5 | #percent, #aperture 6 | { 7 | clear: both; 8 | text-align: left; 9 | } 10 | 11 | #footer 12 | { 13 | clear: both; 14 | } 15 | 16 | .title { 17 | text-align: center; 18 | } 19 | 20 | .label { 21 | text-align: right; 22 | } 23 | 24 | .verticalAlignTop { 25 | vertical-align: top; 26 | } 27 | 28 | .inputText { 29 | width: 100px; 30 | } 31 | 32 | .coordText { 33 | text-align: right; 34 | width: 100px; 35 | } 36 | 37 | .sagittaButton { 38 | width: 220px; 39 | } 40 | 41 | #diagChart { 42 | margin-top: 20px; 43 | margin-bottom: 20px; 44 | margin-left: 20px; 45 | width: 800px; 46 | height: 300px; 47 | } 48 | 49 | #visualDetectionCalcChart, #airmassChart, #refractionChart { 50 | margin-top: 20px; 51 | margin-left: 20px; 52 | width: 600px; 53 | height: 300px; 54 | } 55 | 56 | #priAxisMountErrorsPlot { 57 | margin-top: 20px; 58 | margin-left: 20px; 59 | width: 700px; 60 | height: 400px; 61 | } 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /css/index.css: -------------------------------------------------------------------------------- 1 | 2 | /* http://www.w3schools.com/cssref/css_colornames.asp */ 3 | 4 | html { 5 | height: 100%; 6 | color: darkslategray; 7 | font-family: Verdana, Geneva, sans-serif; 8 | margin-left: 10px; 9 | } 10 | 11 | a:link { 12 | text-decoration: none; 13 | } 14 | a:hover { 15 | text-decoration: underline; 16 | } 17 | 18 | * { 19 | -moz-box-sizing: border-box; 20 | -webkit-box-sizing: border-box; 21 | box-sizing: border-box; 22 | } 23 | 24 | .title { 25 | text-align: center; 26 | } 27 | 28 | .floatImages { 29 | float: left; 30 | } 31 | 32 | .stopFloat { 33 | clear: both; 34 | } 35 | 36 | img { 37 | margin: 10px; 38 | width: 400px; 39 | } 40 | 41 | /* 42 | http://mydevice.io/devices/ 43 | Samsung S4 css resolution is 360x640 44 | iPad css resolution is 768x1024 45 | 46 | */ 47 | 48 | @media all and (min-width: 0px) { 49 | #accordion { 50 | width: 100%; 51 | margin: 20px auto; 52 | } 53 | .accordianTitle { 54 | background-color: darkgray; 55 | width: 60%; 56 | clear: both; 57 | padding: 0px 10px; 58 | } 59 | .notAccordionContent { 60 | clear: both; 61 | width: 100%; 62 | margin-left: auto; 63 | margin-right: auto; 64 | } 65 | } 66 | 67 | @media all and (min-width: 768px) { 68 | #accordion { 69 | width: 70%; 70 | margin: 40px auto; 71 | } 72 | .accordianTitle { 73 | background-color: darkgray; 74 | width: 40%; 75 | clear: both; 76 | padding: 0px 10px; 77 | } 78 | .notAccordionContent { 79 | clear: both; 80 | width: 70%; 81 | margin-left: auto; 82 | margin-right: auto; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /css/objectLib.css: -------------------------------------------------------------------------------- 1 | #header 2 | { 3 | text-align: center; 4 | } 5 | 6 | #footer 7 | { 8 | clear: both; 9 | } 10 | 11 | #descriptionDiv 12 | { 13 | clear: both; 14 | text-align: left; 15 | } 16 | 17 | #translatedDescription 18 | { 19 | width: 500px; 20 | } 21 | 22 | #btnFile 23 | { 24 | width: 800px; 25 | height: 50px; 26 | } 27 | 28 | #selectedFileDropDiv 29 | { 30 | border: 2px dashed #999; 31 | -moz-border-radius: 10px; 32 | -webkit-border-radius: 10px; 33 | border-radius: 10px; 34 | padding: 30px; 35 | text-align: center; 36 | color: #000; 37 | background-color: #ccc; 38 | width: 400px; 39 | } 40 | 41 | #btnAbortRead 42 | { 43 | background-color: #f00; 44 | } 45 | 46 | .thumbStyle 47 | { 48 | height: 75px; 49 | border: 1px solid #000; 50 | margin: 10px 5px 0 0; 51 | } 52 | 53 | #descriptionDiv 54 | { 55 | background-color: #ccc; 56 | } 57 | 58 | #csvResult 59 | { 60 | width: 100%; 61 | background-color: #ccc; 62 | } 63 | -------------------------------------------------------------------------------- /css/presentations.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: white; 3 | background: #202020; 4 | } 5 | -------------------------------------------------------------------------------- /css/rft.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | color: darkslategray; 26 | font-family: Verdana, Geneva, sans-serif; 27 | margin-left: 10px; 28 | } 29 | 30 | a:link { 31 | text-decoration: none; 32 | } 33 | a:hover { 34 | text-decoration: underline; 35 | } 36 | 37 | .links { 38 | background-color: lightgray; 39 | padding: 5px; 40 | } 41 | 42 | .titleFlexArea { 43 | display: flex; 44 | align-items: center; 45 | } 46 | 47 | .titleText { 48 | text-align: center; 49 | } 50 | 51 | .titleImg { 52 | padding: 1%; 53 | width: 33%; 54 | height: 33%; 55 | } 56 | 57 | table, td, ttr { 58 | border: 1px solid black; 59 | cellpadding: 1px; 60 | cellspacing: 2px; 61 | border-collapse: collapse; 62 | } 63 | 64 | table tr:first-child { 65 | font-weight: bold; 66 | } 67 | 68 | .boldRed { 69 | vertical-align: top; 70 | font-weight: bold; 71 | color: red; 72 | } 73 | 74 | .tableCellImageText { 75 | text-align: center; 76 | vertical-align: top; 77 | white-space: nowrap; 78 | } 79 | 80 | .starCountTable td { 81 | width: 130px; 82 | } 83 | 84 | .exitPupilTable td { 85 | width: 100px; 86 | } 87 | 88 | .optimizedFR { 89 | width: 100%; 90 | } 91 | 92 | .M31compareTable td { 93 | width: 270px; 94 | } 95 | 96 | .maxApertureTable td { 97 | width: 130px; 98 | } 99 | 100 | /* 101 | http://mydevice.io/devices/ 102 | Samsung S4 css resolution is 360x640 103 | iPad css resolution is 768x1024 104 | 105 | */ 106 | 107 | @media all and (min-width: 0px) { 108 | .titleSection { 109 | clear: both; 110 | width: 100%; 111 | margin-left: auto; 112 | margin-right: auto; 113 | } 114 | .textSection { 115 | clear: both; 116 | width: 100%; 117 | margin-left: auto; 118 | margin-right: auto; 119 | } 120 | .genImage { 121 | width: 100%; 122 | height: 100%; 123 | } 124 | } 125 | 126 | @media all and (min-width: 768px) { 127 | .titleSection { 128 | clear: both; 129 | width: 70%; 130 | margin-left: auto; 131 | margin-right: auto; 132 | } 133 | .textSection { 134 | clear: both; 135 | width: 70%; 136 | margin-left: auto; 137 | margin-right: auto; 138 | } 139 | .genImage { 140 | width: 50%; 141 | height: 50%; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /css/scopeToSky.css: -------------------------------------------------------------------------------- 1 | #title, #computeScope, #computeEncoders { 2 | text-align: center; 3 | } 4 | #btnComputeTelescope, #btnComputeEquatCoords, #btnInitMatrix, #btnBestZ123, #btnBestZ13, #btnLoadTaki { 5 | width: 200px; 6 | } 7 | #btnUpdateEncoder1, #btnUpdateEncoder2, #btnUpdateEncoder3, #btnResetEncoder1, #btnResetEncoder2, #btnResetEncoder3 { 8 | width: 80px; 9 | } 10 | #coordinatesHeader, #setupHeader, #telescopeHeader, #encodersHeader, #matrixConversionHeader, #notesHeader { 11 | cursor: pointer; 12 | background: lightgray; 13 | clear: both; 14 | } 15 | #coordinatesDetailInput, #setupDetailInput, #telescopeDetailInput, #encodersDetailInput, #matrixConversionDetailInput { 16 | float: left; 17 | margin-left: 2em; 18 | } 19 | #coordinatesDetailOutput, #setupDetailOutput, #telescopeDetailOutput, #matrixConversionDetailOutput { 20 | margin-left: 30em; 21 | } 22 | #encodersDetailOutput { 23 | margin-left: 20em; 24 | } 25 | #coordinatesDetail, #setupDetail, #telescopeDetail, #notesDetail { 26 | 27 | } 28 | #canFlipMeridian, #flippedState, #flipped { 29 | background: lightgray; 30 | } 31 | td { 32 | width: 160px; 33 | } 34 | #alignmentCell { 35 | width: 190px; 36 | } 37 | #notes1 { 38 | width: 300px; 39 | } 40 | input[type="text"] { 41 | width: 75px; 42 | background: lightgray; 43 | } 44 | input[name="dateTime"] { 45 | width: 160px; 46 | } 47 | input[name="one"], input[name="two"], input[name="three"], input[name="analysisPosition1"], input[name="analysisPosition2"], input[name="analysisPosition3"] { 48 | width: 400px; 49 | } 50 | -------------------------------------------------------------------------------- /css/standardPage.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: Verdana, Geneva, sans-serif; 3 | margin-left: auto; 4 | margin-right: auto; 5 | } 6 | 7 | .imageTextWrap { 8 | float: right; 9 | } 10 | 11 | .untouched { 12 | width: auto; 13 | height: auto; 14 | } 15 | 16 | .flexArea { 17 | display: flex; 18 | align-items: center; 19 | } 20 | 21 | .tableHeaderRow { 22 | font-weight: bold; 23 | } 24 | 25 | .tableColumnsFirstColor { 26 | background-color: rgb(204, 255, 255); 27 | } 28 | 29 | .tableColumnsSecondColor { 30 | background-color: rgb(204, 204, 204); 31 | } 32 | 33 | .tableColumnsThirdColor { 34 | background-color: rgb(255, 255, 204); 35 | } 36 | 37 | .tableColumnsFourthColor { 38 | background-color: rgb(153, 255, 153); 39 | } 40 | 41 | @media all and (min-width: 0px) { 42 | html { 43 | width: 95%; 44 | } 45 | img { 46 | margin: 10px; 47 | width: 60%; 48 | } 49 | .bigImage { 50 | width: 80%; 51 | } 52 | .smallImage { 53 | width: 35%; 54 | } 55 | .unscaledImage { 56 | width: 100%; 57 | } 58 | } 59 | @media all and (min-width: 768px) { 60 | html { 61 | width: 80%; 62 | } 63 | img { 64 | margin: 10px; 65 | width: 40%; 66 | } 67 | .bigImage { 68 | width: 60%; 69 | } 70 | .smallImage { 71 | width: 25%; 72 | } 73 | .unscaledImage { 74 | width: 100%; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /css/telescopeCriteriaCalc.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | display: -webkit-box; 3 | display: -moz-box; 4 | display: -ms-flexbox; 5 | display: -webkit-flex; 6 | display: flex; 7 | -webkit-flex-flow: row wrap; 8 | flex-flow: row wrap; 9 | font-weight: bold; 10 | } 11 | 12 | .wrapper > * { 13 | padding: 10px; 14 | flex: 1 100%; 15 | } 16 | 17 | * { 18 | -moz-box-sizing: border-box; 19 | -webkit-box-sizing: border-box; 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | height: 100%; 25 | margin-left: 10px; 26 | } 27 | 28 | a:link { 29 | text-decoration: none; 30 | } 31 | 32 | a:hover { 33 | text-decoration: underline; 34 | } 35 | 36 | .links { 37 | background-color: lightgray; 38 | padding: 5px; 39 | } 40 | 41 | #fundamentalParms td { 42 | vertical-align: top; 43 | padding-left: 25px; 44 | } 45 | 46 | .magnificationTable { 47 | border: 1px solid black; 48 | border-collapse: collapse; 49 | } 50 | 51 | .magnificationTable td { 52 | border: 1px solid black; 53 | } 54 | 55 | .tableHeaderRow { 56 | font-weight: bold; 57 | } 58 | 59 | .tableColumnsFirstColor { 60 | background-color: rgb(204, 255, 255); 61 | } 62 | 63 | .tableColumnsSecondColor { 64 | background-color: rgb(204, 204, 204); 65 | } 66 | 67 | .tableColumnsThirdColor { 68 | background-color: rgb(255, 255, 204); 69 | } 70 | 71 | .tableColumnsFourthColor { 72 | background-color: rgb(153, 255, 153); 73 | } 74 | 75 | .calcSectionHeader { 76 | font-weight: bold; 77 | } 78 | 79 | /* match with JavaScript generated css */ 80 | .columnHeaders { 81 | font-weight: bold; 82 | padding-right: 10px; 83 | } 84 | 85 | .optimizerTitleBar { 86 | background-color: #aaddff; 87 | padding: 5px; 88 | } 89 | 90 | div[id^='optimizerDetail'] { 91 | display: none; 92 | } 93 | 94 | .discussionHeader { 95 | margin-top: 10px; 96 | margin-bottom: 10px; 97 | padding-top: 5px; 98 | padding-bottom: 5px; 99 | font-style: italic; 100 | background: lightgray; 101 | } 102 | 103 | .discussionDetail { 104 | display: none; 105 | } 106 | 107 | .inputText { 108 | width: 70px; 109 | } 110 | 111 | .inputDiags { 112 | width: 500px; 113 | } 114 | 115 | #diagChart, #summaryDiagChart { 116 | margin-top: 20px; 117 | margin-bottom: 20px; 118 | margin-left: 20px; 119 | width: 800px; 120 | height: 300px; 121 | } 122 | 123 | #comaCorrectorSelect, #eyepieceSelect, #focuserSelect { 124 | } 125 | 126 | input[type='button'] { 127 | text-align: left; 128 | } 129 | 130 | .indent { 131 | padding-left: 56px; 132 | } 133 | 134 | .equation { 135 | font-style: italic; 136 | } 137 | 138 | .title { 139 | text-align: center; 140 | } 141 | 142 | .label { 143 | text-align: right; 144 | vertical-align: top; 145 | width: 300px; 146 | } 147 | 148 | .titleFlexArea { 149 | display: flex; 150 | align-items: center; 151 | } 152 | 153 | @media all and (min-width: 0px) { 154 | .titleSection { 155 | clear: both; 156 | margin-left: auto; 157 | margin-right: auto; 158 | } 159 | .titleImg { 160 | float: left; 161 | padding: 1%; 162 | width: 60%; 163 | height: 60%; 164 | } 165 | .genImage { 166 | width: 100%; 167 | height: 100%; 168 | } 169 | } 170 | @media all and (min-width: 768px) { 171 | .titleSection { 172 | clear: both; 173 | margin-left: auto; 174 | margin-right: auto; 175 | } 176 | .titleImg { 177 | float: left; 178 | padding: 1%; 179 | width: 30%; 180 | height: 30%; 181 | } 182 | .genImage { 183 | width: 50%; 184 | height: 50%; 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /css/tm.css: -------------------------------------------------------------------------------- 1 | * { 2 | -moz-box-sizing: border-box; 3 | -webkit-box-sizing: border-box; 4 | box-sizing: border-box; 5 | } 6 | 7 | html { 8 | font-family: Verdana, Geneva, sans-serif; 9 | margin-left: auto; 10 | margin-right: auto; 11 | } 12 | 13 | a:hover { 14 | text-decoration: underline; 15 | font-weight:bold; 16 | } 17 | 18 | .title { 19 | text-align: center; 20 | } 21 | 22 | .gridContainer { 23 | display: grid; 24 | grid-template-columns: repeat(auto-fill, minmax(250px, 250px)); 25 | } 26 | 27 | .gridItem { 28 | margin: 1px; 29 | padding: 1px; 30 | border: 2px solid white; 31 | background: #e3e3e3; 32 | } 33 | 34 | .bigImage { 35 | width: 90%; 36 | height: 90%; 37 | } 38 | 39 | .mediumImage { 40 | width: 45%; 41 | height: 45%; 42 | } 43 | 44 | .smallImage { 45 | width: 23%; 46 | height: 23%; 47 | } 48 | 49 | .threeImagesWidth { 50 | width: 33%; 51 | height: 33%; 52 | } 53 | 54 | .textSections { 55 | clear: both; 56 | margin-left: auto; 57 | margin-right: auto; 58 | } 59 | 60 | .articleColumn { 61 | width: 40%; 62 | float: left; 63 | padding: 0px 5px; 64 | } 65 | 66 | .telescope { 67 | float: left; 68 | height: 200px; 69 | width: 300px; 70 | padding: 10px 10px; 71 | } 72 | -------------------------------------------------------------------------------- /diagonal.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Redirect to NewtDesigner Diagonal Designer 10 | 11 | 12 | If you are not redirected automatically then follow this link. 13 | 14 | -------------------------------------------------------------------------------- /diopterToFocalLengthConverter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Diopter to Focal Length Converter 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 |
17 |

Telescope

18 | Diopter 19 | 20 |
21 | Focal length 22 | inches millimeters 23 | 24 |
25 | 26 |
27 |

Eyepiece

28 | Diopter 29 | 30 |
31 | Focal length 32 | inches millimeters 33 | 34 |
35 | 36 |
37 |

Result

38 |
39 |
40 |
41 | 42 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /encoderCalc.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Encoder Calculator 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 20 | 21 | 22 | 28 | 29 | 30 | 33 | 36 | 37 | 38 | 41 | 44 | 45 | 46 | 49 | 52 | 53 | 54 | 57 | 60 | 61 | 62 | 68 | 69 | 70 | 73 | 76 | 77 | 78 | 81 | 84 | 85 | 86 | 89 | 92 | 93 | 94 | 97 | 100 | 101 | 102 | 107 | 112 | 113 | 114 | 120 | 121 | 122 | 125 | 128 | 129 | 130 | 133 | 136 | 137 | 138 | 141 | 144 | 145 | 146 | 149 | 152 | 153 | 154 |
16 | 17 | Encoder Calculator
18 |
19 |
23 | 24 |
25 | Encoder Configuration
26 |
27 |
31 | Name is 32 | 34 | 35 |
39 | Minimum possible count = 40 | 42 | 43 |
47 | Maximum possible count = 48 | 50 | 51 |
55 | Gear reduction, if any = 56 | 58 | 59 |
63 | 64 |
65 | Encoder's State
66 |
67 |
71 | Encoder's current count = 72 | 74 | 75 |
79 | Encoder's last count = 80 | 82 | 83 |
87 | Encoder rotations or carries = 88 | 90 | 91 |
95 | Angle offset (deg) = 96 | 98 | 99 |
103 |
104 | 105 |
106 |
108 |
109 | 110 |
111 |
115 | 116 |
117 | Results
118 |
119 |
123 | Direction is 124 | 126 | 127 |
131 | Encoder angle (deg) = 132 | 134 | 135 |
139 | Geared angle, if applicable (deg) = 140 | 142 | 143 |
147 | Geared angle with offset (deg) = 148 | 150 | 151 |
155 |
156 |
157 | Notes:
158 |
159 | This calculator demonstrates the computer modeling of an encoder.
160 |
161 | Gear ratio can be entered as a decimal like 2.5 or as a ratio like 5:2 162 |
163 |
164 | Mel Bartels 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /equatTrackingRatesCalc.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/equatTrackingRatesCalc.html -------------------------------------------------------------------------------- /initializationErrorPlot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Initialization Error Plot 5 | 6 | 7 | 8 |
9 |

Initialization Error Plot 10 |

Plot of pointing errors across the sky for a given two star initialization of an altazimuth telescope

11 |
12 |
13 | 14 | This browser does not support the canvas element. Please use a more recent browser. 15 | 16 | 17 | This browser does not support the canvas element. Please use a more recent browser. 18 | 19 | 20 | This browser does not support the canvas element. Please use a more recent browser. 21 | 22 | 23 | This browser does not support the canvas element. Please use a more recent browser. 24 | 25 |
26 |
27 |
28 | Notes:
29 | Pointing error all sky plots for altazimuth telescope initializations using stars separated by 6, 22, 38 and 81 degrees.
30 | Green = no additional error beyond the initialization error. Red = twice the initilization error.
31 | North is pointing up, south is pointing down.
32 | Stars for plot 1: Deneb and Vega; for plot 2: Deneb and Sadr (Gamma Cygni); for plot 3: Deneb and Altair; for plot 4: Deneb and Fomalhaut.
33 |
34 | Mel Bartels 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/DobFrictionCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2013-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.DobFrictionCalc = {}; 6 | 7 | MLB.DobFrictionCalc.calc = function () { 8 | var roundToDecimal = MLB.sharedLib.roundToDecimal, 9 | decimals = 1, 10 | azimuthFrictionCoefficient = +$('input[name=azimuthFrictionCoefficient]').val(), 11 | altitudeFrictionCoefficient = +$('input[name=altitudeFrictionCoefficient]').val(), 12 | momentArm = +$('input[name=momentArm]').val(), 13 | azWeight = +$('input[name=azWeight]').val(), 14 | altWeight = +$('input[name=altWeight]').val(), 15 | azBearingRadius = +$('input[name=azBearingRadius]').val(), 16 | altBearingRadius = +$('input[name=altBearingRadius]').val(), 17 | altBearingAngleDegFromVertical = +$('input[name=altBearingAngleDegFromVertical]').val(), 18 | altitudeAngleDegFromHorizontal = +$('input[name=altitudeAngleDegFromHorizontal]').val(), 19 | friction = MLB.calcLib.calcDobFriction(azimuthFrictionCoefficient, altitudeFrictionCoefficient, momentArm, azWeight, altWeight, azBearingRadius, altBearingRadius, altBearingAngleDegFromVertical, altitudeAngleDegFromHorizontal); 20 | 21 | $('td[id=azFriction]').html(roundToDecimal(friction.az, decimals)); 22 | $('td[id=altFriction]').html(roundToDecimal(friction.alt, decimals)); 23 | }; 24 | 25 | $(window).ready(function () { 26 | var btnCalc = $('input[id=btnCalc]'), 27 | calc = MLB.DobFrictionCalc.calc; 28 | 29 | // event hookups/subscribes 30 | btnCalc.click(function () { 31 | calc(); 32 | }); 33 | 34 | calc(); 35 | }); 36 | 37 | // end of file -------------------------------------------------------------------------------- /lib/NewtDesignerTestWithDiagToFLDistance7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/NewtDesignerTestWithDiagToFLDistance7.jpg -------------------------------------------------------------------------------- /lib/P2 intrusion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/P2 intrusion.jpg -------------------------------------------------------------------------------- /lib/PriAxisMountErrorsCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2011-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.priAxisMountErrorsCalc = {}; 6 | 7 | MLB.priAxisMountErrorsCalc.setLabel = function (initType) { 8 | var InitType = MLB.coordLib.InitType; 9 | 10 | return initType === InitType.altazimuth || initType === InitType.star ? 'Elevation (degrees)' : 'Declination (degrees)'; 11 | }; 12 | 13 | MLB.priAxisMountErrorsCalc.setNumberTicks = function (initType) { 14 | var InitType = MLB.coordLib.InitType; 15 | 16 | return initType === InitType.altazimuth || initType === InitType.star ? 10 : 19; 17 | }; 18 | 19 | MLB.priAxisMountErrorsCalc.setYmax = function (initType, latDeg) { 20 | var InitType = MLB.coordLib.InitType; 21 | 22 | return initType === InitType.altazimuth || initType === InitType.star ? 90 : latDeg >= 0 ? 90 : -90; 23 | }; 24 | 25 | MLB.priAxisMountErrorsCalc.setYmin = function setYmin(initType, latDeg) { 26 | var InitType = MLB.coordLib.InitType; 27 | 28 | return initType === InitType.altazimuth || initType === InitType.star ? 0 : latDeg >= 0 ? -90 : 90; 29 | }; 30 | 31 | MLB.priAxisMountErrorsCalc.plot = function () { 32 | var z1Deg, 33 | z2Deg, 34 | latDeg, 35 | priAxisDeg, 36 | measurements, 37 | measurementType, 38 | mountingType, 39 | initType, 40 | init, 41 | series, 42 | seriesLabels, 43 | seriesLabel = MLB.sharedLib.seriesLabel, 44 | setLabel = MLB.priAxisMountErrorsCalc.setLabel, 45 | setNumberTicks = MLB.priAxisMountErrorsCalc.setNumberTicks, 46 | setYmax = MLB.priAxisMountErrorsCalc.setYmax, 47 | setYmin = MLB.priAxisMountErrorsCalc.setYmin, 48 | InitZ12Calc = MLB.calcLib.InitZ12Calc, 49 | getZ12ErrorValues = MLB.calcLib.getZ12ErrorValues, 50 | buildZ12AzErrors = MLB.calcLib.buildZ12AzErrors, 51 | MeasurementType = MLB.calcLib.MeasurementType, 52 | InitType = MLB.coordLib.InitType; 53 | 54 | // set vars from user input using jquery 55 | z1Deg = +$('input[name=z1Deg]').val(); 56 | z2Deg = +$('input[name=z2Deg]').val(); 57 | latDeg = +$('input[name=latDeg]').val(); 58 | priAxisDeg = +$('input[name=priAxisDeg]').val(); 59 | 60 | mountingType = $('input[name=mountingType]'); 61 | if (mountingType[0].checked) { 62 | initType = InitType.altazimuth; 63 | } else if (mountingType[1].checked) { 64 | initType = InitType.equatorial; 65 | } 66 | 67 | measurements = $('input[name=measurements]'); 68 | if (measurements[0].checked) { 69 | measurementType = MeasurementType.real; 70 | } else if (measurements[1].checked) { 71 | measurementType = MeasurementType.apparent; 72 | } 73 | 74 | getZ12ErrorValues(z1Deg, z2Deg, latDeg, priAxisDeg, initType); 75 | init = InitZ12Calc.init; 76 | 77 | series = []; 78 | series.push(buildZ12AzErrors(init.positions, init.z1Errors, measurementType, initType)); 79 | series.push(buildZ12AzErrors(init.positions, init.z2Errors, measurementType, initType)); 80 | 81 | // build the series labels 82 | seriesLabels = [seriesLabel('Bend only'), seriesLabel('Offset only')]; 83 | 84 | // plot it, include replot 85 | $.jqplot.config.enablePlugins = true; 86 | $.jqplot('priAxisMountErrorsPlot', series, { 87 | title: 'Comparison of primary axis errors', 88 | legend: { 89 | show: true, 90 | placement: 'outsideGrid' 91 | }, 92 | sortData: false, // otherwise line chart zigzags between + and - values 93 | axes: { 94 | xaxis: { 95 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 96 | label: 'Primary axis error (arc-minutes)', 97 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 98 | numberTicks: 13, 99 | max: 60, 100 | min: -60 101 | }, 102 | yaxis: { 103 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 104 | label: setLabel(initType), 105 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 106 | numberTicks: setNumberTicks(initType), 107 | max: setYmax(initType, latDeg), 108 | min: setYmin(initType, latDeg) 109 | } 110 | }, 111 | series: seriesLabels 112 | }).replot(); 113 | }; 114 | 115 | $(window).ready(function () { 116 | var plot = MLB.priAxisMountErrorsCalc.plot, 117 | btnPlot = $('#btnPlot')[0]; 118 | 119 | // event hookups/subscribes 120 | btnPlot.onclick = function () { 121 | plot(); 122 | }; 123 | 124 | plot(); 125 | }); 126 | 127 | // end of file -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/SAC_DeepSky_ver81.zip -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81/Readme.txt: -------------------------------------------------------------------------------- 1 | Information on the Saguaro Astronomy Club Database version 8.1 2 | 3 | dated March 22, 2010 4 | 5 | stevecoe at cloudynights dot com 6 | 7 | 8 | This club project started many years ago, when we wanted a listing of the brightest deep sky objects on our computers with 64KB of memory on floppy disks. Thinking it would be an easy task, here we are more than 25 years later, still maintaining and updating a much larger listing of information about what to observe at the telescope. How far we have come from the list of the brightest 300 objects contained within Burnham's Celestial Handbook, all typed in on my Apple II+. Time flies. As always, if you find an error, please let us know. 9 | 10 | This ZIP file contains seven files: 11 | 12 | This is the README.TXT file. 13 | 14 | SACDOC.TXT is the documentation for the SAC database, there is much information here on the data fields and what the data means. Please spend some time reading this info before trying to utilize the database, it will help you to use this data effectively. 15 | 16 | REVHIST.TXT is the revision history, a short file about the various releases of the SAC database. 17 | 18 | POTPOURRI.TXT is a set of information about a wide variety of astronomical phenomena from white dwarf stars, red stars, meteor showers, common names and more. These are useful files, but they did not fit the information style of the main database. 19 | 20 | SAC_DeepSky_81.XLS is version 8.1 of the SAC data as an Excel spreadsheet. There are lots of possible ways to search and sort the data in this popular spreadsheet. It contains information on over 10,000 deepsky objects. 21 | 22 | SAC_DeepSky_81_QCQ.TXT is version 8.1 of the Saguaro Astronomy Club database in quote, comma, quote delimited form. This is also called CSV for comma separated variable. Any modern database manager or spreadsheet will import the data in this format. 23 | 24 | SAC_DeepSky_81_FENCE.TXT is version 8.1 of the SAC data as a text file that has vertical bars between the fields. You can search and sort the data with a text editor. 25 | 26 | SAC wishes to thank all the people who have spent many hours searching for, and correcting, errors in the NGC. Their work is reflected in this release of the SAC database. 27 | 28 | A small fraction of the number of objects still persist as NONEXISTENT, compared to the beginnings of this database. Brian Skiff of Lowell Observatory has been a constant help with a variety of information about deep sky objects. Stephen Michael Schimpf spent much time with the NOTES field, finding errors and trying to make the data more consistent. 29 | 30 | Besides myself, I am going to list the dedicated group of people who have helped keep this an up to date and useful database: Bill Anderson, A.J. Crayon, David Fredericksen, Jack Jones, Jay LeBlanc, Matt Lutinnen, Peter Argenziano, Paul Lind and Paul Dickson. 31 | 32 | Thank you to the skill, knowledge and expertise of all who helped the Saguaro Astronomy Club create this listing of what to observe in the deep sky. 33 | 34 | See the NOTE at the bottom of the Revision History, we will keep an updated errata file at the SAC web site from now on and allow users to update their version 8.1 files as needed. 35 | 36 | Steve Coe 37 | Database manager 38 | Saguaro Astronomy Club 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81/SAC_DeepSky_ver81_Excel.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/SAC_DeepSky_ver81/SAC_DeepSky_ver81_Excel.xls -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81/The NGC on the Net.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/SAC_DeepSky_ver81/The NGC on the Net.doc -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81/The NGC on the Net.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/SAC_DeepSky_ver81/The NGC on the Net.txt -------------------------------------------------------------------------------- /lib/SAC_DeepSky_ver81/testcvs.txt: -------------------------------------------------------------------------------- 1 | "OBJECT ","OTHER ","TYPE ","CON","RA ","DEC ","MAG ","SUBR","U2K","TI","SIZE_MAX","SIZE_MIN","PA ","CLASS ","NSTS","BRSTR","BCHM","NGC DESCR ","NOTES " 2 | "NGC 7831 ","IC 1530 ","GALXY","AND","00 07.3","+32 37","12.8","12.3","89 ","4 "," 1.5 m"," 0.3 m","38 ","Sb "," "," "," ","eF;vS;mE;vF*v nr "," " 3 | "NGC 5 ","UGC 62 ","GALXY","AND","00 07.8","+35 22","13.3","13.2","89 ","4 "," 1.2 m"," 0.7 m","115","Elliptical "," "," "," ","vF;vS;N=*13;14 ","compact " 4 | -------------------------------------------------------------------------------- /lib/SQMandNELMconverterCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2018 2 | 3 | 'use strict'; 4 | 5 | MLB.SQMandNELMconverterCalc = {}; 6 | 7 | MLB.SQMandNELMconverterCalc.convertSQMtoNELM = function () { 8 | var decimals = 1, 9 | SQM = +$('input[name=SQMin]').val(), 10 | roundToDecimal = MLB.sharedLib.roundToDecimal, 11 | SQMtoNELMconverter = MLB.calcLib.SQMtoNELMconverter; 12 | 13 | $('input[name=NELMout]').val(roundToDecimal(SQMtoNELMconverter(SQM), decimals)); 14 | }; 15 | 16 | MLB.SQMandNELMconverterCalc.convertNELMtoSQM = function () { 17 | var decimals = 1, 18 | NELM = +$('input[name=NELMin]').val(), 19 | roundToDecimal = MLB.sharedLib.roundToDecimal, 20 | NELMtoSQMconverter = MLB.calcLib.NELMtoSQMconverter; 21 | 22 | $('input[name=SQMout]').val(roundToDecimal(NELMtoSQMconverter(NELM), decimals)); 23 | }; 24 | 25 | $(window).ready(function () { 26 | var btnConvertSQMtoNELM = $('#btnConvertSQMtoNELM')[0], 27 | convertSQMtoNELM = MLB.SQMandNELMconverterCalc.convertSQMtoNELM, 28 | btnConvertNELMtoSQM = $('#btnConvertNELMtoSQM')[0], 29 | convertNELMtoSQM = MLB.SQMandNELMconverterCalc.convertNELMtoSQM; 30 | 31 | // event hookups/subscribes 32 | btnConvertSQMtoNELM.onclick = function () { 33 | convertSQMtoNELM(); 34 | }; 35 | btnConvertNELMtoSQM.onclick = function () { 36 | convertNELMtoSQM(); 37 | }; 38 | 39 | convertSQMtoNELM(); 40 | convertNELMtoSQM(); 41 | }); 42 | 43 | // end of file -------------------------------------------------------------------------------- /lib/Strehl RMS PV calc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2016 2 | 3 | 'use strict'; 4 | 5 | MLB.StrehlRMSPeakValleyCalc = {}; 6 | 7 | MLB.StrehlRMSPeakValleyCalc.common = { 8 | btnCalcFromStrehl: function () { 9 | return $('[id=btnCalcFromStrehl]'); 10 | }, 11 | btnCalcFromRMS: function () { 12 | return $('[id=btnCalcFromRMS]'); 13 | }, 14 | btnCalcFromPeakValley: function () { 15 | return $('[id=btnCalcFromPeakValley]'); 16 | }, 17 | Strehl: function () { 18 | return $('[name=Strehl]'); 19 | }, 20 | RMS: function () { 21 | return $('[name=RMS]'); 22 | }, 23 | PeakValley: function () { 24 | return $('[name=PeakValley]'); 25 | }, 26 | StrehlVal: function () { 27 | return +this.Strehl().val(); 28 | }, 29 | RMSVal: function () { 30 | return +this.RMS().val(); 31 | }, 32 | PeakValleyVal: function () { 33 | return +this.PeakValley().val(); 34 | } 35 | }; 36 | 37 | MLB.StrehlRMSPeakValleyCalc.calcFromStrehl = function () { 38 | var common = MLB.StrehlRMSPeakValleyCalc.common, 39 | roundToDecimal = MLB.sharedLib.roundToDecimal, 40 | calcRMSFromStrehl = MLB.calcLib.calcRMSFromStrehl, 41 | calcPVFromRMS = MLB.calcLib.calcPVFromRMS, 42 | Strehl, 43 | RMS, 44 | PeakValley; 45 | 46 | Strehl = common.StrehlVal(); 47 | RMS = calcRMSFromStrehl(Strehl); 48 | PeakValley = calcPVFromRMS(RMS); 49 | common.RMS().val(roundToDecimal(RMS, 3)); 50 | common.PeakValley().val(roundToDecimal(PeakValley, 3)); 51 | }; 52 | 53 | MLB.StrehlRMSPeakValleyCalc.calcFromRMS = function () { 54 | var common = MLB.StrehlRMSPeakValleyCalc.common, 55 | roundToDecimal = MLB.sharedLib.roundToDecimal, 56 | calcStrehlFromRMS = MLB.calcLib.calcStrehlFromRMS, 57 | calcPVFromRMS = MLB.calcLib.calcPVFromRMS, 58 | Strehl, 59 | RMS, 60 | PeakValley; 61 | 62 | RMS = common.RMSVal(); 63 | Strehl = calcStrehlFromRMS(RMS); 64 | PeakValley = calcPVFromRMS(RMS); 65 | common.Strehl().val(roundToDecimal(Strehl, 3)); 66 | common.PeakValley().val(roundToDecimal(PeakValley, 3)); 67 | }; 68 | 69 | MLB.StrehlRMSPeakValleyCalc.calcFromPeakValley = function () { 70 | var common = MLB.StrehlRMSPeakValleyCalc.common, 71 | roundToDecimal = MLB.sharedLib.roundToDecimal, 72 | calcRMSFromPV = MLB.calcLib.calcRMSFromPV, 73 | calcStrehlFromRMS = MLB.calcLib.calcStrehlFromRMS, 74 | Strehl, 75 | RMS, 76 | PeakValley; 77 | 78 | PeakValley = common.PeakValleyVal(); 79 | RMS = calcRMSFromPV(PeakValley); 80 | Strehl = calcStrehlFromRMS(RMS); 81 | common.RMS().val(roundToDecimal(RMS, 3)); 82 | common.Strehl().val(roundToDecimal(Strehl, 3)); 83 | }; 84 | 85 | $(window).ready(function () { 86 | var common = MLB.StrehlRMSPeakValleyCalc.common, 87 | calcFromStrehl = MLB.StrehlRMSPeakValleyCalc.calcFromStrehl, 88 | calcFromRMS = MLB.StrehlRMSPeakValleyCalc.calcFromRMS, 89 | calcFromPeakValley = MLB.StrehlRMSPeakValleyCalc.calcFromPeakValley; 90 | 91 | // event hookups/subscribes 92 | common.btnCalcFromStrehl().click(calcFromStrehl); 93 | common.btnCalcFromRMS().click(calcFromRMS); 94 | common.btnCalcFromPeakValley().click(calcFromPeakValley); 95 | 96 | calcFromStrehl(); 97 | }); 98 | 99 | // end of file -------------------------------------------------------------------------------- /lib/airmassCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2011-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.airmassCalc = {}; 6 | 7 | MLB.airmassCalc.plot = function () { 8 | var elevation, airmassPoint, series, seriesLabels, seriesLabel = MLB.sharedLib.seriesLabel, calcAirMass = MLB.coordLib.calcAirMass; 9 | 10 | series = []; 11 | airmassPoint = []; 12 | for (elevation = 0; elevation <= 90; elevation++) { 13 | airmassPoint.push([calcAirMass(elevation), elevation]); 14 | } 15 | series.push(airmassPoint); 16 | // build the series labels 17 | seriesLabels = [seriesLabel('airmass')]; 18 | 19 | // plot it, include replot 20 | $.jqplot.config.enablePlugins = true; 21 | $.jqplot('airmassChart', series, { 22 | title: 'Plot of airmass for elevation', 23 | legend: { 24 | show: true, 25 | placement: 'outsideGrid' 26 | }, 27 | axes: { 28 | xaxis: { 29 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 30 | label: 'airmass', 31 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 32 | numberTicks: 9, 33 | max: 40, 34 | min: 0 35 | }, 36 | yaxis: { 37 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 38 | label: 'elevation (degrees)', 39 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 40 | numberTicks: 10, 41 | max: 90, 42 | min: 0 43 | } 44 | }, 45 | series: seriesLabels 46 | }).replot(); 47 | }; 48 | 49 | $(window).ready(function () { 50 | MLB.airmassCalc.plot(); 51 | }); 52 | 53 | // end of file -------------------------------------------------------------------------------- /lib/altazCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.altazCalc = {}; 6 | 7 | MLB.altazCalc.trackingRatesNoCorrection = { 8 | calc: new MLB.coordLib.TrackingRates(), 9 | xform: new MLB.coordLib.XForm(MLB.coordLib.ConvertStyle.trig, 0) 10 | }; 11 | 12 | MLB.altazCalc.calc = function () { 13 | var includeRefraction, 14 | HA, 15 | Dec, 16 | latitude, 17 | HARad, 18 | DecRad, 19 | latitudeRad, 20 | state, 21 | rates, 22 | positionDecimals = 3, 23 | rateDecimals = 3, 24 | changeDecimals = 6, 25 | timeIntervalSecs = 1, 26 | HAOffset = 0, 27 | roundToDecimal = MLB.sharedLib.roundToDecimal, 28 | uom = MLB.sharedLib.uom, 29 | trackingRatesNoCorrection = MLB.altazCalc.trackingRatesNoCorrection, 30 | parseCoordinateGetValueInRadians = MLB.coordLib.parseCoordinateGetValueInRadians; 31 | 32 | HA = $('input[name=HA]').val(); 33 | Dec = $('input[name=Dec]').val(); 34 | latitude = $('input[name=latitude]').val(); 35 | includeRefraction = $('[name=includeRefraction]')[0].checked; 36 | 37 | HARad = parseCoordinateGetValueInRadians(HA, true).radians; 38 | DecRad = parseCoordinateGetValueInRadians(Dec).radians; 39 | latitudeRad = parseCoordinateGetValueInRadians(latitude).radians; 40 | 41 | state = trackingRatesNoCorrection; 42 | state.xform.latitude = latitudeRad; 43 | state.xform.presetAltaz(); 44 | 45 | state.xform.position.RA = 0; 46 | state.xform.position.Dec = DecRad; 47 | state.xform.position.SidT = HARad; 48 | rates = state.calc.getRatesViaDeltaTime(state.xform, timeIntervalSecs, HAOffset, includeRefraction); 49 | 50 | $('td[id=az]').html(roundToDecimal(rates.initialAz / uom.degToRad, positionDecimals)); 51 | $('td[id=alt]').html(roundToDecimal(rates.initialAlt / uom.degToRad, positionDecimals)); 52 | $('td[id=FR]').html(roundToDecimal(rates.initialFR / uom.degToRad, positionDecimals)); 53 | 54 | if (includeRefraction) { 55 | $('td[id=refract]').html(roundToDecimal(rates.refractionResults.refraction / uom.degToRad, positionDecimals)); 56 | } else { 57 | $('td[id=refract]').html(''); 58 | } 59 | 60 | $('td[id=azRate]').html(roundToDecimal(rates.azRate / uom.arcsecToRad, rateDecimals)); 61 | $('td[id=altRate]').html(roundToDecimal(rates.altRate / uom.arcsecToRad, rateDecimals)); 62 | $('td[id=FRRate]').html(roundToDecimal(rates.FRRate / uom.arcsecToRad, rateDecimals)); 63 | 64 | $('td[id=azRateChange]').html(roundToDecimal(rates.changeAzRate / uom.arcsecToRad, changeDecimals)); 65 | $('td[id=altRateChange]').html(roundToDecimal(rates.changeAltRate / uom.arcsecToRad, changeDecimals)); 66 | $('td[id=FRRateChange]').html(roundToDecimal(rates.changeFRRate / uom.arcsecToRad, changeDecimals)); 67 | }; 68 | 69 | $(window).ready(function () { 70 | var btnCalc = $('input[id=btnCalc]'), 71 | calc = MLB.altazCalc.calc; 72 | 73 | // event hookups/subscribes 74 | btnCalc.click(function () { 75 | calc(); 76 | }); 77 | 78 | calc(); 79 | }); 80 | 81 | // end of file -------------------------------------------------------------------------------- /lib/artificialStarDistanceCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2014 2 | 3 | 'use strict'; 4 | 5 | MLB.artificialStarDistanceCalc = {}; 6 | 7 | MLB.artificialStarDistanceCalc.calc = function () { 8 | var mirrorDiameter = +$('input[name=mirrorDiameter]').val(), 9 | focalLength = +$('input[name=focalLength]').val(), 10 | artificialStarDistanceInches = MLB.calcLib.artificialStarDistanceInches, 11 | artificialStarDistanceMM = MLB.calcLib.artificialStarDistanceMM, 12 | artificialStarDistance, 13 | btnUom = $('[name=uom]'); 14 | 15 | if (btnUom[0].checked) { 16 | artificialStarDistance = artificialStarDistanceInches; 17 | } else if (btnUom[1].checked) { 18 | artificialStarDistance = artificialStarDistanceMM; 19 | } 20 | 21 | $('input[name=distance]').val(artificialStarDistance(mirrorDiameter, focalLength)); 22 | }; 23 | 24 | $(window).ready(function () { 25 | var calc = MLB.artificialStarDistanceCalc.calc, 26 | btnCalculateDistance = $('#btnCalculateDistance')[0]; 27 | 28 | // event hookups/subscribes 29 | btnCalculateDistance.onclick = function () { 30 | calc(); 31 | }; 32 | 33 | calc(); 34 | }); 35 | 36 | // end of file -------------------------------------------------------------------------------- /lib/astroTimes.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2014 2 | 3 | 'use strict'; 4 | MLB.astroTimes = {}; 5 | 6 | MLB.astroTimes.getTimezone = function () { 7 | return +$('input[name=timezone]').val(); 8 | }; 9 | 10 | MLB.astroTimes.calcSidTJD = function () { 11 | var inputDate, 12 | date, 13 | JD, 14 | SidT, 15 | longitudeDeg, 16 | getTimezone = MLB.astroTimes.getTimezone, 17 | convertRadiansToHMSString = MLB.coordLib.convertRadiansToHMSString, 18 | dateFromString = MLB.coordLib.dateFromString, 19 | calcJD = MLB.coordLib.calcJD, 20 | calcSidTFromJD = MLB.coordLib.calcSidTFromJD; 21 | 22 | if ($('input[name=dateTime]').val() === '') { 23 | $('input[name=dateTime]').val(new Date().toString()); 24 | } 25 | 26 | inputDate = $('input[name=dateTime]').val(); 27 | longitudeDeg = +$('input[name=longitude]').val(); 28 | 29 | date = dateFromString(inputDate); 30 | $('input[name=timezone]').val(-date.getTimezoneOffset() / 60); 31 | 32 | JD = calcJD(date.getFullYear(), date.getMonth() + 1, date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds(), getTimezone()); 33 | $('input[name=JD]').val(JD); 34 | 35 | SidT = calcSidTFromJD(JD, longitudeDeg); 36 | $('input[name=SidT]').val(convertRadiansToHMSString(SidT)); 37 | }; 38 | 39 | MLB.astroTimes.calcDateTime = function () { 40 | var convertHMSMToString = MLB.coordLib.convertHMSMToString, 41 | getMonth = MLB.coordLib.getMonth, 42 | calcDateFromJD = MLB.coordLib.calcDateFromJD, 43 | getTimezone = MLB.astroTimes.getTimezone, 44 | JD = $('input[name=JD]').val(), 45 | date = calcDateFromJD(parseFloat(JD), getTimezone()), 46 | hmsm = { 47 | hours: date.hours, 48 | minutes: date.minutes, 49 | seconds: date.seconds 50 | }, 51 | dateString = getMonth(date.month - 1) + ' ' + date.day + ', ' + date.year + ' ' + convertHMSMToString(hmsm); 52 | 53 | $('input[name=dateTime]').val(dateString); 54 | }; 55 | 56 | $(window).ready(function () { 57 | var btnCalcSidTJD = $('input[id=btnCalcSidTJD]'), 58 | btnCalcDateTime = $('input[id=btnCalcDateTime]'), 59 | calcSidTJD = MLB.astroTimes.calcSidTJD, 60 | calcDateTime = MLB.astroTimes.calcDateTime; 61 | 62 | // event hookups/subscribes 63 | btnCalcSidTJD.click(function () { 64 | calcSidTJD(); 65 | }); 66 | btnCalcDateTime.click(function () { 67 | calcDateTime(); 68 | }); 69 | 70 | calcSidTJD(); 71 | }); 72 | 73 | // end of file -------------------------------------------------------------------------------- /lib/binoLayoutForNewtDesigner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/binoLayoutForNewtDesigner1.jpg -------------------------------------------------------------------------------- /lib/binoLayoutForNewtDesigner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/binoLayoutForNewtDesigner2.jpg -------------------------------------------------------------------------------- /lib/binoLayoutForNewtDesigner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/binoLayoutForNewtDesigner3.jpg -------------------------------------------------------------------------------- /lib/binoLayoutForNewtDesigner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/binoLayoutForNewtDesigner4.jpg -------------------------------------------------------------------------------- /lib/coordErrorsCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.coordErrorsCalc = {}; 6 | 7 | MLB.coordErrorsCalc.coordErrorsCalcState = { 8 | position: new MLB.coordLib.Position() 9 | }; 10 | 11 | MLB.coordErrorsCalc.calc = function () { 12 | var RA, 13 | Dec, 14 | SidT, 15 | latitude, 16 | coordYear, 17 | calcDate, 18 | RARadians, 19 | DecRadians, 20 | SidTRadians, 21 | latitudeRadians, 22 | coordJD, 23 | calcDateObject, 24 | JD, 25 | pnaCorrections, 26 | totalRA, 27 | totalDec, 28 | refractCorrection, 29 | properMotion = 0, 30 | timeZoneOffsetHrs = 0, 31 | limitToHundredthsArcsec = true, 32 | limitToTenthsArcsec = true, 33 | coordErrorsCalcState = MLB.coordErrorsCalc.coordErrorsCalcState, 34 | position = coordErrorsCalcState.position, 35 | convertRadiansToHMSMString = MLB.coordLib.convertRadiansToHMSMString, 36 | convertRadiansToDMSMString = MLB.coordLib.convertRadiansToDMSMString, 37 | dateFromString = MLB.coordLib.dateFromString, 38 | dateTodayString = MLB.coordLib.dateTodayString, 39 | calcJDFromJulianYear = MLB.coordLib.calcJDFromJulianYear, 40 | calcJD = MLB.coordLib.calcJD, 41 | calcProperMotionPrecessionNutationAnnualAberration = MLB.coordLib.calcProperMotionPrecessionNutationAnnualAberration, 42 | parseCoordinateGetValueInRadians = MLB.coordLib.parseCoordinateGetValueInRadians, 43 | calcRefractionFromTrueEquatorialCorrection = MLB.coordLib.calcRefractionFromTrueEquatorialCorrection; 44 | 45 | if ($('input[name=calcDate]').val() === '') { 46 | $('input[name=calcDate]').val(dateTodayString()); 47 | } 48 | 49 | // set vars from user input using jquery; 50 | // coordYear is a number, the rest are strings 51 | RA = $('input[name=RA]').val(); 52 | Dec = $('input[name=Dec]').val(); 53 | SidT = $('input[name=SidT]').val(); 54 | latitude = $('input[name=latitude]').val(); 55 | coordYear = +$('input[name=coordYear]').val(); 56 | calcDate = $('input[name=calcDate]').val(); 57 | 58 | RARadians = parseCoordinateGetValueInRadians(RA, true).radians; 59 | DecRadians = parseCoordinateGetValueInRadians(Dec).radians; 60 | SidTRadians = parseCoordinateGetValueInRadians(SidT, true).radians; 61 | latitudeRadians = parseCoordinateGetValueInRadians(latitude).radians; 62 | 63 | coordJD = calcJDFromJulianYear(coordYear); 64 | calcDateObject = dateFromString(calcDate); 65 | JD = calcJD(calcDateObject.getFullYear(), calcDateObject.getMonth() + 1, calcDateObject.getDate(), calcDateObject.getHours(), calcDateObject.getMinutes(), calcDateObject.getSeconds(), calcDateObject.getMilliseconds(), timeZoneOffsetHrs); 66 | 67 | pnaCorrections = calcProperMotionPrecessionNutationAnnualAberration(RARadians, DecRadians, coordJD, JD, properMotion, properMotion); 68 | totalRA = pnaCorrections.total.deltaRA; 69 | totalDec = pnaCorrections.total.deltaDec; 70 | refractCorrection = calcRefractionFromTrueEquatorialCorrection(RARadians + totalRA, DecRadians + totalDec, SidTRadians, latitudeRadians, position); 71 | 72 | $('td[id=precessionRA]').html(convertRadiansToHMSMString(pnaCorrections.precession.deltaRA, limitToHundredthsArcsec)); 73 | $('td[id=precessionDec]').html(convertRadiansToDMSMString(pnaCorrections.precession.deltaDec, limitToTenthsArcsec)); 74 | 75 | $('td[id=nutationRA]').html(convertRadiansToHMSMString(pnaCorrections.nutation.deltaRA, limitToHundredthsArcsec)); 76 | $('td[id=nutationDec]').html(convertRadiansToDMSMString(pnaCorrections.nutation.deltaDec, limitToTenthsArcsec)); 77 | 78 | $('td[id=annualAberrationRA]').html(convertRadiansToHMSMString(pnaCorrections.annualAberration.deltaRA, limitToHundredthsArcsec)); 79 | $('td[id=annualAberrationDec]').html(convertRadiansToDMSMString(pnaCorrections.annualAberration.deltaDec, limitToTenthsArcsec)); 80 | 81 | $('td[id=totalRA]').html(convertRadiansToHMSMString(totalRA, limitToHundredthsArcsec)); 82 | $('td[id=totalDec]').html(convertRadiansToDMSMString(totalDec, limitToTenthsArcsec)); 83 | 84 | $('td[id=refractionRA]').html(convertRadiansToHMSMString(refractCorrection.deltaRA, limitToHundredthsArcsec)); 85 | $('td[id=refractionDec]').html(convertRadiansToDMSMString(refractCorrection.deltaDec, limitToTenthsArcsec)); 86 | }; 87 | 88 | $(window).ready(function () { 89 | var btnCalc = $('input[id=btnCalc]'), 90 | calc = MLB.coordErrorsCalc.calc; 91 | 92 | // event hookups/subscribes 93 | btnCalc.click(function () { 94 | calc(); 95 | }); 96 | 97 | calc(); 98 | }); 99 | 100 | // end of file -------------------------------------------------------------------------------- /lib/coordLib unitTests.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/coordLib unitTests.htm -------------------------------------------------------------------------------- /lib/coordLib.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/coordLib.js -------------------------------------------------------------------------------- /lib/embedHtml.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function () { 2 | 3 | document.getElementById('qualityNote').innerHTML = "Fast scopes demand real quality. It can't be adjudicated afterwards by a mirror test or by tweaking collimation as the sky darkens. Instead, it must be thoroughly integrated into the process of making mirror and telescope. Astigmatism cannot be tested for then removed after the fact; instead mirror makers must adopt a process that precludes astigmatism. A mirror surface cannot be made smooth after parabolizing; instead, the mirror's surface must start smooth and kept smooth by the parabolizing process. Proper collimation that is added later by adjustments will only come undone over time. Instead, I create good alignment by building it 'right' the first time - there are no adjustments in my diagonal holder. Smooth high power motion near the zenith is built into the telescope by inventing a three-axis double flex-rocker mount. Quality is integrated into my mirror making and telescope designing and building process."; 4 | 5 | }); 6 | -------------------------------------------------------------------------------- /lib/encoderCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2015 2 | 3 | 'use strict'; 4 | 5 | MLB.encoderCalc = {}; 6 | 7 | MLB.encoderCalc.data = { 8 | encoder: new MLB.encoderLib.encoder() 9 | }; 10 | 11 | MLB.encoderCalc.update = function () { 12 | var uom = MLB.sharedLib.uom, 13 | roundToDecimal = MLB.sharedLib.roundToDecimal, 14 | decimalPoints = 3, 15 | getReduction = MLB.sharedLib.getReduction, 16 | update = MLB.encoderLib.update, 17 | encoder = MLB.encoderCalc.data.encoder, 18 | 19 | encoderName = $('input[name=encoderName]').val(), 20 | encoderMinCount = +$('input[name=encoderMinCount]').val(), 21 | encoderMaxCount = +$('input[name=encoderMaxCount]').val(), 22 | encoderGearReduction = getReduction($('input[name=encoderGearReduction]').val()), 23 | 24 | encoderCurrentCount = $('input[name=encoderCurrentCount]'), 25 | encoderCurrentCountVal = +encoderCurrentCount.val(), 26 | encoderLastCount = $('input[name=encoderLastCount]'), 27 | encoderLastCountVal = +encoderLastCount.val(), 28 | encoderRotations = $('input[name=encoderRotations]'), 29 | encoderRotationsVal = +encoderRotations.val(), 30 | encoderAngleOffsetDeg = $('input[name=encoderAngleOffsetDeg]'), 31 | encoderAngleOffsetDegVal = +encoderAngleOffsetDeg.val() * uom.degToRad, 32 | 33 | encoderDirection = $('input[name=encoderDirection]'), 34 | encoderAngleDeg = $('input[name=encoderAngleDeg]'), 35 | encoderGearAngleDeg = $('input[name=encoderGearAngleDeg]'), 36 | encoderGearAngleWithOffsetDeg = $('input[name=encoderGearAngleWithOffsetDeg]'); 37 | 38 | encoder.name = encoderName; 39 | encoder.minCount = encoderMinCount; 40 | encoder.maxCount = encoderMaxCount; 41 | encoder.totalCounts = encoder.maxCount - encoder.minCount + 1; 42 | encoder.gearReduction = encoderGearReduction; 43 | encoder.offsetAngle = encoderAngleOffsetDegVal; 44 | 45 | encoder.lastCount = encoderLastCountVal; 46 | encoder.rotations = encoderRotationsVal; 47 | 48 | update(encoder, encoderCurrentCountVal); 49 | 50 | encoderLastCount.val(encoder.lastCount); 51 | encoderDirection.val(encoder.direction); 52 | encoderRotations.val(encoder.rotations); 53 | encoderAngleDeg.val(roundToDecimal(encoder.encoderAngle / uom.degToRad, decimalPoints)); 54 | encoderGearAngleDeg.val(roundToDecimal(encoder.gearAngle / uom.degToRad, decimalPoints)); 55 | encoderGearAngleWithOffsetDeg.val(roundToDecimal(encoder.gearAngleWithOffset / uom.degToRad, decimalPoints)); 56 | }; 57 | 58 | MLB.encoderCalc.reset = function () { 59 | var uom = MLB.sharedLib.uom, 60 | roundToDecimal = MLB.sharedLib.roundToDecimal, 61 | decimalPoints = 3, 62 | reset = MLB.encoderLib.reset, 63 | encoder = MLB.encoderCalc.data.encoder, 64 | 65 | encoderCurrentCount = $('input[name=encoderCurrentCount]'), 66 | encoderLastCount = $('input[name=encoderLastCount]'), 67 | encoderRotations = $('input[name=encoderRotations]'), 68 | encoderAngleOffsetDeg = $('input[name=encoderAngleOffsetDeg]'), 69 | encoderDirection = $('input[name=encoderDirection]'), 70 | encoderAngleDeg = $('input[name=encoderAngleDeg]'), 71 | encoderGearAngleDeg = $('input[name=encoderGearAngleDeg]'), 72 | encoderGearAngleWithOffsetDeg = $('input[name=encoderGearAngleWithOffsetDeg]'); 73 | 74 | reset(encoder); 75 | 76 | encoderCurrentCount.val(encoder.currentCount); 77 | encoderLastCount.val(encoder.lastCount); 78 | encoderRotations.val(encoder.rotations); 79 | encoderAngleOffsetDeg.val(roundToDecimal(encoder.offsetAngle / uom.degToRad, decimalPoints)); 80 | encoderDirection.val(encoder.direction); 81 | encoderAngleDeg.val(roundToDecimal(encoder.encoderAngle / uom.degToRad, decimalPoints)); 82 | encoderGearAngleDeg.val(roundToDecimal(encoder.gearAngle / uom.degToRad, decimalPoints)); 83 | encoderGearAngleWithOffsetDeg.val(roundToDecimal(encoder.gearAngleWithOffset / uom.degToRad, decimalPoints)); 84 | }; 85 | 86 | $(window).ready(function () { 87 | var update = MLB.encoderCalc.update, 88 | reset = MLB.encoderCalc.reset, 89 | btnUpdateEncoder = $('input[id=btnUpdateEncoder]'), 90 | btnResetEncoder = $('input[id=btnResetEncoder]'); 91 | 92 | // event hookups/subscribes 93 | btnUpdateEncoder.click(function () { 94 | update(); 95 | }); 96 | btnResetEncoder.click(function () { 97 | reset(); 98 | }); 99 | 100 | update(); 101 | }); 102 | 103 | // end of file -------------------------------------------------------------------------------- /lib/equatTrackingRatesCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.equatTrackingRatesCalc = {}; 6 | 7 | MLB.equatTrackingRatesCalc.trackingRatesNoCorrection = { 8 | calc: new MLB.coordLib.TrackingRates(), 9 | xform: new MLB.coordLib.XForm(MLB.coordLib.ConvertStyle.trig, 0) 10 | }; 11 | 12 | MLB.equatTrackingRatesCalc.calc = function () { 13 | var HA, 14 | Dec, 15 | latitude, 16 | HARad, 17 | DecRad, 18 | latitudeRad, 19 | state, 20 | rates, 21 | elevationString, 22 | KingRate, 23 | includeRefraction = true, 24 | positionDecimals = 3, 25 | rateDecimals = 3, 26 | changeDecimals = 6, 27 | timeIntervalSecs = 1, 28 | HAOffset = 0, 29 | roundToDecimal = MLB.sharedLib.roundToDecimal, 30 | uom = MLB.sharedLib.uom, 31 | trackingRatesNoCorrection = MLB.equatTrackingRatesCalc.trackingRatesNoCorrection, 32 | parseCoordinateGetValueInRadians = MLB.coordLib.parseCoordinateGetValueInRadians, 33 | calcKingRateMinutesPerDay = MLB.coordLib.calcKingRateMinutesPerDay, 34 | calcKingRateArcsecPerSec = MLB.coordLib.calcKingRateArcsecPerSec; 35 | 36 | HA = $('input[name=HA]').val(); 37 | Dec = $('input[name=Dec]').val(); 38 | latitude = $('input[name=latitude]').val(); 39 | 40 | HARad = parseCoordinateGetValueInRadians(HA, true).radians; 41 | DecRad = parseCoordinateGetValueInRadians(Dec).radians; 42 | latitudeRad = parseCoordinateGetValueInRadians(latitude).radians; 43 | 44 | state = trackingRatesNoCorrection; 45 | state.xform.latitude = latitudeRad; 46 | state.xform.presetEquat(); 47 | 48 | state.xform.position.RA = 0; 49 | state.xform.position.Dec = DecRad; 50 | state.xform.position.SidT = HARad; 51 | rates = state.calc.getRatesViaDeltaTime(state.xform, timeIntervalSecs, HAOffset, includeRefraction); 52 | elevationString = roundToDecimal(rates.refractionResults.refractedAlt / uom.degToRad, positionDecimals); 53 | 54 | if (rates.refractionResults.refractedAlt < 0) { 55 | alert(elevationString + ' degrees below the horizon - try again'); 56 | return; 57 | } 58 | 59 | KingRate = calcKingRateArcsecPerSec(calcKingRateMinutesPerDay(0, DecRad, HARad, latitudeRad)); 60 | 61 | $('td[id=elevation]').html(elevationString); 62 | $('td[id=refract]').html(roundToDecimal(rates.refractionResults.refraction / uom.degToRad, positionDecimals)); 63 | 64 | $('td[id=RARate]').html(roundToDecimal(rates.azRate / uom.arcsecToRad, rateDecimals)); 65 | $('td[id=DecRate]').html(roundToDecimal(rates.altRate / uom.arcsecToRad, rateDecimals)); 66 | 67 | $('td[id=KingRARate]').html(roundToDecimal(KingRate, rateDecimals)); 68 | 69 | $('td[id=RARatePercentage]').html(roundToDecimal(rates.azRate / uom.arcsecToRad / 15 / uom.sidRate * 100, rateDecimals) + '%'); 70 | 71 | $('td[id=RARateChange]').html(roundToDecimal(rates.changeAzRate / uom.arcsecToRad, changeDecimals)); 72 | $('td[id=DecRateChange]').html(roundToDecimal(rates.changeAltRate / uom.arcsecToRad, changeDecimals)); 73 | }; 74 | 75 | $(window).ready(function () { 76 | var btnCalc = $('input[id=btnCalc]'), 77 | calc = MLB.equatTrackingRatesCalc.calc; 78 | 79 | // event hookups/subscribes 80 | btnCalc.click(function () { 81 | calc(); 82 | }); 83 | 84 | calc(); 85 | }); 86 | 87 | // end of file -------------------------------------------------------------------------------- /lib/eyepiece divergence study.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/eyepiece divergence study.jpg -------------------------------------------------------------------------------- /lib/gaugeLib.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/gaugeLib.js -------------------------------------------------------------------------------- /lib/gaugeStudy.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2012-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.gaugeStudy = {}; 6 | 7 | MLB.gaugeStudy.drawGauges = function () { 8 | var gaugeStyle = $('#gaugeStyle')[0], 9 | selectedGaugeStyle = gaugeStyle.options[gaugeStyle.selectedIndex].text, 10 | scale = +$('[name=gaugeSize]')[0].value, 11 | stateInstances = MLB.gaugeLib.stateInstances, 12 | init = MLB.gaugeLib.init; 13 | 14 | stateInstances.states = []; 15 | 16 | init('hourGauge1', 'inputHours1', 'Time', scale, 'hoursGauge', selectedGaugeStyle); 17 | init('degreeGauge1', 'inputDegrees1', 'Angle', scale, 'degreesGauge', selectedGaugeStyle); 18 | init('negHourGauge1', 'inputNegHours1', 'Net time', scale, 'negHoursGauge', selectedGaugeStyle); 19 | init('negDegreeGauge1', 'inputNegDegrees1', 'Net angle', scale, 'negDegreesGauge', selectedGaugeStyle); 20 | init('neg10DegreeGauge1', 'inputNeg10Degrees1', 'Net angle', scale, 'neg10DegreesGauge', selectedGaugeStyle); 21 | }; 22 | 23 | MLB.gaugeStudy.load = function () { 24 | var gaugeStyle = $('#gaugeStyle')[0], 25 | btnRedraw = $('#btnRedraw')[0], 26 | btnHourGauge1 = $('#btnHourGauge1')[0], 27 | btnDegreeGauge1 = $('#btnDegreeGauge1')[0], 28 | btnNegHourGauge1 = $('#btnNegHourGauge1')[0], 29 | btnNegDegreeGauge1 = $('#btnNegDegreeGauge1')[0], 30 | btnNeg10DegreeGauge1 = $('#btnNeg10DegreeGauge1')[0], 31 | drawGauges = MLB.gaugeStudy.drawGauges, 32 | plot = MLB.gaugeLib.plot; 33 | 34 | // event hookups/subscribes 35 | gaugeStyle.onchange = drawGauges; 36 | btnRedraw.onclick = drawGauges; 37 | 38 | btnHourGauge1.onclick = function () { 39 | plot('hourGauge1'); 40 | }; 41 | btnDegreeGauge1.onclick = function () { 42 | plot('degreeGauge1'); 43 | }; 44 | btnNegHourGauge1.onclick = function () { 45 | plot('negHourGauge1'); 46 | }; 47 | btnNegDegreeGauge1.onclick = function () { 48 | plot('negDegreeGauge1'); 49 | }; 50 | btnNeg10DegreeGauge1.onclick = function () { 51 | plot('neg10DegreeGauge1'); 52 | }; 53 | 54 | drawGauges(); 55 | }; 56 | 57 | $(window).ready(function () { 58 | MLB.gaugeStudy.load(); 59 | }); 60 | 61 | // end of file -------------------------------------------------------------------------------- /lib/holomaskCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2015-2023 2 | 3 | /* 4 | EPS coordinate notes 5 | http://paulbourke.net/dataformats/postscript/ 6 | 7 | 0,0 in bottom left hand corner 8 | units are 1/72 inch 9 | 'y' 'x' command 10 | 'm' = move to 11 | 'l' = line 12 | 's' = stroke 13 | */ 14 | 15 | 'use strict'; 16 | 17 | MLB.holomaskCalc = {}; 18 | 19 | MLB.holomaskCalc.textFile = null; 20 | MLB.holomaskCalc.fileName = 'holomask.eps'; 21 | 22 | MLB.holomaskCalc.drawGraphicsOnCanvas = function (canvas) { 23 | var canvasSize, 24 | mirrorDiameterMm, 25 | scale, 26 | lineType, 27 | int = MLB.sharedLib.int, 28 | graphicLines = MLB.holomaskLib.output.graphicLines, 29 | numbers, 30 | savedNumbers, 31 | context = canvas.getContext('2d'); 32 | 33 | mirrorDiameterMm = +$('input[name = mirrorDiameterMm]').val(); 34 | canvasSize = +$('input[name = canvasSize]').val(); 35 | // fit the holomask into the canvas 36 | scale = canvasSize / mirrorDiameterMm * 25.4 / 72; 37 | canvas.width = canvasSize; 38 | canvas.height = canvasSize; 39 | context.clearRect(0, 0, canvas.width, canvas.height); 40 | context.strokeStyle = 'orange'; 41 | context.fillStyle = context.strokeStyle; 42 | context.beginPath(); 43 | 44 | // each 'm', 'l'..., 's' sequence draws a wavy rectangle outlining a fringe on the mirror's surface from center to edge back to center; 45 | // 'm', 'l'..., 'f' designates a filled in area 46 | graphicLines.forEach(function (line) { 47 | lineType = line.slice(-1); 48 | if (lineType === 'm') { 49 | numbers = line.split(' '); 50 | context.moveTo(int(scale * numbers[0]), int(scale * numbers[1])); 51 | // save the starting moveto point to draw to the final lineto 52 | savedNumbers = numbers.slice(); 53 | } else if (lineType === 'l') { 54 | numbers = line.split(' '); 55 | context.lineTo(int(scale * numbers[0]), int(scale * numbers[1])); 56 | } else if (lineType === 's' || lineType === 'f') { 57 | // draw a line back to the starting point 58 | context.lineTo(int(scale * savedNumbers[0]), int(scale * savedNumbers[1])); 59 | context.stroke(); 60 | context.fill(); 61 | context.beginPath(); 62 | } 63 | }); 64 | }; 65 | 66 | MLB.holomaskCalc.mainWorkFlow = function () { 67 | var setInputParmsFromDOM = MLB.holomaskLib.setInputParmsFromDOM, 68 | calcParms = MLB.holomaskLib.calcParms, 69 | buildContentPreamble = MLB.holomaskLib.buildContentPreamble, 70 | generateEPSfileHeader = MLB.holomaskLib.generateEPSfileHeader, 71 | fringes = MLB.holomaskLib.fringes, 72 | addCenterSpotAndFooter = MLB.holomaskLib.addCenterSpotAndFooter, 73 | output = MLB.holomaskLib.output, 74 | extractGraphics = MLB.holomaskLib.extractGraphics, 75 | drawGraphicsOnCanvas = MLB.holomaskCalc.drawGraphicsOnCanvas, 76 | canvas, 77 | decimalPrecision = +$('input[name = decimalPrecision]').val(); 78 | 79 | setInputParmsFromDOM(); 80 | calcParms(); 81 | generateEPSfileHeader(); 82 | buildContentPreamble(); 83 | fringes(decimalPrecision); 84 | addCenterSpotAndFooter(); 85 | 86 | // file contents are found in MLB.holomaskLib.output.fileContents 87 | $('#parms').html(output.parms + output.fringeCount); 88 | 89 | extractGraphics(); 90 | canvas = $('#holomaskCanvas')[0]; 91 | drawGraphicsOnCanvas(canvas); 92 | }; 93 | 94 | var makeTextFile = function () { 95 | var fileContents = MLB.holomaskLib.output.fileContents, 96 | textFile = MLB.holomaskCalc.textFile, 97 | data = new Blob([fileContents]); 98 | 99 | // if we are replacing a previously generated file we need to manually revoke the object URL to avoid memory leaks 100 | if (textFile !== null) { 101 | window.URL.revokeObjectURL(textFile); 102 | } 103 | textFile = window.URL.createObjectURL(data); 104 | return textFile; 105 | }; 106 | 107 | 108 | $(window).ready(function () { 109 | var btnCalc = $('input[id = btnCalc]'), 110 | btnCreateFile = $('#createFile'), 111 | mainWorkFlow = MLB.holomaskCalc.mainWorkFlow, 112 | fileName = MLB.holomaskCalc.fileName; 113 | 114 | // event hookups / subscribes 115 | btnCalc.click(function () { 116 | mainWorkFlow(); 117 | }); 118 | btnCreateFile.click(function () { 119 | var link = document.getElementById('downloadlink'); 120 | link.href = makeTextFile(); 121 | link.fileName = fileName; 122 | link.style.display = 'block'; 123 | }); 124 | 125 | mainWorkFlow(); 126 | }); 127 | 128 | // end of file 129 | -------------------------------------------------------------------------------- /lib/initializationErrorPlot.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2014 2 | 3 | 'use strict'; 4 | 5 | MLB.initializationErrorPlot = {}; 6 | 7 | // so that 180 degrees, or horizon to horizon just fits the canvas 8 | MLB.initializationErrorPlot.radius = 90; 9 | // init points random error is this, so this is the best possible pointing error 10 | MLB.initializationErrorPlot.minPointingError = 0.7; 11 | 12 | MLB.initializationErrorPlot.plotStar = function (star, context, center) { 13 | var radius = MLB.initializationErrorPlot.radius, 14 | uom = MLB.sharedLib.uom, 15 | mInt = MLB.sharedLib.int, 16 | fillCircle = MLB.sharedLib.fillCircle, 17 | point = MLB.sharedLib.point, 18 | azimuth, 19 | altitude, 20 | x, 21 | y; 22 | 23 | azimuth = star[0]; 24 | altitude = star[1]; 25 | y = center.y - mInt((radius - altitude) * Math.cos(azimuth * uom.degToRad)); 26 | x = center.x - mInt((radius - altitude) * Math.sin(azimuth * uom.degToRad)); 27 | fillCircle(context, point(x, y), 2, 'black'); 28 | }; 29 | 30 | MLB.initializationErrorPlot.plot = function (context, center, data, stars, maxError) { 31 | var plotStar = MLB.initializationErrorPlot.plotStar, 32 | radius = MLB.initializationErrorPlot.radius, 33 | minPointingError = MLB.initializationErrorPlot.minPointingError, 34 | uom = MLB.sharedLib.uom, 35 | mInt = MLB.sharedLib.int, 36 | point = MLB.sharedLib.point, 37 | drawCircle = MLB.sharedLib.drawCircle, 38 | fillCircle = MLB.sharedLib.fillCircle, 39 | drawLine = MLB.sharedLib.drawLine, 40 | ix, 41 | row, 42 | azimuth, 43 | altitude, 44 | x, 45 | y, 46 | pointingError, 47 | brightness, 48 | errorToBrightnessScale, 49 | circleAltitude, 50 | circleAzimuth, 51 | azimuthPoint1, 52 | azimuthPoint2; 53 | 54 | for (ix = 0; ix < data.length; ix++) { 55 | row = data[ix]; 56 | pointingError = row[1]; 57 | azimuth = row[2]; 58 | altitude = row[3]; 59 | y = center.y - mInt((radius - altitude) * Math.cos(azimuth * uom.degToRad)); 60 | x = center.x - mInt((radius - altitude) * Math.sin(azimuth * uom.degToRad)); 61 | errorToBrightnessScale = 255 / (maxError - minPointingError); 62 | brightness = mInt((pointingError - minPointingError) * errorToBrightnessScale); 63 | if (brightness > 255) { 64 | brightness = 255; 65 | } 66 | if (brightness < 0) { 67 | brightness = 0; 68 | } 69 | fillCircle(context, point(x, y), 1, 'rgb(' + brightness.toString() + ',' + (255 - brightness).toString() + ', 0)'); 70 | } 71 | 72 | plotStar(stars[0], context, center); 73 | plotStar(stars[1], context, center); 74 | 75 | for (circleAltitude = radius; circleAltitude > 0; circleAltitude -= 30) { 76 | drawCircle(context, center, circleAltitude, 1, 'blue'); 77 | } 78 | for (circleAzimuth = 0; circleAzimuth < 180; circleAzimuth += 30) { 79 | azimuthPoint1 = point(center.x - radius * Math.cos(circleAzimuth * uom.degToRad), center.y - radius * Math.sin(circleAzimuth * uom.degToRad)); 80 | azimuthPoint2 = point(2 * center.x - azimuthPoint1.x, 2 * center.y - azimuthPoint1.y); 81 | drawLine(context, 'blue', 1, azimuthPoint1, azimuthPoint2); 82 | } 83 | }; 84 | 85 | MLB.initializationErrorPlot.load = function () { 86 | var radius = MLB.initializationErrorPlot.radius, 87 | maxError = 2 * MLB.initializationErrorPlot.minPointingError, 88 | point = MLB.sharedLib.point, 89 | canvas, 90 | context, 91 | width, 92 | height, 93 | center; 94 | 95 | canvas = $('#c1')[0]; 96 | context = canvas.getContext("2d"); 97 | width = canvas.width; 98 | height = canvas.height; 99 | center = point(radius, height / 2); 100 | MLB.initializationErrorPlot.plot(context, center, MLB.initializationErrorPlotData.separation6, MLB.initializionErrorPlotStarAltaz6, maxError); 101 | 102 | canvas = $('#c2')[0]; 103 | context = canvas.getContext("2d"); 104 | width = canvas.width; 105 | height = canvas.height; 106 | center = point(radius, height / 2); 107 | MLB.initializationErrorPlot.plot(context, center, MLB.initializationErrorPlotData.separation24, MLB.initializionErrorPlotStarAltaz24, maxError); 108 | 109 | canvas = $('#c3')[0]; 110 | context = canvas.getContext("2d"); 111 | width = canvas.width; 112 | height = canvas.height; 113 | center = point(radius, height / 2); 114 | MLB.initializationErrorPlot.plot(context, center, MLB.initializationErrorPlotData.separation38, MLB.initializionErrorPlotStarAltaz38, maxError); 115 | 116 | canvas = $('#c4')[0]; 117 | context = canvas.getContext("2d"); 118 | width = canvas.width; 119 | height = canvas.height; 120 | center = point(radius, height / 2); 121 | MLB.initializationErrorPlot.plot(context, center, MLB.initializationErrorPlotData.separation81, MLB.initializionErrorPlotStarAltaz81, maxError); 122 | }; 123 | 124 | $(window).ready(function () { 125 | MLB.initializationErrorPlot.load(); 126 | }); 127 | 128 | // end of file -------------------------------------------------------------------------------- /lib/jqplot/jquery.jqplot.1.0.8r1250.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/jqplot/jquery.jqplot.1.0.8r1250.zip -------------------------------------------------------------------------------- /lib/jqplot/jquery.jqplot.min.css: -------------------------------------------------------------------------------- 1 | .jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute}.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%)}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7)}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3)} -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.blockRenderer.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(a){a.jqplot.BlockRenderer=function(){a.jqplot.LineRenderer.call(this)};a.jqplot.BlockRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.BlockRenderer.prototype.constructor=a.jqplot.BlockRenderer;a.jqplot.BlockRenderer.prototype.init=function(b){this.css={padding:"2px",border:"1px solid #999",textAlign:"center"};this.escapeHtml=false;this.insertBreaks=true;this.varyBlockColors=false;a.extend(true,this,b);if(this.css.backgroundColor){this.color=this.css.backgroundColor}else{if(this.css.background){this.color=this.css.background}else{if(!this.varyBlockColors){this.css.background=this.color}}}this.canvas=new a.jqplot.BlockCanvas();this.shadowCanvas=new a.jqplot.BlockCanvas();this.canvas._plotDimensions=this._plotDimensions;this.shadowCanvas._plotDimensions=this._plotDimensions;this._type="block";this.moveBlock=function(l,j,i,e){var c=this.canvas._elem.children(":eq("+l+")");this.data[l][0]=j;this.data[l][1]=i;this._plotData[l][0]=j;this._plotData[l][1]=i;this._stackData[l][0]=j;this._stackData[l][1]=i;this.gridData[l][0]=this._xaxis.series_u2p(j);this.gridData[l][1]=this._yaxis.series_u2p(i);var k=c.outerWidth();var f=c.outerHeight();var d=this.gridData[l][0]-k/2+"px";var g=this.gridData[l][1]-f/2+"px";if(e){if(parseInt(e,10)){e=parseInt(e,10)}c.animate({left:d,top:g},e)}else{c.css({left:d,top:g})}c=null}};a.jqplot.BlockRenderer.prototype.draw=function(q,o,r){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var f,c,l,o,p,k,n,g,e,m;var b=(r!=undefined)?r:{};var j=new a.jqplot.ColorGenerator(this.seriesColors);this.canvas._elem.empty();for(f=0;f")}k=a.extend(true,{},this.css,k);c=a('
');this.canvas._elem.append(c);this.escapeHtml?c.text(p):c.html(p);delete k.position;delete k.marginRight;delete k.marginLeft;if(!k.background&&!k.backgroundColor&&!k.backgroundImage){k.background=j.next()}c.css(k);n=c.outerWidth();g=c.outerHeight();e=o[0]-n/2+"px";m=o[1]-g/2+"px";c.css({left:e,top:m});c=null}};a.jqplot.BlockCanvas=function(){a.jqplot.ElemContainer.call(this);this._ctx};a.jqplot.BlockCanvas.prototype=new a.jqplot.ElemContainer();a.jqplot.BlockCanvas.prototype.constructor=a.jqplot.BlockCanvas;a.jqplot.BlockCanvas.prototype.createElement=function(i,e,c){this._offsets=i;var b="jqplot-blockCanvas";if(e!=undefined){b=e}var g;if(this._elem){g=this._elem.get(0)}else{g=document.createElement("div")}if(c!=undefined){this._plotDimensions=c}var d=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var f=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=a(g);this._elem.css({position:"absolute",width:d,height:f,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(b);return this._elem};a.jqplot.BlockCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(a){a.jqplot.CanvasAxisLabelRenderer=function(b){this.angle=0;this.axis;this.show=true;this.showLabel=true;this.label="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="11pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);if(b.angle==null&&this.axis!="xaxis"&&this.axis!="x2axis"){this.angle=-90}var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisLabelRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisLabelRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisLabelRenderer.prototype.draw=function(c,f){if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css({position:"absolute"});this._elem.addClass("jqplot-"+this.axis+"-label");e=null;return this._elem};a.jqplot.CanvasAxisLabelRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(a){a.jqplot.CanvasAxisTickRenderer=function(b){this.mark="outside";this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.angle=0;this.markSize=4;this.show=true;this.showLabel=true;this.labelPosition="auto";this.label="";this.value=null;this._styles={};this.formatter=a.jqplot.DefaultTickFormatter;this.formatString="";this.prefix="";this.fontFamily='"Trebuchet MS", Arial, Helvetica, sans-serif';this.fontSize="10pt";this.fontWeight="normal";this.fontStretch=1;this.textColor="#666666";this.enableFontSupport=true;this.pt2px=null;this._elem;this._ctx;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null};a.extend(true,this,b);var c={fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily};if(this.pt2px){c.pt2px=this.pt2px}if(this.enableFontSupport){if(a.jqplot.support_canvas_text()){this._textRenderer=new a.jqplot.CanvasFontRenderer(c)}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}}else{this._textRenderer=new a.jqplot.CanvasTextRenderer(c)}};a.jqplot.CanvasAxisTickRenderer.prototype.init=function(b){a.extend(true,this,b);this._textRenderer.init({fontSize:this.fontSize,fontWeight:this.fontWeight,fontStretch:this.fontStretch,fillStyle:this.textColor,angle:this.getAngleRad(),fontFamily:this.fontFamily})};a.jqplot.CanvasAxisTickRenderer.prototype.getWidth=function(d){if(this._elem){return this._elem.outerWidth(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.sin(f.angle)*e)+Math.abs(Math.cos(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getHeight=function(d){if(this._elem){return this._elem.outerHeight(true)}else{var f=this._textRenderer;var c=f.getWidth(d);var e=f.getHeight(d);var b=Math.abs(Math.cos(f.angle)*e)+Math.abs(Math.sin(f.angle)*c);return b}};a.jqplot.CanvasAxisTickRenderer.prototype.getTop=function(b){if(this._elem){return this._elem.position().top}else{return null}};a.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad=function(){var b=this.angle*Math.PI/180;return b};a.jqplot.CanvasAxisTickRenderer.prototype.setTick=function(b,d,c){this.value=b;if(c){this.isMinorTick=true}return this};a.jqplot.CanvasAxisTickRenderer.prototype.draw=function(c,f){if(!this.label){this.label=this.prefix+this.formatter(this.formatString,this.value)}if(this._elem){if(a.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==undefined){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce();this._elem=null}var e=f.canvasManager.getCanvas();this._textRenderer.setText(this.label,c);var b=this.getWidth(c);var d=this.getHeight(c);e.width=b;e.height=d;e.style.width=b;e.style.height=d;e.style.textAlign="left";e.style.position="absolute";e=f.canvasManager.initCanvas(e);this._elem=a(e);this._elem.css(this._styles);this._elem.addClass("jqplot-"+this.axis+"-tick");e=null;return this._elem};a.jqplot.CanvasAxisTickRenderer.prototype.pack=function(){this._textRenderer.draw(this._elem.get(0).getContext("2d"),this.label)}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.ciParser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jqPlot 3 | * Pure JavaScript plotting plugin using jQuery 4 | * 5 | * Version: 1.0.8 6 | * Revision: 1250 7 | * 8 | * Copyright (c) 2009-2013 Chris Leonello 9 | * jqPlot is currently available for use in all personal or commercial projects 10 | * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL 11 | * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can 12 | * choose the license that best suits your project and use it accordingly. 13 | * 14 | * Although not required, the author would appreciate an email letting him 15 | * know of any substantial use of jqPlot. You can reach the author at: 16 | * chris at jqplot dot com or see http://www.jqplot.com/info.php . 17 | * 18 | * If you are feeling kind and generous, consider supporting the project by 19 | * making a donation at: http://www.jqplot.com/donate.php . 20 | * 21 | * sprintf functions contained in jqplot.sprintf.js by Ash Searle: 22 | * 23 | * version 2007.04.27 24 | * author Ash Searle 25 | * http://hexmen.com/blog/2007/03/printf-sprintf/ 26 | * http://hexmen.com/js/sprintf.js 27 | * The author (Ash Searle) has placed this code in the public domain: 28 | * "This code is unrestricted: you are free to use it however you like." 29 | * 30 | */ 31 | (function($) { 32 | /** 33 | * Class: $.jqplot.ciParser 34 | * Data Renderer function which converts a custom JSON data object into jqPlot data format. 35 | * Set this as a callable on the jqplot dataRenderer plot option: 36 | * 37 | * > plot = $.jqplot('mychart', [data], { dataRenderer: $.jqplot.ciParser, ... }); 38 | * 39 | * Where data is an object in JSON format or a JSON encoded string conforming to the 40 | * City Index API spec. 41 | * 42 | * Note that calling the renderer function is handled internally by jqPlot. The 43 | * user does not have to call the function. The parameters described below will 44 | * automatically be passed to the ciParser function. 45 | * 46 | * Parameters: 47 | * data - JSON encoded string or object. 48 | * plot - reference to jqPlot Plot object. 49 | * 50 | * Returns: 51 | * data array in jqPlot format. 52 | * 53 | */ 54 | $.jqplot.ciParser = function (data, plot) { 55 | var ret = [], 56 | line, 57 | temp, 58 | i, j, k, kk; 59 | 60 | if (typeof(data) == "string") { 61 | data = $.jqplot.JSON.parse(data, handleStrings); 62 | } 63 | 64 | else if (typeof(data) == "object") { 65 | for (k in data) { 66 | for (i=0; i= 0) { 87 | //here we will try to extract the ticks from the Date string in the "value" fields of JSON returned data 88 | a = /^\/Date\((-?[0-9]+)\)\/$/.exec(value); 89 | if (a) { 90 | return parseInt(a[1], 10); 91 | } 92 | } 93 | return value; 94 | } 95 | } 96 | 97 | for (var prop in data) { 98 | line = []; 99 | temp = data[prop]; 100 | switch (prop) { 101 | case "PriceTicks": 102 | for (i=0; i=0){i=/^\/Date\((-?[0-9]+)\)\/$/.exec(k);if(i){return parseInt(i[1],10)}}return k}}for(var b in g){o=[];n=g[b];switch(b){case"PriceTicks":for(h=0;h=0.6)?l[3]*0.6:l[3]*(2-l[3]);m.color="rgba("+o[0]+","+o[1]+","+o[2]+","+k+")"}i.color=m.color;i.init();var g=(p.pointIndex>0)?p.pointIndex-1:0;var j=p.pointIndex+2;m._gridData=q.gridData.slice(g,j)}function e(o,l,h,t,m){if(m.plugins.dragable.dragCanvas.isDragging){var u=m.plugins.dragable.dragCanvas;var i=u._neighbor;var w=m.series[i.seriesIndex];var k=w.plugins.dragable;var r=w.gridData;var p=(k.constrainTo=="y")?i.gridData[0]:l.x;var n=(k.constrainTo=="x")?i.gridData[1]:l.y;var g=w._xaxis.series_p2u(p);var q=w._yaxis.series_p2u(n);var v=u._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);if(i.pointIndex>0){k._gridData[1]=[p,n]}else{k._gridData[0]=[p,n]}m.series[i.seriesIndex].draw(u._ctx,{gridData:k._gridData,shadow:false,preventJqPlotSeriesDrawTrigger:true,color:k.color,markerOptions:{color:k.color,shadow:false},trendline:{show:false}});m.target.trigger("jqplotSeriesPointChange",[i.seriesIndex,i.pointIndex,[g,q],[p,n]])}else{if(t!=null){var j=m.series[t.seriesIndex];if(j.isDragable){var u=m.plugins.dragable.dragCanvas;if(!u.isOver){u._cursors.push(o.target.style.cursor);o.target.style.cursor="pointer"}u.isOver=true}}else{if(t==null){var u=m.plugins.dragable.dragCanvas;if(u.isOver){o.target.style.cursor=u._cursors.pop();u.isOver=false}}}}}function c(k,i,g,l,j){var m=j.plugins.dragable.dragCanvas;m._cursors.push(k.target.style.cursor);if(l!=null){var o=j.series[l.seriesIndex];var h=o.plugins.dragable;if(o.isDragable&&!m.isDragging){m._neighbor=l;m.isDragging=true;f(j,l);h.markerRenderer.draw(o.gridData[l.pointIndex][0],o.gridData[l.pointIndex][1],m._ctx);k.target.style.cursor="move";j.target.trigger("jqplotDragStart",[l.seriesIndex,l.pointIndex,i,g])}}else{var n=m._ctx;n.clearRect(0,0,n.canvas.width,n.canvas.height);m.isDragging=false}}function a(m,j,g,o,k){if(k.plugins.dragable.dragCanvas.isDragging){var p=k.plugins.dragable.dragCanvas;var q=p._ctx;q.clearRect(0,0,q.canvas.width,q.canvas.height);p.isDragging=false;var h=p._neighbor;var r=k.series[h.seriesIndex];var i=r.plugins.dragable;var n=(i.constrainTo=="y")?h.data[0]:g[r.xaxis];var l=(i.constrainTo=="x")?h.data[1]:g[r.yaxis];r.data[h.pointIndex][0]=n;r.data[h.pointIndex][1]=l;k.drawSeries({preventJqPlotSeriesDrawTrigger:true},h.seriesIndex);p._neighbor=null;m.target.style.cursor=p._cursors.pop();k.target.trigger("jqplotDragStop",[j,g])}}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(c){c.jqplot.EnhancedLegendRenderer=function(){c.jqplot.TableLegendRenderer.call(this)};c.jqplot.EnhancedLegendRenderer.prototype=new c.jqplot.TableLegendRenderer();c.jqplot.EnhancedLegendRenderer.prototype.constructor=c.jqplot.EnhancedLegendRenderer;c.jqplot.EnhancedLegendRenderer.prototype.init=function(d){this.numberRows=null;this.numberColumns=null;this.seriesToggle="normal";this.seriesToggleReplot=false;this.disableIEFading=true;c.extend(true,this,d);if(this.seriesToggle){c.jqplot.postDrawHooks.push(b)}};c.jqplot.EnhancedLegendRenderer.prototype.draw=function(m,y){var f=this;if(this.show){var r=this._series;var u;var w="position:absolute;";w+=(this.background)?"background:"+this.background+";":"";w+=(this.border)?"border:"+this.border+";":"";w+=(this.fontSize)?"font-size:"+this.fontSize+";":"";w+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";w+=(this.textColor)?"color:"+this.textColor+";":"";w+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";w+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";w+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";w+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=c('
');if(this.seriesToggle){this._elem.css("z-index","3")}var C=false,q=false,d,o;if(this.numberRows){d=this.numberRows;if(!this.numberColumns){o=Math.ceil(r.length/d)}else{o=this.numberColumns}}else{if(this.numberColumns){o=this.numberColumns;d=Math.ceil(r.length/this.numberColumns)}else{d=r.length;o=1}}var B,z,e,l,k,n,p,t,h,g;var v=0;for(B=r.length-1;B>=0;B--){if(o==1&&r[B]._stack||r[B].renderer.constructor==c.jqplot.BezierCurveRenderer){q=true}}for(B=0;B0){C=true}else{C=false}}else{if(B==d-1){C=false}else{C=true}}p=(C)?this.rowSpacing:"0";l=c(document.createElement("td"));l.addClass("jqplot-table-legend jqplot-table-legend-swatch");l.css({textAlign:"center",paddingTop:p});h=c(document.createElement("div"));h.addClass("jqplot-table-legend-swatch-outline");g=c(document.createElement("div"));g.addClass("jqplot-table-legend-swatch");g.css({backgroundColor:x,borderColor:x});l.append(h.append(g));k=c(document.createElement("td"));k.addClass("jqplot-table-legend jqplot-table-legend-label");k.css("paddingTop",p);if(this.escapeHtml){k.text(n)}else{k.html(n)}if(q){if(this.showLabels){k.prependTo(e)}if(this.showSwatches){l.prependTo(e)}}else{if(this.showSwatches){l.appendTo(e)}if(this.showLabels){k.appendTo(e)}}if(this.seriesToggle){var A;if(typeof(this.seriesToggle)==="string"||typeof(this.seriesToggle)==="number"){if(!c.jqplot.use_excanvas||!this.disableIEFading){A=this.seriesToggle}}if(this.showSwatches){l.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);l.addClass("jqplot-seriesToggle")}if(this.showLabels){k.bind("click",{series:u,speed:A,plot:y,replot:this.seriesToggleReplot},a);k.addClass("jqplot-seriesToggle")}if(!u.show&&u.showLabel){l.addClass("jqplot-series-hidden");k.addClass("jqplot-series-hidden")}}C=true}}v++}l=k=h=g=null}}return this._elem};var a=function(j){var i=j.data,m=i.series,k=i.replot,h=i.plot,f=i.speed,l=m.index,g=false;if(m.canvas._elem.is(":hidden")||!m.show){g=true}var e=function(){if(k){var n={};if(c.isPlainObject(k)){c.extend(true,n,k)}h.replot(n);if(g&&f){var d=h.series[l];if(d.shadowCanvas._elem){d.shadowCanvas._elem.hide().fadeIn(f)}d.canvas._elem.hide().fadeIn(f);d.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+d.index).hide().fadeIn(f)}}else{var d=h.series[l];if(d.canvas._elem.is(":hidden")||!d.show){if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).addClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).addClass("jqplot-series-hidden")}}else{if(typeof h.options.legend.showSwatches==="undefined"||h.options.legend.showSwatches===true){h.legend._elem.find("td").eq(l*2).removeClass("jqplot-series-hidden")}if(typeof h.options.legend.showLabels==="undefined"||h.options.legend.showLabels===true){h.legend._elem.find("td").eq((l*2)+1).removeClass("jqplot-series-hidden")}}}};m.toggleDisplay(j,e)};var b=function(){if(this.legend.renderer.constructor==c.jqplot.EnhancedLegendRenderer&&this.legend.seriesToggle){var d=this.legend._elem.detach();this.eventCanvas._elem.after(d)}}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.json2.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function($){$.jqplot.JSON=window.JSON;if(!window.JSON){$.jqplot.JSON={}}function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;ib.max||b.max==null){b.max=f[c][1]}}}else{for(var c=0;cb.max||b.max==null){b.max=f[c][2]}}}};a.jqplot.OHLCRenderer.prototype.draw=function(A,N,j){var J=this.data;var v=this._xaxis.min;var z=this._xaxis.max;var l=0;var K=J.length;var p=this._xaxis.series_u2p;var G=this._yaxis.series_u2p;var D,E,f,M,F,n,O,C;var y;var u=this.renderer;var s=(j!=undefined)?j:{};var k=(s.shadow!=undefined)?s.shadow:this.shadow;var B=(s.fill!=undefined)?s.fill:this.fill;var c=(s.fillAndStroke!=undefined)?s.fillAndStroke:this.fillAndStroke;u.bodyWidth=(s.bodyWidth!=undefined)?s.bodyWidth:u.bodyWidth;u.tickLength=(s.tickLength!=undefined)?s.tickLength:u.tickLength;A.save();if(this.show){var m,q,g,Q,t;for(var D=0;Dq){if(u.wickColor){y.color=u.wickColor}else{if(u.downBodyColor){y.color=u.downBodyColor}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,q]],f);u.shapeRenderer.draw(A,[[m,t],[m,Q]],f);y={};M=q;F=t-q;if(u.fillDownBody){y.fillRect=true}else{y.strokeRect=true;n=n-this.lineWidth;O=m-n/2}if(u.downBodyColor){y.color=u.downBodyColor;y.fillStyle=u.downBodyColor}C=[O,M,n,F]}else{if(u.wickColor){y.color=u.wickColor}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,[[m,g],[m,Q]],f);y={};y.fillRect=false;y.strokeRect=false;O=[m-n/2,q];M=[m+n/2,t];n=null;F=null;C=[O,M]}}f=a.extend(true,{},s,y);u.shapeRenderer.draw(A,C,f)}else{E=s.color;if(u.openColor){s.color=u.openColor}if(!u.hlc){u.shapeRenderer.draw(A,[[m-u._tickLength,q],[m,q]],s)}s.color=E;if(u.wickColor){s.color=u.wickColor}u.shapeRenderer.draw(A,[[m,g],[m,Q]],s);s.color=E;if(u.closeColor){s.color=u.closeColor}u.shapeRenderer.draw(A,[[m,t],[m+u._tickLength,t]],s);s.color=E}}}A.restore()};a.jqplot.OHLCRenderer.prototype.drawShadow=function(b,d,c){};a.jqplot.OHLCRenderer.checkOptions=function(d,c,b){if(!b.highlighter){b.highlighter={showMarker:false,tooltipAxes:"y",yvalues:4,formatString:'
date:%s
open:%s
hi:%s
low:%s
close:%s
'}}}})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.pointLabels.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this._labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=-5;this.formatter=c.jqplot.DefaultTickFormatter;this.formatString="";this.hideZeros=false;this._elems=[];c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(j,h,f,g,i){var e=c.extend(true,{},f,g);e.pointLabels=e.pointLabels||{};if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"&&!e.pointLabels.location){e.pointLabels.location="e"}this.plugins.pointLabels=new c.jqplot.PointLabels(e.pointLabels);this.plugins.pointLabels.setLabels.call(this)};c.jqplot.PointLabels.prototype.setLabels=function(){var f=this.plugins.pointLabels;var h;if(f.seriesLabelIndex!=null){h=f.seriesLabelIndex}else{if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"){h=(this._plotData[0].length<3)?0:this._plotData[0].length-1}else{h=(this._plotData.length===0)?0:this._plotData[0].length-1}}f._labels=[];if(f.labels.length===0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){for(var e=0;eB||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery); -------------------------------------------------------------------------------- /lib/jqplot/plugins/jqplot.trendline.min.js: -------------------------------------------------------------------------------- 1 | /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com 2 | jsDate | (c) 2010-2013 Chris Leonello 3 | */(function(f){f.jqplot.Trendline=function(){this.show=f.jqplot.config.enablePlugins;this.color="#666666";this.renderer=new f.jqplot.LineRenderer();this.rendererOptions={marker:{show:false}};this.label="";this.type="linear";this.shadow=true;this.markerRenderer={show:false};this.lineWidth=1.5;this.shadowAngle=45;this.shadowOffset=1;this.shadowAlpha=0.07;this.shadowDepth=3;this.isTrendline=true};f.jqplot.postSeriesInitHooks.push(e);f.jqplot.postDrawSeriesHooks.push(g);f.jqplot.addLegendRowHooks.push(a);function a(k){var j=null;if(k.trendline&&k.trendline.show){var i=k.trendline.label.toString();if(i){j={label:i,color:k.trendline.color}}}return j}function e(m,k,j,i,l){if(this._type&&(this._type==="line"||this._type=="bar")){this.trendline=new f.jqplot.Trendline();i=i||{};f.extend(true,this.trendline,{color:this.color},j.trendline,i.trendline);this.trendline.renderer.init.call(this.trendline,null)}}function g(m,i){i=f.extend(true,{},this.trendline,i);if(this.trendline&&i.show){var k;var l=i.data||this.data;k=c(l,this.trendline.type);var j=i.gridData||this.renderer.makeGridData.call(this,k.data);this.trendline.renderer.draw.call(this.trendline,m,j,{showLine:true,shadow:this.trendline.shadow})}}function b(w,v,n){var u=(n==null)?"linear":n;var s=w.length;var t;var z;var o=0;var m=0;var r=0;var q=0;var l=0;var j=[];var k=[];if(u=="linear"){k=w;j=v}else{if(u=="exp"||u=="exponential"){for(var p=0;p4 vane search'}, 4 | {spiderType: '3 vane', diffractionPattern: '6 spikes in an hexagonal pattern', description: '3 vanes spaced at 120 degree angles', strength: 'slightly less diffraction than 4 vanes', weakness: '6 spikes vs 4 spikes for the 4 vane spider; susceptibility for large heavy diagonals to quiver because of weak torsional resistance', examples: '3 vane search'}, 5 | {spiderType: 'bar', diffractionPattern: 'single bright spike stretching away from stars like outstretched hands', description: 'a single thick bar stretching from one side of the tube to the other', strength: 'easy to manufacture and mount', weakness: 'greater overall diffraction', examples: 'Coulter telescope single bar spider'}, 6 | {spiderType: 'single stalk', diffractionPattern: 'single spike stretching away from stars like outstretched hands', description: 'a single stalk from edge of tube to diagonal holder', strength: 'easy to make', weakness: 'can bend', examples: '12.5 inch F6 with single stalk spider'}, 7 | {spiderType: 'curved 3 vane spider', diffractionPattern: 'a smear of light around stars', description: '3 vane spider only with curved vanes', strength: 'when the vanes are highly curved, there is hardly any diffraction spikes', weakness: 'smeared light around stars', examples: 'curved 3 vane search'}, 8 | {spiderType: 'curved single vane', diffractionPattern: 'a smear of light around stars', description: 'a single vane spider that is curved', strength: 'wehn the van is highly curved, there is hardly any dffraction spie', weakness: 'smeared light around stars', examples: 'a curved single vane spider'}, 9 | {spiderType: 'V', diffractionPattern: 'two spikes at the angle of the V', description: 'shaped like the letter V', strength: 'robust and strong', weakness: 'typically more overall diffraction than a single stalk', examples: 'V shaped spider on a 14 inch with a shadow V spider for guiding'}, 10 | {spiderType: 'wire spider', diffractionPattern: 'essentially none', description: 'wires, typically 8 incount, used to suspect the diagonal and holder', strength: 'lack of diffraction', weakness: 'complex to build; needs jig to center diagonal holder while wiring', examples: 'wire spider on a 25 inch'}, 11 | {spiderType: '', diffractionPattern: '', description: '', strength: '', weakness: '', examples: ''} 12 | ] 13 | }; 14 | -------------------------------------------------------------------------------- /lib/json/tubeTypes.js: -------------------------------------------------------------------------------- 1 | MLB.tubeTypesJson = { 2 | 'tubeTypes': [ 3 | {tubeType: 'Solid', numberOfTrusses: 'na', localSeeingIssues: 'Must cool down mirror; insulate metal tubes', engineeringNotes: 'Round tubes available in many materials; can be octagonal or hexagonal; may be heavy in larger sizes; keep round at the ends; can be thought of as a single hollow truss tube with internal optics', examples: '8 inch Dob
10 inch hexagonal'}, 4 | {tubeType: 'Bay', numberOfTrusses: 'na', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Can be cut from solid tube; can use wires', examples: 'McDonald Observatory 82 inch
Lassell 48 inch'}, 5 | {tubeType: 'One truss', numberOfTrusses: '1', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Single truss must be quite stiff', examples: 'Ross Sackett travelscopes
Cambridge LiteScope
Bob Cox folding Cassegrain'}, 6 | {tubeType: 'A-frame', numberOfTrusses: '2', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Be careful of torque that twists the focuser board', examples: '12 inch A frame Dob'}, 7 | {tubeType: 'Two truss - one side', numberOfTrusses: '2', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Be careful of torque that twists the focuser board', examples: 'Peter Pekurar 12 inch Hobbit telescope'}, 8 | {tubeType: 'Two truss, two sides', numberOfTrusses: '2', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Diagonal holder is typically a single strut from one truss tube to the other', examples: 'ZipDob J frame'}, 9 | {tubeType: 'Three straight truss', numberOfTrusses: '3', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'See Albert Highes book', examples: 'DobStuff telescopes'}, 10 | {tubeType: 'Four straight truss', numberOfTrusses: '4', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Similar to three straight trusses', examples: 'Greg Babcock travel scope
Teleport collapsable telescope'}, 11 | {tubeType: 'Six truss', numberOfTrusses: '6', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Similar to 8 truss designs but need wider base to prevent tubes from intruding into light path', examples: '20.5 inch TriDod'}, 12 | {tubeType: 'Eight truss', numberOfTrusses: '8', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Truss tube connectors are critical', examples: '20.5 inch computerized altazimuth'}, 13 | {tubeType: 'String (conventional)', numberOfTrusses: '6', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Portland, Oregon is a hotbed of string telescopes', examples: 'String scopes
Ken Lulay\'s string scope'}, 14 | {tubeType: 'Tensegrity (string+rod)', numberOfTrusses: '6', localSeeingIssues: 'Exposed diagonal can dew', engineeringNotes: 'Invented by Don Peckham; amazingly strong design', examples: 'Don Peckham Tensegrity telescopes'} 15 | ] 16 | }; 17 | -------------------------------------------------------------------------------- /lib/lens CG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/lens CG.jpg -------------------------------------------------------------------------------- /lib/lockwood 42 inch f3.75 54 pt support.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/lockwood 42 inch f3.75 54 pt support.jpg -------------------------------------------------------------------------------- /lib/magnitudeCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2013-2021 2 | 3 | 'use strict'; 4 | 5 | MLB.magnitudeCalc = {}; 6 | 7 | MLB.magnitudeCalc.calcUsingPercent = function () { 8 | var magDecimals = 2, 9 | percent = +$('input[name=percent]').val(), 10 | roundToDecimal = MLB.sharedLib.roundToDecimal, 11 | getMagnitudeFromIllum = MLB.calcLib.getMagnitudeFromIllum, 12 | magDiff = -getMagnitudeFromIllum(percent / 100); 13 | 14 | $('input[name=magOutPercent]').val(roundToDecimal(magDiff, magDecimals)); 15 | }; 16 | 17 | MLB.magnitudeCalc.calcUsingAperture = function () { 18 | var magDecimals = 2, 19 | aperture1 = +$('input[name=aperture1]').val(), 20 | aperture2 = +$('input[name=aperture2]').val(), 21 | roundToDecimal = MLB.sharedLib.roundToDecimal, 22 | magnitudeDifferenceBetweenApertures = MLB.calcLib.magnitudeDifferenceBetweenApertures, 23 | magDiff = -magnitudeDifferenceBetweenApertures(aperture1, aperture2); 24 | 25 | $('input[name=magOutAperture]').val(roundToDecimal(magDiff, magDecimals)); 26 | }; 27 | 28 | MLB.magnitudeCalc.addMagnitudes = function () { 29 | var magDecimals = 2, 30 | magnitude1 = +$('input[name=magnitude1]').val(), 31 | magnitude2 = +$('input[name=magnitude2]').val(), 32 | roundToDecimal = MLB.sharedLib.roundToDecimal, 33 | adddMagnitudes = MLB.calcLib.addMagnitudes, 34 | combinedMagnitude = adddMagnitudes(magnitude1, magnitude2); 35 | 36 | $('input[name=combinedMagnitude]').val(roundToDecimal(combinedMagnitude, magDecimals)); 37 | }; 38 | 39 | MLB.magnitudeCalc.calcTotalMagnitude = function () { 40 | var magDecimals = 2, 41 | roundToDecimal = MLB.sharedLib.roundToDecimal, 42 | adddMagnitudes = MLB.calcLib.addMagnitudes, 43 | combinedMagnitude; 44 | 45 | combinedMagnitude = $('input[name=magnitudesToAdd]') 46 | .val() 47 | .split(/[ ,]+/) 48 | .filter(Number) 49 | .reduce((a, b) => adddMagnitudes(a, b)); 50 | 51 | $('input[name=totalMagnitude]').val(roundToDecimal(combinedMagnitude, magDecimals)); 52 | }; 53 | 54 | $(window).ready(function () { 55 | var btnCalcPercent = $('#btnCalcPercent')[0], 56 | btnCalcAperture = $('#btnCalcAperture')[0], 57 | btnAddMagnitudes = $('#btnAddMagnitudes')[0], 58 | btnCalcTotalMagnitude = $('#btnCalcTotalMagnitude')[0], 59 | calcUsingPercent = MLB.magnitudeCalc.calcUsingPercent, 60 | calcUsingAperture = MLB.magnitudeCalc.calcUsingAperture, 61 | addMagnitudes = MLB.magnitudeCalc.addMagnitudes, 62 | calcTotalMagnitude = MLB.magnitudeCalc.calcTotalMagnitude; 63 | 64 | // event hookups/subscribes 65 | btnCalcPercent.onclick = function () { 66 | calcUsingPercent(); 67 | }; 68 | btnCalcAperture.onclick = function () { 69 | calcUsingAperture(); 70 | }; 71 | btnAddMagnitudes.onclick = function () { 72 | addMagnitudes(); 73 | }; 74 | btnCalcTotalMagnitude.onclick = function () { 75 | calcTotalMagnitude(); 76 | }; 77 | 78 | calcUsingPercent(); 79 | calcUsingAperture(); 80 | addMagnitudes(); 81 | }); 82 | 83 | // end of file -------------------------------------------------------------------------------- /lib/matrix initialization errors.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/matrix initialization errors.xls -------------------------------------------------------------------------------- /lib/meniscusMirrorMakingClass.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2023 2 | 3 | 'use strict'; 4 | 5 | MLB.meniscusMirrorMakingClass = {}; 6 | 7 | // form passes itself via this.form ('this' is the input element and 'form' is its surrounding form) 8 | 9 | MLB.meniscusMirrorMakingClass.calculateMirrorWeight = (form) => { 10 | var roundToDecimal = MLB.sharedLib.roundToDecimal, 11 | isMeniscus = form.chBoxIsMeniscus.checked, 12 | weight = MLB.calcLib.calcMirrorWeight(form.mirrorDia.value, form.focalRatio.value, form.edgeThickness.value, isMeniscus); 13 | 14 | form.results.value = roundToDecimal(weight, 1) + ' pounds'; 15 | }; 16 | 17 | MLB.meniscusMirrorMakingClass.calculateToolVolume = (form) => { 18 | var roundToDecimal = MLB.sharedLib.roundToDecimal, 19 | volume = MLB.calcLib.calcToolVolume(form.mirrorDia.value, form.focalRatio.value, form.plasterThickness.value); 20 | 21 | form.results.value = roundToDecimal(volume, 0) + ' cubic inches'; 22 | }; 23 | 24 | MLB.meniscusMirrorMakingClass.calcSphereToParabolaDifference = (form) => { 25 | var mirrorDia = form.mirrorDia.value, 26 | focalRatio = form.focalRatio.value, 27 | diff = MLB.calcLib.calcSphereParabolaDifference(mirrorDia, focalRatio); 28 | 29 | form.results.value = diff; 30 | }; 31 | 32 | MLB.meniscusMirrorMakingClass.calcSagittaSpherical = (form) => { 33 | var roundToDecimal = MLB.sharedLib.roundToDecimal, 34 | mirrorDia = form.mirrorDia.value, 35 | focalRatio = form.focalRatio.value, 36 | sagitta = MLB.calcLib.calcSagittaSpherical(mirrorDia, focalRatio); 37 | 38 | form.sagitta.value = roundToDecimal(sagitta, 3) + ' inches';; 39 | }; 40 | 41 | MLB.meniscusMirrorMakingClass.calcFocalRatioAndFocalLength = (form) => { 42 | var roundToDecimal = MLB.sharedLib.roundToDecimal, 43 | mirrorDia = form.mirrorDia.value, 44 | sagitta = form.sagitta.value, 45 | focalRatio = MLB.calcLib.calcFocalRatio(mirrorDia, sagitta), 46 | focalLength = mirrorDia * focalRatio; 47 | 48 | form.focalRatio.value = 'f/' + roundToDecimal(focalRatio, 2) + '; focal length = ' + roundToDecimal(focalLength, 2) + ' inches'; 49 | }; 50 | 51 | // end of file -------------------------------------------------------------------------------- /lib/mirror cell 54 pt support naming.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/mirror cell 54 pt support naming.jpg -------------------------------------------------------------------------------- /lib/motorLib.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2014 2 | // see motorLib unitTests.htm for unit tests; also the motor calculator, motorCalc.htm 3 | // turn on jslint's Tolerate ++ and -- 4 | 5 | 'use strict'; 6 | 7 | MLB.motorLib = {}; 8 | 9 | MLB.motorLib.drive = function () { 10 | this.name = undefined; 11 | this.speedReductions = []; 12 | this.totalReduction = undefined; 13 | }; 14 | 15 | MLB.motorLib.driveBuilder = function (name) { 16 | var drive = new MLB.motorLib.drive(); 17 | drive.name = name; 18 | return drive; 19 | }; 20 | 21 | MLB.motorLib.addReduction = function (drive, name, reduction) { 22 | if (!isNaN(reduction)) { 23 | drive.speedReductions.push({name: name, reduction: reduction}); 24 | MLB.motorLib.calcTotalReduction(drive); 25 | } 26 | }; 27 | 28 | MLB.motorLib.calcTotalReduction = function (drive) { 29 | var ix, 30 | speedReductionsLength = drive.speedReductions.length; 31 | 32 | drive.totalReduction = 1; 33 | for (ix = 0; ix < speedReductionsLength; ix++) { 34 | drive.totalReduction *= drive.speedReductions[ix].reduction; 35 | } 36 | }; 37 | 38 | MLB.motorLib.calcMotorEncoderTicksPerArcsec = function (drive) { 39 | return drive.totalReduction * MLB.sharedLib.uom.arcsecToRev; 40 | }; 41 | 42 | MLB.motorLib.calcRPMs = function (drive, driveAngularSpeedDegreesPerSecond) { 43 | var ix, 44 | speedReductionsLength = drive.speedReductions.length, 45 | runningReduction = 1, 46 | rpms = []; 47 | 48 | for (ix = speedReductionsLength - 1; ix > -1; ix--) { 49 | runningReduction *= drive.speedReductions[ix].reduction; 50 | // 'x' deg/sec * 1 rev/360deg * 60 sec/min = x/6 rev/min (rpms) 51 | rpms[ix] = driveAngularSpeedDegreesPerSecond / 6 * runningReduction; 52 | } 53 | return rpms; 54 | }; 55 | 56 | MLB.motorLib.calcTotalReductionUnitsPerSec = function (drive, driveAngularSpeedDegreesPerSecond) { 57 | // 'x' deg/sec * 1 rev/360deg = x/360 rev/sec 58 | return driveAngularSpeedDegreesPerSecond / 360 * drive.totalReduction; 59 | }; 60 | 61 | MLB.motorLib.calcMaxSlewSpeedDegSec = function (drive, maxMotorRPM) { 62 | // eg, maxMotorRPM = 1800; 1800rpm * 1min/60sec = 30rps; 30rps * 10,000 encoder ticks/motorRev = 300,000 encoder ticks/sec; 300,000 encoder ticks/sec * 1296000 arcsec/totalReduction(ticks/rev of 37800000) = 10285.714285714286 arcsec/sec; 10285.714285714286 arcsec/sec * 1deg/3600arcsec = 2.857142857142857 deg/sec 63 | // constant of 6 derived from 1min/60sec * 1296000arcsec/rev * 1deg/3600arcsec = 6 min-deg/sec-rev 64 | // or 1800 motorRev/min * 10,000 encoder ticks/motorRev / totalReduction(ticks/rev of 37800000) * 6 min-deg/sec-rev = 2.8571428571428568 65 | // uoms: motorRev-ticks-rev-min-deg/min-motorRev-ticks-sec-rev = deg/sec 66 | // alternatively, return maxMotorRPM / 60 * drive.speedReductions[0].reduction / MLB.sharedLib.uom.arcsecToRev / drive.totalReduction / 3600; 67 | return maxMotorRPM * drive.speedReductions[0].reduction / drive.totalReduction * 6; 68 | }; 69 | 70 | // end of file 71 | -------------------------------------------------------------------------------- /lib/objectContrastCalc.js: -------------------------------------------------------------------------------- 1 | /*global 2 | MLB,$,window,document 3 | */ 4 | /*jslint 5 | this, for 6 | */ 7 | 8 | // copyright Mel Bartels, 2018-2020 9 | 10 | 'use strict'; 11 | 12 | MLB.objectContrastCalc = {}; 13 | 14 | MLB.objectContrastCalc.util = { 15 | magnitudeDecimalPlaces: 2, 16 | contrastResultDecimalPlaces: 1, 17 | magnificationDecimalPlaces: 0, 18 | 19 | objMPAS: function () { 20 | return $('[name=objMPAS]'); 21 | }, 22 | objMag: function () { 23 | return $('[name=objMag]'); 24 | }, 25 | objSize1: function () { 26 | return $('[name=objSize1]'); 27 | }, 28 | objSize2: function () { 29 | return $('[name=objSize2]'); 30 | }, 31 | skyMPAS: function () { 32 | return $('[name=skyMPAS]'); 33 | }, 34 | ccntrastResult: function () { 35 | return $('[name=ccntrastResult]'); 36 | }, 37 | btnCalcObjectMPAS: function () { 38 | return $('input[id=btnCalcObjectMPAS]'); 39 | }, 40 | btnCalcContrast: function () { 41 | return $('input[id=btnCalcContrast]'); 42 | }, 43 | objMPASVal: function () { 44 | return +this.objMPAS().val(); 45 | }, 46 | objMagVal: function () { 47 | return +this.objMag().val(); 48 | }, 49 | objSize1Val: function () { 50 | return +this.objSize1().val(); 51 | }, 52 | objSize2Val: function () { 53 | return +this.objSize2().val(); 54 | }, 55 | skyMPASVal: function () { 56 | return +this.skyMPAS().val(); 57 | } 58 | }; 59 | 60 | MLB.objectContrastCalc.calcObjectMPAS = function () { 61 | var util = MLB.objectContrastCalc.util, 62 | uom = MLB.sharedLib.uom, 63 | getMagnitudeFromIllum = MLB.calcLib.getMagnitudeFromIllum, 64 | roundToDecimal = MLB.sharedLib.roundToDecimal, 65 | magDrop = getMagnitudeFromIllum(uom.sqrArcminToSqrArcsec * util.objSize1Val() * util.objSize2Val()); 66 | 67 | util.objMPAS().val(roundToDecimal(util.objMagVal() - magDrop, util.magnitudeDecimalPlaces)); 68 | }; 69 | 70 | MLB.objectContrastCalc.calcContrast = function () { 71 | var util = MLB.objectContrastCalc.util, 72 | getMagnitudeFromIllum = MLB.calcLib.getMagnitudeFromIllum, 73 | getIllumFromMagnitude = MLB.calcLib.getIllumFromMagnitude, 74 | roundToDecimal = MLB.sharedLib.roundToDecimal, 75 | objMPAS = util.objMPASVal(), 76 | skyMPAS = util.skyMPASVal(), 77 | objectPlusSkyMPAS = getMagnitudeFromIllum(getIllumFromMagnitude(objMPAS) + getIllumFromMagnitude(skyMPAS)), 78 | // ex: object=24.5 MPAS, sky=21.5 MPAS, obj+sky=21.43 MPAS; 21.43 contrast to 21.5 = MPAS difference of 0.24 MPAS or 106% compared to background (=1=100%) or 6% difference 79 | contrast = getIllumFromMagnitude(objectPlusSkyMPAS - skyMPAS) - 1, 80 | objectSize1 = util.objSize1Val(), 81 | objectSize2 = util.objSize2Val(), 82 | largestObjectSize = objectSize1 > objectSize2 83 | ? objectSize1 84 | : objectSize2, 85 | magnificationFiveDegApparentSize = 300 / largestObjectSize, 86 | magnificationHundredDegApparentSize = 6000 / largestObjectSize; 87 | 88 | if (magnificationFiveDegApparentSize < 1) { 89 | magnificationFiveDegApparentSize = 1; 90 | } 91 | if (magnificationHundredDegApparentSize < 1) { 92 | magnificationHundredDegApparentSize = 1; 93 | } 94 | 95 | util.ccntrastResult().html('Object = ' 96 | + roundToDecimal(objMPAS, util.magnitudeDecimalPlaces) 97 | + ' MPAS
sky = ' 98 | + roundToDecimal(skyMPAS, util.magnitudeDecimalPlaces) 99 | + ' MPAS
object+sky = ' 100 | + roundToDecimal(objectPlusSkyMPAS, util.magnitudeDecimalPlaces) 101 | + ' MPAS
Contrast of object+sky to sky = ' 102 | + roundToDecimal(contrast * 100, util.contrastResultDecimalPlaces) 103 | + '% difference.
Magnification needed for 5 degree apparent size = ' 104 | + roundToDecimal(magnificationFiveDegApparentSize, util.magnificationDecimalPlaces) 105 | + 'X; for 100 degree apparent size = ' 106 | + roundToDecimal(magnificationHundredDegApparentSize, util.magnificationDecimalPlaces) 107 | + 'X.'); 108 | }; 109 | 110 | $(window).ready(function () { 111 | var util = MLB.objectContrastCalc.util, 112 | calcObjectMPAS = MLB.objectContrastCalc.calcObjectMPAS, 113 | calcContrast = MLB.objectContrastCalc.calcContrast; 114 | 115 | // event hookups/subscribes 116 | util.btnCalcObjectMPAS().click(calcObjectMPAS); 117 | util.btnCalcContrast().click(calcContrast); 118 | 119 | calcObjectMPAS(); 120 | calcContrast(); 121 | }); 122 | 123 | // end of file -------------------------------------------------------------------------------- /lib/pitch lap calc examples.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/pitch lap calc examples.jpg -------------------------------------------------------------------------------- /lib/precessionCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2013-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.precessionCalc = {}; 6 | 7 | MLB.precessionCalc.precessionCalcState = { 8 | position: new MLB.coordLib.Position() 9 | }; 10 | 11 | MLB.precessionCalc.calc = function () { 12 | var RA, 13 | Dec, 14 | fromYear, 15 | toYear, 16 | RARadians, 17 | DecRadians, 18 | precession, 19 | limitToHundredthsArcsec = true, 20 | limitToTenthsArcsec = true, 21 | convertRadiansToHMSMString = MLB.coordLib.convertRadiansToHMSMString, 22 | convertRadiansToDMSMString = MLB.coordLib.convertRadiansToDMSMString, 23 | dateTodayString = MLB.coordLib.dateTodayString, 24 | calcPrecessionRigorous = MLB.coordLib.calcPrecessionRigorous, 25 | parseCoordinateGetValueInRadians = MLB.coordLib.parseCoordinateGetValueInRadians; 26 | 27 | if ($('input[name=toYear]').val() === '') { 28 | $('input[name=toYear]').val(new Date().getFullYear()); 29 | } 30 | 31 | // set vars from user input using jquery; 32 | // fromYear is a number, the rest are strings 33 | RA = $('input[name=RA]').val(); 34 | Dec = $('input[name=Dec]').val(); 35 | fromYear = +$('input[name=fromYear]').val(); 36 | toYear = +$('input[name=toYear]').val(); 37 | 38 | RARadians = parseCoordinateGetValueInRadians(RA, true).radians; 39 | DecRadians = parseCoordinateGetValueInRadians(Dec).radians; 40 | 41 | precession = calcPrecessionRigorous(RARadians, DecRadians, fromYear, toYear - fromYear); 42 | 43 | $('input[name=RAout]').val(convertRadiansToHMSMString(RARadians + precession.deltaRA, limitToHundredthsArcsec)); 44 | $('input[name=Decout]').val(convertRadiansToDMSMString(DecRadians + precession.deltaDec, limitToTenthsArcsec)); 45 | }; 46 | 47 | $(window).ready(function () { 48 | var btnPrecess = $('input[id=btnPrecess]'), 49 | calc = MLB.precessionCalc.calc; 50 | 51 | // event hookups/subscribes 52 | btnPrecess.click(function () { 53 | calc(); 54 | }); 55 | 56 | calc(); 57 | }); 58 | 59 | // end of file -------------------------------------------------------------------------------- /lib/refractionCalc.js: -------------------------------------------------------------------------------- 1 | // copyright Mel Bartels, 2011-2014 2 | 3 | 'use strict'; 4 | 5 | MLB.refractionCalc = {}; 6 | 7 | MLB.refractionCalc.plot = function () { 8 | var elevation, 9 | refractionPoint, 10 | series, 11 | seriesLabels, 12 | seriesLabel = MLB.sharedLib.seriesLabel, 13 | uom = MLB.sharedLib.uom, 14 | calcRefractionFromTrue = MLB.coordLib.calcRefractionFromTrue; 15 | 16 | series = []; 17 | refractionPoint = []; 18 | for (elevation = 0; elevation <= 90; elevation++) { 19 | refractionPoint.push([calcRefractionFromTrue(elevation) / uom.arcminToRad, elevation]); 20 | } 21 | series.push(refractionPoint); 22 | // build the series labels 23 | seriesLabels = [seriesLabel('refraction')]; 24 | 25 | // plot it, include replot 26 | $.jqplot.config.enablePlugins = true; 27 | $.jqplot('refractionChart', series, { 28 | title: 'Plot of refraction for elevation', 29 | legend: { 30 | show: true, 31 | placement: 'outsideGrid' 32 | }, 33 | axes: { 34 | xaxis: { 35 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 36 | label: 'refraction (arc minutes)', 37 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 38 | numberTicks: 9, 39 | max: 40, 40 | min: 0 41 | }, 42 | yaxis: { 43 | tickRenderer: $.jqplot.CanvasAxisTickRenderer, 44 | label: 'elevation (degrees)', 45 | labelRenderer: $.jqplot.CanvasAxisLabelRenderer, 46 | numberTicks: 10, 47 | max: 90, 48 | min: 0 49 | } 50 | }, 51 | series: seriesLabels 52 | }).replot(); 53 | }; 54 | 55 | $(window).ready(function () { 56 | MLB.refractionCalc.plot(); 57 | }); 58 | 59 | // end of file 60 | -------------------------------------------------------------------------------- /lib/rotational vectors test example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/rotational vectors test example.jpg -------------------------------------------------------------------------------- /lib/sharedLib.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/sharedLib.js -------------------------------------------------------------------------------- /lib/slumpingCalc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/slumpingCalc.js -------------------------------------------------------------------------------- /lib/threeAxisLib unitTests.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QUnit test for threeAxisLib.js 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 | 26 | 27 | 86 | 87 | -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/Underscore Test Suite_files/chaining.js.download: -------------------------------------------------------------------------------- 1 | (function() { 2 | var _ = typeof require == 'function' ? require('..') : window._; 3 | 4 | QUnit.module('Chaining'); 5 | 6 | test('map/flatten/reduce', function() { 7 | var lyrics = [ 8 | 'I\'m a lumberjack and I\'m okay', 9 | 'I sleep all night and I work all day', 10 | 'He\'s a lumberjack and he\'s okay', 11 | 'He sleeps all night and he works all day' 12 | ]; 13 | var counts = _(lyrics).chain() 14 | .map(function(line) { return line.split(''); }) 15 | .flatten() 16 | .reduce(function(hash, l) { 17 | hash[l] = hash[l] || 0; 18 | hash[l]++; 19 | return hash; 20 | }, {}).value(); 21 | equal(counts.a, 16, 'counted all the letters in the song'); 22 | equal(counts.e, 10, 'counted all the letters in the song'); 23 | }); 24 | 25 | test('select/reject/sortBy', function() { 26 | var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 27 | numbers = _(numbers).chain().select(function(n) { 28 | return n % 2 === 0; 29 | }).reject(function(n) { 30 | return n % 4 === 0; 31 | }).sortBy(function(n) { 32 | return -n; 33 | }).value(); 34 | deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers'); 35 | }); 36 | 37 | test('select/reject/sortBy in functional style', function() { 38 | var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; 39 | numbers = _.chain(numbers).select(function(n) { 40 | return n % 2 === 0; 41 | }).reject(function(n) { 42 | return n % 4 === 0; 43 | }).sortBy(function(n) { 44 | return -n; 45 | }).value(); 46 | deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers'); 47 | }); 48 | 49 | test('reverse/concat/unshift/pop/map', function() { 50 | var numbers = [1, 2, 3, 4, 5]; 51 | numbers = _(numbers).chain() 52 | .reverse() 53 | .concat([5, 5, 5]) 54 | .unshift(17) 55 | .pop() 56 | .map(function(n){ return n * 2; }) 57 | .value(); 58 | deepEqual(numbers, [34, 10, 8, 6, 4, 2, 10, 10], 'can chain together array functions.'); 59 | }); 60 | 61 | test('splice', function() { 62 | var instance = _([1, 2, 3, 4, 5]).chain(); 63 | deepEqual(instance.splice(1, 3).value(), [1, 5]); 64 | deepEqual(instance.splice(1, 0).value(), [1, 5]); 65 | deepEqual(instance.splice(1, 1).value(), [1]); 66 | deepEqual(instance.splice(0, 1).value(), [], '#397 Can create empty array'); 67 | }); 68 | 69 | test('shift', function() { 70 | var instance = _([1, 2, 3]).chain(); 71 | deepEqual(instance.shift().value(), [2, 3]); 72 | deepEqual(instance.shift().value(), [3]); 73 | deepEqual(instance.shift().value(), [], '#397 Can create empty array'); 74 | }); 75 | 76 | test('pop', function() { 77 | var instance = _([1, 2, 3]).chain(); 78 | deepEqual(instance.pop().value(), [1, 2]); 79 | deepEqual(instance.pop().value(), [1]); 80 | deepEqual(instance.pop().value(), [], '#397 Can create empty array'); 81 | }); 82 | 83 | test('chaining works in small stages', function() { 84 | var o = _([1, 2, 3, 4]).chain(); 85 | deepEqual(o.filter(function(i) { return i < 3; }).value(), [1, 2]); 86 | deepEqual(o.filter(function(i) { return i > 2; }).value(), [3, 4]); 87 | }); 88 | 89 | test('#1562: Engine proxies for chained functions', function() { 90 | var wrapped = _(512); 91 | strictEqual(wrapped.toJSON(), 512); 92 | strictEqual(wrapped.valueOf(), 512); 93 | strictEqual(+wrapped, 512); 94 | strictEqual(wrapped.toString(), '512'); 95 | strictEqual('' + wrapped, '512'); 96 | }); 97 | 98 | }()); 99 | -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/Underscore Test Suite_files/cross-document.js.download: -------------------------------------------------------------------------------- 1 | (function() { 2 | if (typeof document == 'undefined') return; 3 | 4 | var _ = typeof require == 'function' ? require('..') : window._; 5 | 6 | QUnit.module('Cross Document'); 7 | /* global iObject, iElement, iArguments, iFunction, iArray, iError, iString, iNumber, iBoolean, iDate, iRegExp, iNaN, iNull, iUndefined, ActiveXObject */ 8 | 9 | // Setup remote variables for iFrame tests. 10 | var iframe = document.createElement('iframe'); 11 | iframe.frameBorder = iframe.height = iframe.width = 0; 12 | document.body.appendChild(iframe); 13 | var iDoc = (iDoc = iframe.contentDocument || iframe.contentWindow).document || iDoc; 14 | iDoc.write( 15 | [ 16 | '' 32 | ].join('\n') 33 | ); 34 | iDoc.close(); 35 | 36 | test('isEqual', function() { 37 | 38 | ok(!_.isEqual(iNumber, 101)); 39 | ok(_.isEqual(iNumber, 100)); 40 | 41 | // Objects from another frame. 42 | ok(_.isEqual({}, iObject), 'Objects with equivalent members created in different documents are equal'); 43 | 44 | // Array from another frame. 45 | ok(_.isEqual([1, 2, 3], iArray), 'Arrays with equivalent elements created in different documents are equal'); 46 | }); 47 | 48 | test('isEmpty', function() { 49 | ok(!_([iNumber]).isEmpty(), '[1] is not empty'); 50 | ok(!_.isEmpty(iArray), '[] is empty'); 51 | ok(_.isEmpty(iObject), '{} is empty'); 52 | }); 53 | 54 | test('isElement', function() { 55 | ok(!_.isElement('div'), 'strings are not dom elements'); 56 | ok(_.isElement(document.body), 'the body tag is a DOM element'); 57 | ok(_.isElement(iElement), 'even from another frame'); 58 | }); 59 | 60 | test('isArguments', function() { 61 | ok(_.isArguments(iArguments), 'even from another frame'); 62 | }); 63 | 64 | test('isObject', function() { 65 | ok(_.isObject(iElement), 'even from another frame'); 66 | ok(_.isObject(iFunction), 'even from another frame'); 67 | }); 68 | 69 | test('isArray', function() { 70 | ok(_.isArray(iArray), 'even from another frame'); 71 | }); 72 | 73 | test('isString', function() { 74 | ok(_.isString(iString), 'even from another frame'); 75 | }); 76 | 77 | test('isNumber', function() { 78 | ok(_.isNumber(iNumber), 'even from another frame'); 79 | }); 80 | 81 | test('isBoolean', function() { 82 | ok(_.isBoolean(iBoolean), 'even from another frame'); 83 | }); 84 | 85 | test('isFunction', function() { 86 | ok(_.isFunction(iFunction), 'even from another frame'); 87 | }); 88 | 89 | test('isDate', function() { 90 | ok(_.isDate(iDate), 'even from another frame'); 91 | }); 92 | 93 | test('isRegExp', function() { 94 | ok(_.isRegExp(iRegExp), 'even from another frame'); 95 | }); 96 | 97 | test('isNaN', function() { 98 | ok(_.isNaN(iNaN), 'even from another frame'); 99 | }); 100 | 101 | test('isNull', function() { 102 | ok(_.isNull(iNull), 'even from another frame'); 103 | }); 104 | 105 | test('isUndefined', function() { 106 | ok(_.isUndefined(iUndefined), 'even from another frame'); 107 | }); 108 | 109 | test('isError', function() { 110 | ok(_.isError(iError), 'even from another frame'); 111 | }); 112 | 113 | if (typeof ActiveXObject != 'undefined') { 114 | test('IE host objects', function() { 115 | var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); 116 | ok(!_.isNumber(xml)); 117 | ok(!_.isBoolean(xml)); 118 | ok(!_.isNaN(xml)); 119 | ok(!_.isFunction(xml)); 120 | ok(!_.isNull(xml)); 121 | ok(!_.isUndefined(xml)); 122 | }); 123 | 124 | test('#1621 IE 11 compat mode DOM elements are not functions', function() { 125 | var fn = function() {}; 126 | var xml = new ActiveXObject('Msxml2.DOMDocument.3.0'); 127 | var div = document.createElement('div'); 128 | 129 | // JIT the function 130 | var count = 200; 131 | while (count--) { 132 | _.isFunction(fn); 133 | } 134 | 135 | equal(_.isFunction(xml), false); 136 | equal(_.isFunction(div), false); 137 | equal(_.isFunction(fn), true); 138 | }); 139 | } 140 | 141 | }()); -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/Underscore Test Suite_files/placeholder.html: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/Underscore Test Suite_files/saved_resource.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/a_documentcloud_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/underscore/Underscore.js_files/a_documentcloud_project.png -------------------------------------------------------------------------------- /lib/underscore/Underscore.js_files/underscore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/lib/underscore/Underscore.js_files/underscore.png -------------------------------------------------------------------------------- /magnitude.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Magnitude Calculator 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 |
19 | Percent transmission 20 | 21 | % = 22 | 23 | 24 | change in magnitude. 25 |
26 | 27 |
28 | 29 |
30 | Compare aperture of 31 | 32 | to aperture of 33 | 34 | = 35 | 36 | 37 | change in magnitude. 38 |
39 | 40 |
41 | 42 |
43 | Add magnitude of 44 | 45 | to magnitude of 46 | 47 | = 48 | 49 | 50 | combined magnitude. 51 |
52 | 53 |
54 | 55 |
56 | Enter a series of magnitudes to add (can be space delimited or comma delimited) 57 | 58 | 59 | 60 |
61 | 62 |
63 | 64 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /objectLib.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Object Description Decoder 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 |
18 |
19 | Shorthand object description 20 | 21 | 22 | translates to 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 |
31 | Load SAC CSV file by clicking the button to browse or dragging the file onto the button...
32 | 33 |
34 | ...or drag and drop the file here. 35 |
36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /precession.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/precession.html -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | This code comprises a series of calculators (see Calculators.html). 2 | 3 | The working webpage is at http://bbastrodesigns.com/Calculators.html. 4 | 5 | Mel Bartels -------------------------------------------------------------------------------- /refraction.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Refraction Calculator 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | Interpreting the chart:
16 |
17 | Plots refraction versus elevation in degrees. Refraction causes the object to appear higher in the sky than they are in reality. When the Sun sets, we see it touch the horizon when it has already set.
18 |
19 | Mel Bartels 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /sagitta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Sagitta Calculator 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 20 | 21 | 22 | 25 | 28 | 29 | 30 | 33 | 36 | 39 | 40 | 41 | 44 | 47 | 50 | 51 | 52 | 55 | 58 | 61 | 62 | 63 | 66 | 69 | 72 | 73 | 74 | 77 | 80 | 82 | 83 | 84 | 87 | 90 | 91 | 92 | 95 | 98 | 99 |
16 | 17 |

Sagitta Calculator

18 |
19 |
23 | Mirror diameter = 24 | 26 | 27 |
31 | Mirror focal length = 32 | 34 | 35 | 37 | 38 |
42 | Mirror focal ratio = 43 | 45 | 46 | 48 | 49 |
53 | Sagitta (parabolic) = 54 | 56 | 57 | 59 | 60 |
64 | Sagitta (spherical) = 65 | 67 | 68 | 70 | 71 |
75 | Sphere parabola difference = 76 | 78 | 79 | 81 |
85 | Sagittal volume = 86 | 88 | 89 |
93 | Rotating furnace RPM = 94 | 96 | 97 |
100 | 101 |
102 |
103 |
104 | Notes:
105 |
106 | Calculates parabolic and spherical sagitta from mirror diameter and either mirror focal length or mirror focal ratio.
107 |
108 | The difference between the sagitta of a spherical and parabolic curve is very small and is typically ignored. In fact, it is the amount that the center needs to be deepened to bring the mirror from spherical to paraboloidal (though the most common method of parabolizing deepends the center somewhat and deepens the edge somewhat, splitting the difference).
109 |
110 | The waves of correction uses inches as the unit of measurement. If you are using another unit of measurement, then convert. For instance, if entering values in millimeters, then divide the resulting waves of correction by 25.4.
111 |
112 | Curious how fast a table needs to rotate so that gravity forms a parabola? The calculation expects the focal length in inches.
113 |
114 | Mel Bartels 115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /scopeToSky.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MelBartels/AstronomyCalculatorsJavaScript/063dc5c497f50157b480cfedf68dc6eb66d25c59/scopeToSky.html -------------------------------------------------------------------------------- /slumpingCalc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Mirror Slumping Calculator 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 21 | 22 | 23 | 26 | 29 | 30 | 31 | 34 | 37 | 38 | 39 | 43 | 44 | 45 | 50 | 51 | 52 |
16 | 17 | Mirror Slumping Calculator
18 |
19 |
20 |
24 | Mirror diameter = 25 | 27 | 28 |
32 | Focal ratio = 33 | 35 | 36 |
40 |
41 |
42 |
46 | 47 | This browser does not support the canvas element. Please use a more recent browser. 48 | 49 |
53 |
54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 |
62 |
63 |
64 | Interpreting the plot:
65 |
66 | When a flat piece of glass is slumped, it is bent over a mold. This slightly reduces the effective or entrance aperture. This calculator displays the precise effective aperture, needed in CAD applications. The edge also bends outward, creating a slight angle. This edge angle is also noted. The sagitta is the spherical sagitta, the depth at the center of the mirror. This differs slightly from the parabolic sagitta, the mirror depth necessary for a particular radius of curvature for a parabolic primary.
67 |
68 | The equation is simple: effectiveAperture = mirrorDiameter * focalRatio * 4 * Sin(1 / (4 * focalRatio)). The '1/(4*focalRatio)' is half the angle that the mirror subtends from the radius of curvature and is also the edge angle from the mirror center line.
69 |
70 | Mel Bartels 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /telescopeCriteriaCalc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Please travel here for my improved Newtonian Telescope Designer with better workflow and user interface. 10 | 11 | -------------------------------------------------------------------------------- /trajectory.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Trajectory Calculator 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 36 | 39 | 40 | 41 | 44 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | 60 | 63 | 64 | 65 | 69 | 70 | 71 |
18 | 19 | Trajectory Calculator
20 |
21 |
22 |
26 | Initial distance between positions = 27 | 29 | 30 |
34 | Initial velocity of the first position = 35 | 37 | 38 |
42 | Velocity of the second position = 43 | 45 | 46 |
50 | Maximum possible velocity = 51 | 53 | 54 |
58 | Acceleration = 59 | 61 | 62 |
66 |
67 |
68 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | Notes:
79 |
80 | This calculator finds the quickest trajectory that concludes coincident to the target trajectory, that is, concluding on the target with the target's speed. The target trajectory is assumed to move at constant speed. The chase trajectory is a trapezoidal trajectory with constant acceleration, deceleration and a maximum speed.
81 |
82 | In the 1990s I wanted to add satellite tracking to my computerized telescope. It is not easy to slew across the sky to precisely center a fast moving satellite in the eyepiece. I found a paper on radio telescopes that had math on trajectory matching but was clearly wrong. Deriving the correct math was a modest but interesting exercise. Details on the derivation and the Javascript functions can be found at http://www.bbastrodesigns.com/lib/trajLib.js. Corresponding unit tests can be found at http://www.bbastrodesigns.com/lib/trajLib%20unitTests.htm.
83 |
84 | Mel Bartels 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | --------------------------------------------------------------------------------