meeus 0.2.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

Meeus #

Selected algorithms from the book "Astronomical Algorithms" by Jean Meeus, following the second edition, copyright 1998, with corrections as of August 10, 2009.

This Dart library is port of the original Go code written by Sonia Keys and available at https://github.com/soniakeys/meeus. Many (in fact most) of the functions have not yet been ported. Pull requests of any functions and their tests ported will be gladly accepted.

Library organization #

Algorithms are implemented in separate libraries, one for each chapter of the book. There is also a library meeus which exports all the libraries. It is recommended to import only the libraries you need using the as keyword, as the names of functions are not always clear without knowing the library name. There is also a library "base" with additional functions that may not be described in the book but are useful with multiple other libraries.

Install #

See installation instructions on pub.dev

We recommend only importing the libraries you need:

import 'package:meeus/julian.dart' as julian;
import 'package:meeus/moonillum.dart' as moonillum;

All software in this repository is copyright Shawn Lauzon and licensed with the MIT license.

0.2.2 2020.05.20 #

  • Fix bug dateTimeToJD
  • Add test matcher CloseToAngle
  • Remove precision constants in test case
  • Rename test_utils.dart to matchers.dart

0.2.1 2020.05.09 #

  • Fix incorrectly named library

0.2.0 2020-05-09 #

  • Add apsis library
  • Add moonnode library

0.1.1 2020-05-01 #

  • Add example
  • Improve documentation

0.1.0 2020-05-01 #

  • Initial version

example/meeus_example.dart

import 'package:meeus/julian.dart' as julian;
import 'package:meeus/moonphase.dart' as moonphase;

void main() {
  final fullMoonJD = moonphase.full(2020);
  final date = julian.jdToDateTime(fullMoonJD);
  print('The full moon nearest to Jan 1, 2020 is ${date}');
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  meeus: ^0.2.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:meeus/meeus.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
36
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
unit ^1.0.1 1.0.3
Dev dependencies
pedantic ^1.8.0
test ^1.6.0