• Stars
    star
    320
  • Rank 126,235 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementation of "Astronomical Algorithms" by Jean Meeus

Meeus

Build Status GoDoc Go Walker

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

Repository organization

The branch "master" has the current version. Tags exist with "semantic versions" with a three-part major.minor.fix format like v3.0.0. Older versions can be checked out by tag. Also a branch or branches should exist for older versions.

Beginning with v3.0.0, code will be organized as a vgo "module" in a subdirectory, named like v3 corresponding to the current major version.

Package organization

Package meeus is a documentation-only package. Algorithms are implemented in subdirectories under meeus, one for each chapter of the book. In addition there is a package "base" with additional functions that may not be described in the book but are useful with multiple other packages.

See meeus package documentation for a chapter title cross-reference.

Install

VSOP87

Routines of the planetposition package require "VSOP87" data files. These files should be available from public sources, for example VisieR. The files needed by planetposition are the VSOP87 "B" files. It is sufficient to download the eight files

VSOP87B.ear  VSOP87B.mar  VSOP87B.nep  VSOP87B.ura
VSOP87B.jup  VSOP87B.mer  VSOP87B.sat  VSOP87B.ven

There are no requirements on where you place these files in your file system but you may find it convenient to create a directory for them and set an environment variable VSOP87 to this directory.

Install package software with go get

Technically, go get github.com/soniakeys/meeus/... is sufficient.

The tests also require the sexagesimal package, so use the -t option to prompt go get to find it as a test dependency:

go get -t github.com/soniakeys/meeus/...

Tests

With all eight VSOP87 files dowloaded as described above, and with an environment variable set to their location, then from the meeus directory

go test ./...

works as usual to run all tests in all subdirectories of meeus.

To run all tests except for those requiring planet positions computed from the VSOP87 files, use

go test -tags nopp ./...

("nopp" for no planet positions)

Vgo

Experimentally, you can try vgo.

To run package tests, clone the repository -- anywhere! it doesn't have to be under GOPATH -- and from the cloned directory run

vgo test all

Vgo will fetch the sexagesimal test dependency as needed and run all package tests.

Copyright and license

All software in this repository is copyright Sonia Keys and licensed with the MIT license.

More Repositories

1

graph

Simple and fast graph library
Go
71
star
2

quant

An interface for image color quantizers.
Go
38
star
3

LittleBookOfSemaphores

A Go Language take on Allen Downey's Free Book "The Little Book of Semaphores"
Go
21
star
4

integer

Various integer routines, including computation of prime numbers and factorials.
Go
14
star
5

kdtree

K-d tree example code
Go
13
star
6

raycast

Ray casting point-in-polygon algorithm
Go
7
star
7

multiset

Map-based multisets
Go
6
star
8

graph2

Experiments with graph algorithms
Go
6
star
9

vlist

VList data structure
Go
5
star
10

bio

Bioinformatics algorithms
Go
5
star
11

astro

stuff generally useful in astronomy
Go
5
star
12

dlx-sudoku

Solves Sudoku puzzles using Knuth's DLX algorithm
Go
4
star
13

sexagesimal

Sexagesimal formatting
Go
3
star
14

nnls

Non-negative least squares
Go
3
star
15

cluster

A few clustering methods including K-Means++ and UPGMA
Go
3
star
16

accsum

Accurate floating point summation algorithms
Go
3
star
17

knight

Knight's tour solution by ant colony optimization
Go
3
star
18

tagheap

Interface-free heap API
Go
2
star
19

unit

Go
2
star
20

perm

Permutation generators
Go
2
star
21

abrev

Command abbreviation expander
Go
2
star
22

roman

Roman numeral parse and and format.
Go
2
star
23

coord

2D spherical coordinates and 3D cartesian coordinates
Go
2
star
24

vsop87

vsop87 computes planetaty positions using the standard VSOP87 files.
Go
2
star
25

mpcformat

Formats and conventions of the Minor Planet Center.
Go
1
star
26

mandelbrot

Mandelbrot set
Go
1
star
27

exit

Exit a program while both running deferred functions and returning an exit code
Go
1
star
28

lcg

A primitive linear congruential generator
Go
1
star
29

avl

AVL Tree
Go
1
star
30

subseq

Subsequence functions
Go
1
star