Commit Graph

151 Commits

Author SHA1 Message Date
Don Cross
e9f2be3b16 Fixed documentation typos regarding ECT. 2023-11-10 12:25:52 -05:00
Don Cross
6c3a7ab753 C#: Atmosphere, metersAboveGround in SearchRiseSet. 2023-03-12 11:17:47 -04:00
Don Cross
7bb9d02053 C#: Atmosphere function. 2023-03-11 20:23:20 -05:00
Don Cross
1de31cf21f C#: Implemented Observer.ToString(). 2023-02-26 17:08:07 -05:00
Don Cross
e7d48c6ea7 C#: Fixed bugs with calendar dates with extreme year values.
Fixed problems converting AstroTime to calendar dates and back.
Also expose struct CalendarDateTime to outside callers,
for convenience dealing with Gregorian calendar dates.
2023-02-25 20:23:41 -05:00
Don Cross
f3c211fadb C#: Added StateVector.ToString(). 2023-02-23 22:31:47 -05:00
Don Cross
410708e8b3 C#: Added AstroVector.ToString() function. 2023-02-23 22:06:12 -05:00
Don Cross
43c37c9038 C#: Implemented HourAngle function. 2023-02-12 13:05:29 -05:00
Don Cross
4256903060 Fixed #280 - corrected typo in documentation. 2023-01-23 17:50:13 -05:00
Don Cross
d4660de2a7 JS: Ecliptic function returns ECT instead of ECL. 2022-12-10 03:55:17 -05:00
Don Cross
47ce0ac34e C#: EquatorialToEcliptic now returns ECT instead of ECL. 2022-12-09 21:03:05 -05:00
Don Cross
f959599497 Completed EQJ/ECT, ECT/EQJ rotations. 2022-12-09 13:12:42 -05:00
Don Cross
1864fa8539 Orientation nomenclature. C: EQJ/ECT rotations.
More work standardizing the nomenclature of the
orientation systems across all language documents.

Added C functions to calculate rotation matrices
for EQJ/ECT and ECT/EQJ.
2022-12-08 22:03:43 -05:00
Don Cross
281180db24 Use consistent descriptions of EQJ, ECL.
Use consistent wording for these two orientation systems:
EQJ = J2000 mean equator
ECL = J2000 mean ecliptic
2022-12-08 16:16:41 -05:00
Don Cross
2dd4fc1ab4 Python: rotations for ECT/EQD. 2022-12-07 13:03:38 -05:00
Don Cross
8fe8b028f8 Added EQD/ECT rotation functions to C# topic index. 2022-12-06 20:05:46 -05:00
Don Cross
f043ebc62b C#: added rotation matrix functions for EQD/ECT. 2022-12-06 18:36:47 -05:00
Don Cross
742ab4cbff Define ECT in documentation.
Define ECT = True Ecliptic of Date in the documentation.
I will soon convert the Ecliptic() functions to return ECT instead of
ECL, but I will retain ECL support via rotation matrix functions.
2022-12-06 13:36:47 -05:00
Don Cross
552c7a5557 EclipticGeoMoon uses true equinox of date in all languages.
Added EclipticGeoMoon as output to the temp/*_check.txt files as 'm' lines.
This ensures that all the languages calculate nearly identical values.

Optimized EclipticGeoMoon a little more by eliminating a redundant
call to mean_obliq.
2022-12-05 21:44:35 -05:00
Don Cross
d3f36b942d Verify nutation angles are consistent across languages. 2022-12-04 14:20:44 -05:00
Don Cross
53b735a941 Fixed misspelled "ecliptic" in documentation. 2022-11-28 11:57:36 -05:00
Don Cross
5087e4df28 More documentation fixes for rise/set, altitude. 2022-11-27 13:56:51 -05:00
Don Cross
e12d2e88c6 Updated docs: SearchRiseSet, SearchAltitude.
The documentation for SearchRiseSet and SearchAltitude needed
clarification about refraction and the part of the body solved
for (center versus limb). The JavaScript version was especially
lacking compared to documentation for the other languages.

Also documented SearchAltitude's limitations; it does not
work at or near maximum/minimum altitude.

Mention that user-defined stars are allowed for
SearchRiseSet, SearchAltitude, and SearchHourAngle.

Fixed a couple places where the Kotlin documentation had
broken links to other functions.
2022-11-27 12:42:48 -05:00
Don Cross
1725c77c9f Fixed doc typos. JS HelioState user-defined stars.
I had a copy-n-paste typo in the `dec` parameters
for all of the DefineStar functions. Fixed it.

The TypeScript version of HelioState did not handle
user-defined stars. Added support there.
2022-11-23 12:01:34 -05:00
Don Cross
098eb3ac7a Optimized HelioDistance for user-defined stars.
Because we instantly know the heliocentric
distance of a user-defined star, there is no
need to convert it into a vector and then take
the length of the vector.
All of the HelioDistance functions now return
the distance directly, as an optimization.

Also, I decided it didn't make sense to have a
default definition for user-defined stars.
If the caller doesn't define a star, it should
be treated as an invalid body.
2022-11-23 11:16:56 -05:00
Don Cross
79f6eac8eb HelioState functions support user-defined stars. 2022-11-23 09:21:56 -05:00
Don Cross
a6ddf1880a C#: implemented user-defined stars. 2022-11-22 15:06:04 -05:00
Don Cross
4602f619d3 C: Rise/set that works near the poles!
This is a whole new algorithm that efficiently finds
all rise/set events, even near the poles.
It uses a recursive bisection search that limits
recursion depth by knowing the maximum possible
|da/dt| = change in altitude with respect to time.
2022-11-12 21:40:20 -05:00
Don Cross
fd49c25ae3 C#: exported function PlanetOrbitalPeriod. 2022-11-01 17:01:03 -04:00
Don Cross
f7787caf98 C#: solar eclipse obscuration and accuracy enhancements 2022-10-18 20:09:59 -04:00
Don Cross
c798c5015d C#: lunar eclipse obscuration 2022-10-18 16:21:15 -04:00
Don Cross
1327730324 C# AstroTime no longer limited to years 0000..9999.
The .NET type System.DateTime is limited to the years 0000..9999.
The Astronomy Engine type AstroTime was using System.DateTime to
convert a (year, month, day, hour, minute, second) tuple into a
fractional day value. This caused an exception for years outside
the supported range 0000..9999.

I ported the NOVAS C 3.1 functions julian_date and cal_date to C#,
and removed the dependence on System.DateTime.
Now we can create AstroTime for a much wider range of year values.
Allow converting AstroTime to string for years before 0 and after 9999.
2022-10-05 14:20:14 -04:00
Don Cross
cd3013eac9 C#: Reverse chrono search for rise/set, hour angles.
The following C# functions now support searching
in forward or reverse chronological order:

    Astronomy.SearchRiseSet
    Astronomy.SearchAltitude
    Astronomy.SearchHourAngle

Also fixed places where I forgot to update documentation
for the corresponding changes to the C code.
2022-09-29 02:54:13 -04:00
Don Cross
c6f0561363 C# SearchMoonPhase: allow searching backward in time.
Enhanced the C# function Astronomy.SearchMoonPhase
to allow searching forward in time when the `limitDays`
argument is positive, or backward in time when `limitDays`
is negative.

Added unit test "moon_reverse" to verify this new feature.
2022-09-26 19:34:22 -04:00
Don Cross
2a1abad0d5 Better use of package badges/links.
Provide shield.io badges for pypi, npm, and nuget packages.
On the main README page, moved the badges into the supported
languages grid.
Added link and badge on each language documentation page.
2022-06-05 12:42:00 -04:00
Don Cross
b7979cb7a0 Light travel correction: improved documentation. 2022-06-01 19:25:48 -04:00
Don Cross
9afbf0a67f Python: generalized light-travel correction. 2022-05-30 21:37:19 -04:00
Don Cross
765c39d3fa JS: generalized light-travel time correction. 2022-05-30 19:27:25 -04:00
Don Cross
0dd66c8981 C# light travel time correction
Implemented the generalized light travel time corrector for C#.
Reworked Astronomy.GeoVector to use it.
2022-05-29 21:17:25 -04:00
Don Cross
f94824a810 Fixed missing doc for C# GravititySimulator constructor.
The csdown utility was not generating the correct ID
string that matched the C# compiler's XML output file
when a parameter was of a generic type.

Because the GravitySimulator constructor has a bodyStates
parameter of type IEnumerable<StateVector>, we were not
generating the correct method ID string:

CosineKitty.GravitySimulator.#ctor(CosineKitty.Body,CosineKitty.AstroTime,System.Collections.Generic.IEnumerable{CosineKitty.StateVector})

This caused the constructor to not show up in the markdown docs.
I fixed this and now the constructor is documented.
2022-05-25 20:07:16 -04:00
Don Cross
edc27d550a C# docs: fixed link to StateVector[]. 2022-05-25 19:39:07 -04:00
Don Cross
f02658d63c More documentation fixes.
Corrected a mistake in the explanation of the
C function Astronomy_GravSimInit: the `bodyStates`
parameter is NOT barycentric -- it is relative to the
originBody parameter.

Python had improperly formatted documentation for
Time.FromTerrestrialTime parameter `tt`.

The Python markdown generator `pydown` did not
correctly handle links to compound symbols like
`#GravitySimulator.Update`. It also was trying
to link to `StateVector[]` instead of `StateVector`.

Removed unnecessary and unhelpful documentation
for C# internal class constructors. They do not appear
in the generated markdown documentation anyway.

Other minor wording revisions in the documentation.
2022-05-25 14:12:55 -04:00
Don Cross
4cd03e9a5f C# documentation generator fixes
The C# markdown generator (csdown) was not generating
documentation about constructors. This was especially
needed for the new GravitySimulator class.

Also added markdown for properties like
    GravitySimulator.NumSmallBodies
    GravitySimulator.Time

Made several constructors internal so they don't
need to be listed in the markdown docs.
2022-05-24 21:51:07 -04:00
Don Cross
9c65a27eb1 Improved documentation for gravity simulator.
Added mention of the gravity simulator in the topic
index sections of the markdown docs.
Slight wording changes here and there.
2022-05-23 21:54:00 -04:00
Don Cross
4303137c0a PY gravsim: initial coding completed
Finished coding the Python version of the gravity simulator.
No unit tests have been written yet.
Cleaned up documentation in the other languages.
Made some functions static that did not need to be members.
2022-05-22 09:41:44 -04:00
Don Cross
019a8f51d4 C# gravsim: first draft of GravitySimulator.Update
Wrote the C# version of GravitySimulator.Update.
Not yet tested.
2022-05-17 15:12:53 -04:00
Don Cross
6a5d04b825 C# gravsim: work in progress
Starting the C# version of class GravitySimulator.
There are no unit tests for it yet.

Added a fix to the C# markdown generator `csdown`
to show `void` as a function return type.
This is the first time I have had any function
in the C# version of Astronomy Engine that has
a void return type!

Fixed and improved documentation in the Kotlin version
of the gravity simulator. Fixed some comments too.
2022-05-17 10:31:42 -04:00
Don Cross
6abce518f6 C#: added iterator helper functions
Added the following iterator functions that wrap
search/next pairs of functions:

    GlobalSolarEclipsesAfter
    LocalSolarEclipsesAfter
    LunarApsidesAfter
    LunarEclipsesAfter
    MoonNodesAfter
    MoonQuartersAfter
    PlanetApsidesAfter
    TransitsAfter

I updated the following C# demos:

    moonphase.cs     ==> MoonQuartersAfter
    lunar_eclipse.cs ==> LunarEclipsesAfter

Fixed an issue in the C# Markdown generator
so that it can now handle generic types like
`IEnumerable<MoonQuarterInfo>`.
2022-05-07 13:02:42 -04:00
Don Cross
50c4099184 C#: Jupiter's moons returned by name
It makes more sense to report Jupiter's moons with
individually named structure fields rather than an array.
It reduces the overall code and documentation size,
and outside of unit testing, there are few cases
where iterating over an array of moons is more
lucid than using the names of the moons.

This is a breaking change, but hopefully very few
developers are using this function yet.
Fixing the breakage is very simple.
2022-05-05 11:38:55 -04:00
Don Cross
3ce32f8819 Kotlin: lunar libration. Fixes for other languages.
The existing lunar libration functions in the
other languages (C, C#, Python, JavaScript) were
calculating the Moon's ecliptic latitude and longitude
in radians, not degrees as intended. They have been fixed.

Implemented the libration function for Kotlin.
2022-04-22 16:36:14 -04:00