JuliaSpaceMissionDesign / Ephemerides.jl

A Modern Binary Ephemeris Reader for Julia, in Julia.
https://juliaspacemissiondesign.github.io/Ephemerides.jl/
MIT License
22 stars 1 forks source link

Fix segment times with overlapping boundaries #8

Closed MicheleCeresoli closed 1 year ago

MicheleCeresoli commented 1 year ago

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: