@hebcal/noaa 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -119,16 +119,19 @@ exports.GeoLocation = GeoLocation;
119
119
  /**
120
120
  * The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of
121
121
  * 34.478885263888294
122
+ * @private
122
123
  */
123
124
  const refraction = 34 / 60;
124
125
  // private double refraction = 34.478885263888294 / 60d;
125
126
  /**
126
127
  * The commonly used average solar radius in minutes of a degree.
128
+ * @private
127
129
  */
128
130
  const solarRadius = 16 / 60;
129
131
  /**
130
132
  * The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the
131
133
  * sunrise and sunset calculations. The value currently defaults to 6356.9 KM.
134
+ * @private
132
135
  */
133
136
  const earthRadius = 6356.9; // in KM
134
137
  /**
@@ -429,7 +432,7 @@ class NOAACalculator {
429
432
  }
430
433
  /**
431
434
  * Adjusts the <code>Calendar</code> to deal with edge cases where the location crosses the antimeridian.
432
- *
435
+ * @private
433
436
  * @see GeoLocation#getAntimeridianAdjustment()
434
437
  * @return the adjusted Calendar
435
438
  */
@@ -594,7 +597,7 @@ class NOAACalculator {
594
597
  }
595
598
  /**
596
599
  * A method that returns a <code>Date</code> from the time passed in as a parameter.
597
- *
600
+ * @protected
598
601
  * @param time
599
602
  * The time to be set as the time for the <code>Date</code>. The time expected is in the format: 18.75
600
603
  * for 6:45:00 PM.
@@ -633,7 +636,7 @@ class NOAACalculator {
633
636
  }
634
637
  /**
635
638
  * Return the <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> from a Java Calendar
636
- *
639
+ * @private
637
640
  * @param calendar
638
641
  * The Java Calendar
639
642
  * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days
@@ -656,7 +659,7 @@ class NOAACalculator {
656
659
  }
657
660
  /**
658
661
  * Convert <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> to centuries since J2000.0.
659
- *
662
+ * @private
660
663
  * @param julianDay
661
664
  * the Julian Day to convert
662
665
  * @return the centuries since 2000 Julian corresponding to the Julian Day
@@ -667,7 +670,7 @@ class NOAACalculator {
667
670
  }
668
671
  /**
669
672
  * Convert centuries since J2000.0 to <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a>.
670
- *
673
+ * @private
671
674
  * @param julianCenturies
672
675
  * the number of Julian centuries since J2000.0
673
676
  * @return the Julian Day corresponding to the Julian centuries passed in
@@ -678,7 +681,7 @@ class NOAACalculator {
678
681
  }
679
682
  /**
680
683
  * Returns the Geometric <a href="http://en.wikipedia.org/wiki/Mean_longitude">Mean Longitude</a> of the Sun.
681
- *
684
+ * @private
682
685
  * @param julianCenturies
683
686
  * the number of Julian centuries since J2000.0
684
687
  * @return the Geometric Mean Longitude of the Sun in degrees
@@ -695,7 +698,7 @@ class NOAACalculator {
695
698
  }
696
699
  /**
697
700
  * Returns the Geometric <a href="http://en.wikipedia.org/wiki/Mean_anomaly">Mean Anomaly</a> of the Sun.
698
- *
701
+ * @private
699
702
  * @param julianCenturies
700
703
  * the number of Julian centuries since J2000.0
701
704
  * @return the Geometric Mean Anomaly of the Sun in degrees
@@ -705,7 +708,7 @@ class NOAACalculator {
705
708
  }
706
709
  /**
707
710
  * Return the <a href="http://en.wikipedia.org/wiki/Eccentricity_%28orbit%29">eccentricity of earth's orbit</a>.
708
- *
711
+ * @private
709
712
  * @param julianCenturies
710
713
  * the number of Julian centuries since J2000.0
711
714
  * @return the unitless eccentricity
@@ -716,7 +719,7 @@ class NOAACalculator {
716
719
  }
717
720
  /**
718
721
  * Returns the <a href="http://en.wikipedia.org/wiki/Equation_of_the_center">equation of center</a> for the sun.
719
- *
722
+ * @private
720
723
  * @param julianCenturies
721
724
  * the number of Julian centuries since J2000.0
722
725
  * @return the equation of center for the sun in degrees
@@ -734,7 +737,7 @@ class NOAACalculator {
734
737
  }
735
738
  /**
736
739
  * Return the true longitude of the sun
737
- *
740
+ * @private
738
741
  * @param julianCenturies
739
742
  * the number of Julian centuries since J2000.0
740
743
  * @return the sun's true longitude in degrees
@@ -744,22 +747,9 @@ class NOAACalculator {
744
747
  const center = NOAACalculator.getSunEquationOfCenter(julianCenturies);
745
748
  return sunLongitude + center; // in degrees
746
749
  }
747
- // /**
748
- // * Returns the <a href="http://en.wikipedia.org/wiki/True_anomaly">true anamoly</a> of the sun.
749
- // *
750
- // * @param julianCenturies
751
- // * the number of Julian centuries since J2000.0
752
- // * @return the sun's true anamoly in degrees
753
- // */
754
- // private static double getSunTrueAnomaly(double julianCenturies) {
755
- // double meanAnomaly = getSunGeometricMeanAnomaly(julianCenturies);
756
- // double equationOfCenter = getSunEquationOfCenter(julianCenturies);
757
- //
758
- // return meanAnomaly + equationOfCenter; // in degrees
759
- // }
760
750
  /**
761
751
  * Return the apparent longitude of the sun
762
- *
752
+ * @private
763
753
  * @param julianCenturies
764
754
  * the number of Julian centuries since J2000.0
765
755
  * @return sun's apparent longitude in degrees
@@ -772,7 +762,7 @@ class NOAACalculator {
772
762
  }
773
763
  /**
774
764
  * Returns the mean <a href="http://en.wikipedia.org/wiki/Axial_tilt">obliquity of the ecliptic</a> (Axial tilt).
775
- *
765
+ * @private
776
766
  * @param julianCenturies
777
767
  * the number of Julian centuries since J2000.0
778
768
  * @return the mean obliquity in degrees
@@ -786,7 +776,7 @@ class NOAACalculator {
786
776
  /**
787
777
  * Returns the corrected <a href="http://en.wikipedia.org/wiki/Axial_tilt">obliquity of the ecliptic</a> (Axial
788
778
  * tilt).
789
- *
779
+ * @private
790
780
  * @param julianCenturies
791
781
  * the number of Julian centuries since J2000.0
792
782
  * @return the corrected obliquity in degrees
@@ -798,7 +788,7 @@ class NOAACalculator {
798
788
  }
799
789
  /**
800
790
  * Return the <a href="http://en.wikipedia.org/wiki/Declination">declination</a> of the sun.
801
- *
791
+ * @private
802
792
  * @param julianCenturies
803
793
  * the number of Julian centuries since J2000.0
804
794
  * @return
@@ -815,7 +805,7 @@ class NOAACalculator {
815
805
  /**
816
806
  * Return the <a href="http://en.wikipedia.org/wiki/Equation_of_time">Equation of Time</a> - the difference between
817
807
  * true solar time and mean solar time
818
- *
808
+ * @private
819
809
  * @param julianCenturies
820
810
  * the number of Julian centuries since J2000.0
821
811
  * @return equation of time in minutes of time
@@ -842,7 +832,7 @@ class NOAACalculator {
842
832
  /**
843
833
  * Return the <a href="http://en.wikipedia.org/wiki/Hour_angle">hour angle</a> of the sun at sunrise for the
844
834
  * latitude.
845
- *
835
+ * @private
846
836
  * @param lat
847
837
  * , the latitude of observer in degrees
848
838
  * @param solarDec
@@ -862,7 +852,7 @@ class NOAACalculator {
862
852
  * Returns the <a href="http://en.wikipedia.org/wiki/Hour_angle">hour angle</a> of the sun at sunset for the
863
853
  * latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid
864
854
  * duplication of code.
865
- *
855
+ * @private
866
856
  * @param lat
867
857
  * the latitude of observer in degrees
868
858
  * @param solarDec
@@ -935,7 +925,7 @@ class NOAACalculator {
935
925
  /**
936
926
  * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
937
927
  * of sunrise for the given day at the given location on earth
938
- *
928
+ * @private
939
929
  * @param julianDay
940
930
  * the Julian day
941
931
  * @param latitude
@@ -974,7 +964,7 @@ class NOAACalculator {
974
964
  * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
975
965
  * of <a href="http://en.wikipedia.org/wiki/Noon#Solar_noon">solar noon</a> for the given day at the given location
976
966
  * on earth.
977
- *
967
+ * @private
978
968
  * @param julianCenturies
979
969
  * the number of Julian centuries since J2000.0
980
970
  * @param longitude
@@ -996,7 +986,7 @@ class NOAACalculator {
996
986
  /**
997
987
  * Return the <a href="http://en.wikipedia.org/wiki/Universal_Coordinated_Time">Universal Coordinated Time</a> (UTC)
998
988
  * of sunset for the given day at the given location on earth
999
- *
989
+ * @private
1000
990
  * @param julianDay
1001
991
  * the Julian day
1002
992
  * @param latitude
@@ -1035,6 +1025,7 @@ class NOAACalculator {
1035
1025
  exports.NOAACalculator = NOAACalculator;
1036
1026
  /**
1037
1027
  * The zenith of astronomical sunrise and sunset. The sun is 90&deg; from the vertical 0&deg;
1028
+ * @private
1038
1029
  */
1039
1030
  NOAACalculator.GEOMETRIC_ZENITH = 90;
1040
1031
  /**
@@ -1057,9 +1048,11 @@ NOAACalculator.NAUTICAL_ZENITH = 102;
1057
1048
  NOAACalculator.ASTRONOMICAL_ZENITH = 108;
1058
1049
  /**
1059
1050
  * The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> of January 1, 2000
1051
+ * @private
1060
1052
  */
1061
1053
  NOAACalculator.JULIAN_DAY_JAN_1_2000 = 2451545;
1062
1054
  /**
1063
1055
  * Julian days per century
1056
+ * @private
1064
1057
  */
1065
1058
  NOAACalculator.JULIAN_DAYS_PER_CENTURY = 36525;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/noaa",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "sunrise and sunset via NOAA algorithm with elevation, based on KosherJava",
5
5
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
6
6
  "contributors": [
@@ -40,7 +40,7 @@
40
40
  "dist/*"
41
41
  ],
42
42
  "devDependencies": {
43
- "@types/node": "20.9.2",
43
+ "@types/node": "20.9.3",
44
44
  "gts": "^5.2.0",
45
45
  "typescript": "^5.3.2"
46
46
  },