Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Orekit Orekit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 103
    • Issues 103
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Orekit
  • OrekitOrekit
  • Issues
  • #786
Closed
Open
Created May 19, 2021 by Evan Ward@evanward1Developer

KeplerianOrbit has NaNs when constructed from PV computed from KeplerianOrbit

A colleague, Kendra Hale, tried creating a copy of a KeplerianOrbit using the TSPVC constructor and it fails to build a usable orbit. Seems to be a side effect of the code that guesses whether the user would like rates with their Keplerian elements. In this case hasNonKeplerianAcceleration() returns true when the acceleration is the Keplerian acceleration.

Failing test case:

    @Test
    public void testKeplerianToPvToKeplerian() {
        // setup
        Frame eci = FramesFactory.getGCRF();
        AbsoluteDate date = AbsoluteDate.ARBITRARY_EPOCH;
        double mu = Constants.EGM96_EARTH_MU;
        Orbit orbit = new KeplerianOrbit(6878e3, 0, 0, 0, 0, 0,
                PositionAngle.TRUE, eci, date, mu);

        // action
        KeplerianOrbit broken = new KeplerianOrbit(orbit.getPVCoordinates(), eci, mu);

        // verify
        assertThat(orbit.shiftedBy(1), CoreMatchers.is(broken.shiftedBy(1)));
    }

Output is:

java.lang.AssertionError: 
Expected: is <Keplerian parameters: {a: NaN; e: NaN; i: NaN; pa: NaN; raan: NaN; v: NaN;}>
     but: was <Keplerian parameters: {a: 6878000.0; e: 0.0; i: 0.0; pa: 0.0; raan: 0.0; v: 0.06341591497145493;}>
Edited May 19, 2021 by Evan Ward
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking