Skip to content

Commit 33faab4

Browse files
committed
Increases planetary diameter precision
Removes final rounding from computed apparent diameters so values are no longer quantized to 0.1, improving accuracy of graphs and visualizations for affected planets (Jupiter, Mercury, Venus, Mars, Neptune, Uranus, Saturn). Updates changelog to record the new version.
1 parent 8dbadf2 commit 33faab4

File tree

8 files changed

+12
-7
lines changed

8 files changed

+12
-7
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to `laravel-astronomy-library` will be documented in this file.
44

5+
## Version 6.5.1
6+
7+
Changed:
8+
- Increased diameter precision for planets by removing final rounding in `magnitude()` (reduces 0.1 quantization in graphs). Affected: Jupiter, Mercury, Venus, Mars, Neptune, Uranus, Saturn.
9+
510
## Version 6.5
611

712
Added:

src/deepskylog/AstronomyLibrary/Targets/Jupiter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3790,6 +3790,6 @@ public function calculateDiameter(Carbon $date)
37903790
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
37913791
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
37923792

3793-
$this->setDiameter(round(2 * 98.44 / $delta, 1));
3793+
$this->setDiameter(2 * 98.44 / $delta);
37943794
}
37953795
}

src/deepskylog/AstronomyLibrary/Targets/Mars.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5790,6 +5790,6 @@ public function calculateDiameter(Carbon $date)
57905790
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
57915791
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
57925792

5793-
$this->setDiameter(round(2 * 4.68 / $delta, 1));
5793+
$this->setDiameter(2 * 4.68 / $delta);
57945794
}
57955795
}

src/deepskylog/AstronomyLibrary/Targets/Mercury.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,6 @@ public function calculateDiameter(Carbon $date)
537537
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
538538
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
539539

540-
$this->setDiameter(round(2 * 3.36 / $delta, 1));
540+
$this->setDiameter(2 * 3.36 / $delta);
541541
}
542542
}

src/deepskylog/AstronomyLibrary/Targets/Neptune.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2233,6 +2233,6 @@ public function calculateDiameter(Carbon $date)
22332233
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
22342234
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
22352235

2236-
$this->setDiameter(round(2 * 33.50 / $delta, 1));
2236+
$this->setDiameter(2 * 33.50 / $delta);
22372237
}
22382238
}

src/deepskylog/AstronomyLibrary/Targets/Saturn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6120,6 +6120,6 @@ public function calculateDiameter(Carbon $date)
61206120
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
61216121
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
61226122

6123-
$this->setDiameter(round(2 * 82.73 / $delta, 1));
6123+
$this->setDiameter(2 * 82.73 / $delta);
61246124
}
61256125
}

src/deepskylog/AstronomyLibrary/Targets/Uranus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4296,6 +4296,6 @@ public function calculateDiameter(Carbon $date)
42964296
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
42974297
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
42984298

4299-
$this->setDiameter(round(2 * 35.02 / $delta, 1));
4299+
$this->setDiameter(2 * 35.02 / $delta);
43004300
}
43014301
}

src/deepskylog/AstronomyLibrary/Targets/Venus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,6 @@ public function calculateDiameter(Carbon $date)
20532053
$helio_coords_earth[2] * sin(deg2rad($helio_coords_earth[1]));
20542054
$delta = sqrt($x ** 2 + $y ** 2 + $z ** 2);
20552055

2056-
$this->setDiameter(round(2 * 8.34 / $delta, 1));
2056+
$this->setDiameter(2 * 8.34 / $delta);
20572057
}
20582058
}

0 commit comments

Comments
 (0)