52
52
/**
53
53
* This class calculates and emits astronomical values in an HTML table.
54
54
* For testing, the values are just written to stdout
55
- http://www.heavens-above.com/PassSummary.aspx?satid=25544&lat=30.891&lng=-98.4265&loc=Unspecified&alt=300&tz=CST
56
- http://stackoverflow.com/questions/4979836/domdocument-in-php/4983721#4983721
57
55
*/
58
56
class Stars_At_Night_Manager {
59
57
protected $ loader ;
@@ -130,7 +128,7 @@ public function enqueuestyles() {
130
128
* except for the first param which is the program name, and is ignored.
131
129
* Remaining params (order is unimportant):
132
130
* name=the name of the location to be calculated
133
- * lat=lattitude of location in fractional degrees (e.g. 30.8910). Positive is north, negative is south of equator
131
+ * lat=latitude of location in fractional degrees (e.g. 30.8910). Positive is north, negative is south of equator
134
132
* long=longitude of location in fractional degrees (e.g.-98.4265). Positive is east, negative is west of the UTC line
135
133
* timezone=timezone name, must be value recognized by php. See http://php.net/manual/en/timezones.php
136
134
* date=a date that php can parse. For the current day, use "now"
@@ -271,7 +269,7 @@ public function run_stars_at_night( $atts ) {
271
269
/**
272
270
* Validates the parameters sent by the user.
273
271
* @param $name the name of the location to be calculated
274
- * @param $lat lattitude of location in fractional degrees
272
+ * @param $lat latitude of location in fractional degrees
275
273
* @param $long longitude of location in fractional degrees
276
274
* @param $timezone timezone name, must be value recognized by php
277
275
* @param $date a date that php can parse
@@ -290,7 +288,7 @@ private function data_validator( $name, $lat, $long, $timezone, $date, $graphica
290
288
FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_ENCODE_AMP );
291
289
292
290
/**
293
- * lat must be valid fractional decimals +- 0-90
291
+ * lat must be valid fractional decimal [-90:90]
294
292
*/
295
293
if ( !is_numeric ( $ lat ) ) {
296
294
$ result .= " Latitude must be numeric. " ;
@@ -301,7 +299,7 @@ private function data_validator( $name, $lat, $long, $timezone, $date, $graphica
301
299
}
302
300
303
301
/**
304
- * long must be valid fractional decimal, +- 0-90
302
+ * long must be valid fractional decimal [-180:180]
305
303
*/
306
304
if ( !is_numeric ( $ long ) ) {
307
305
$ result .= " Longitude must be numeric. " ;
@@ -375,7 +373,7 @@ private function calculateTwilight( $today, $tzOffset, $sunTime, $delta ) {
375
373
private function display ($ name , $ lat , $ long , $ today , $ sunRise , $ sunSet , $ moonRise , $ moonSet , $ morningTwilight , $ eveningTwilight ) {
376
374
$ string =
377
375
'<div class="ngc2244_stars_at_night_css"> ' .
378
- '<bold> ' . $ name . ' ( ' .$ lat . ' ' . $ long . ') astronomical times for ' .
376
+ '<bold> ' . $ name . ' ( ' .$ lat . ', ' . $ long . ') astronomical times for ' .
379
377
$ today . '</bold> ' .
380
378
'<table> ' .
381
379
'<tr> ' .
0 commit comments