Giter Site home page Giter Site logo

juliaspacemissiondesign / ephemerides.jl Goto Github PK

View Code? Open in Web Editor NEW
17.0 0.0 0.0 16.01 MB

A Modern Binary Ephemeris Reader for Julia, in Julia.

Home Page: https://juliaspacemissiondesign.github.io/Ephemerides.jl/

License: MIT License

Julia 100.00%
astrodynamics calceph ephemerides ephemeris julia spice kernels

ephemerides.jl's People

Contributors

micheleceresoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ephemerides.jl's Issues

Loss of precision in time argument

When computing the MOON_PA orientation, a loss of precision in the time arguments arises when converting from TDB seconds since J2000 to TDB days since J2000.

CALCEPH and SPICE instead have exact results. MWE:

using Ephemerides 
using CalcephEphemeris
using JSMDInterfaces.Ephemeris
using Tempo 
using SPICE
using ReferenceFrameRotations

kernel =  "test/assets/moon_pa_de440_200625.bpc"

ephj = EphemerisProvider(kernel);
ephc = CalcephProvider(kernel);

et = rand(0.0:1e8)
et = 1.0

yj, yc = zeros(3), zeros(3)
ephem_orient!(yj, ephj, DJ2000, et/86400.0, 31008, 1, 0)
ephem_orient!(yc, ephc, DJ2000, et/86400.0, 31008, 1, 0)

yj2 = ephem_rotation3(ephj, 1, 31008, et)

A = DCM(pxform("J2000", "MOON_PA", et))
angs = dcm_to_angle(A, :ZXZ)

yj = mod.(yj, π)
yj2 = mod.(yj2, π)
yc = mod.(ys, π)
ys = mod.([angs.a1, angs.a2, angs.a3], π)

yj-yc
yj2-yc 

yj-ys
yj2-ys

yc-ys

# yj2 is more precise than yj!
yj2 - ys 
yj2 - yj

Update docstrings for SPK segment caches

The implementation of a public interface to retrieve the segment data (see #26) will require the user to know how that data is organized inside the Julia structures. Although the description of the segment caches will still be a low-level API, all the caches should be documented nonetheless.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Optimise record coefficients look-up time

For segments with unequal time intervals that have epoch directories, check whether it is worth to store the last loaded segment time boundaries, so that if they match the user requested time, you do not have to read through all the epochs to find the desired segment index.

Remove comment warning during package loading

A warning is thrown each time the package is loaded because one of the kernels in the artifacts does not have the EOT in the comment. Should temporarily disable the logging during precompilation to avoid showing that each time.

Fix segment times with overlapping boundaries

The get_segment_boundaries function doesn't merge the times when the start time of a descriptor equals the end time of another descriptor. Indeed, calling:

desclist = [
    Ephemerides.DAFSegmentDescriptor(2, 1.0, 1.6, 31008, 1, -1, 1, 1)
    Ephemerides.DAFSegmentDescriptor(2, 1.6, 2.0, 31008, 1, -1, 1, 1)
]

ts, te = Ephemerides.get_segment_boundaries(desclist)

Returns:

ts = [1.0, 1.6]
te = [1.6, 2.0]

To-Do:

  • Fix aformentioned bug
  • Add tests on these routines

Segment Cache Public Access and Handling

When segment caches are retrieved in the spk_vector functions, a copy of the original structure is made, such that when the segment cache is later inspected, it appears empty.

High-level interface functions to access segment data (i.e., the polynomial coefficients) should also be implemented.

Add support for SPK type 14

Implement support for SPK type 14 segments, that handle unequally-spaced Chebyshev polynomials. For tests, use the binary kernel available in CALCEPH test directory.

Assert SPK 15 test tolerances

Relative test tolerances on SPK Type 15 have been lowered to 1e-11 because they yield bigger differences for propagation times > ~3000s. A check is required to establish whether this difference is only due to numerical issues or because of some bugs in the algorithms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.