Skip to content

Commit

Permalink
V2 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
xclud committed Feb 6, 2024
1 parent 95f962e commit a591599
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [1.0.4]
## [2.0.0]

* Introduce Angle class.

Expand Down
6 changes: 3 additions & 3 deletions lib/src/julian.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Julian {
60.0)) /
24.0);

return Julian._(v);
return Julian._fromYearAndDoy(utc.year, v);
}

/// Initialize the Julian date object.
Expand All @@ -64,7 +64,7 @@ class Julian {
/// day = 1.0 Jan 1 00h
/// day = 1.5 Jan 1 12h
/// day = 2.0 Jan 2 00h
factory Julian.fromYearAndDoy(int year, double doy) {
factory Julian._fromYearAndDoy(int year, double doy) {
// Arbitrary years used for error checking
if (year < 1900 || year > 2100) {
throw Exception('Year (1900, 2100)');
Expand Down Expand Up @@ -193,7 +193,7 @@ class Julian {
final month = (E <= 13) ? (E - 1) : (E - 13);
final year = (month >= 3) ? (C - 4716) : (C - 4715);

final jdJan01 = Julian.fromYearAndDoy(year, 1.0);
final jdJan01 = Julian._fromYearAndDoy(year, 1.0);
final doy = value - jdJan01.value; // zero-relative
final r = doy - doy.floor();
final h = r / 24.0;
Expand Down
5 changes: 5 additions & 0 deletions lib/src/look_angle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ class LookAngle {

/// Distance.
final double range;

@override
String toString() {
return 'Azimuth: ${azimuth.degrees}°, Elevation: ${elevation.degrees}°, Range: ${range}';
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: latlng
description: GeoJSON, Geodesy and Geographical calculations for Dart. Provides LatLong and Mercator projection (EPSG4326).
version: 1.0.4
version: 2.0.0
repository: https://github.com/xclud/dart_latlng
homepage: https://pwa.ir

Expand Down

0 comments on commit a591599

Please sign in to comment.