Added GM data for the Sun and planets.
Added some terse vector arithmetic operations.
Implemented MajorBodies acceleration functions.
Added longitudeOffset function.
Prevents crashes due to dereferencing NULL time pointers.
Passing in NULL for a `time` pointer will no longer cause
a crash in an Astronomy Engine function.
Wherever possible, a NULL time pointer will result in a
status code `ASTRO_INVALID_PARAMETER`.
`Astronomy_Horizon` has no way to report a status code,
so a null pointer causes it to return all NAN values.
Perhaps it should return a status code (considering for separate commit).
Thanks to [Steven Booth](https://github.com/sbooth) for suggesting this!
More low-level functions necessary to calculating Earth orientation.
iau2000b calculates nutation angles.
etilt calculates overall axial tilt of the Earth.
era calculates the Earth Rotation Angle.
I'm working toward implementing the GeoMoon function.
I added the following, which are all required to get to that point.
meanObliq
eclOblToEquVec
eclToEquVec
precessionRot
precession
RotateVector
Added the function CalendarFromDays, which converts a UT value to
a calendar date and time.
Added script `rungo` which is a shortcut for compiling and testing
changes to the Go source code template.
Added functions:
DegreesFromRadians
RadiansFromDegrees
AngleBetween
StateVector.Position
StateVector.Velocity
Changed existing functions to pass structs by value,
just like we do in the C code. This is a safety feature
to signal value semantics and a contract not to mutate the
argument state.
Run Go tests with the -v option to log more info about what's happening.
Added SVG logo for Go.
Added a table entry for Go examples, source, and documentation.
Sorted the language list in alphabetical order: moved Python last.
I need gomarkdoc to generate identical output whether
I run it locally or in GitHub Actions, to verify that the
build process is working correctly. Hopefully these options
will do the trick.
Following the standard comment format for documentation
comments in Go:
https://go.dev/doc/comment
Later we will figure out how to generate online documentation
from these comments.
In Go, all symbols should use PascalCase or camelCase.
Go programmers dislike ALL_UPPER_CASE_WITH_UNDERSCORES.
Use PascalCase for exported/public symbols, camelCase for internal/private symbols.
In general, we should follow the Go Style Guide:
https://google.github.io/styleguide/go/index
I recommend we more closely follow the implementation of the C# code
than the C code for figuring out how to name things.
The C# version of Astronomy Engine is a better reference because
Go allows quasi-object-oriented syntax and uses a similar preferred naming style.
We will use idiomatic error reporting and handling, as described here:
https://go.dev/blog/error-handling-and-go
I removed the "status" fields from all the structs, and deleted
the enumerated type astroStatus. I will add a custom error type later,
and report human-readable error messages as is preferred by Go programmers.