setInterpolationDegree in OEM Template

Hey Bryan,

I updated to 11.2 and it still isn’t update the field correctly. I’ve attached the section of my code that generates the state vectors and the OEM below.

    # Loop through the SVs and create a Cartesian orbit that is appended to a Java ArrayList   
    for time, x, y, z, x_vel, y_vel, z_vel in propagated_ephemeris.state_vectors[:, :]:
        position = Vector3D(x, y, z)
        velocity = Vector3D(x_vel, y_vel, z_vel)
        date = datetime_to_absolutedate(time)
        orbit = CartesianOrbit(TimeStampedPVCoordinates(date, position, velocity), FramesFactory.getEME2000(), Constants.WGS84_EARTH_MU)
        spacecraft_state = SpacecraftState(orbit)
        java_state_list.add(spacecraft_state)

    # Store ephemerides in an EphemerisFile for recall later on
    ephemeris_file = OrekitEphemerisFile()
    norad_java_int = Integer(object_id)
    satellite = ephemeris_file.addSatellite(norad_java_int.toString())
    satellite.addNewSegment(java_state_list)

    # Setup the OEM template
    header = Header(3.0)
    header.setCreationDate(datetime_to_absolutedate(dt.datetime.now()))
    template = OemMetadata(5) # This should set the default interpolation order to 5, however it does not. 
    template.addComment('This file was generated by {}'.format(gp.getuser()))
    template.setTimeSystem(TimeSystem.UTC)
    template.setObjectID(str(object_id))
    template.setObjectName(object_name)
    template.setCenter(BodyFacade('EARTH', CelestialBodyFactory.getCelestialBodies().getEarth()))
    template.setReferenceFrame(FrameFacade.map(FramesFactory.getEME2000()))
    template.setInterpolationDegree(5) # see comment on L132
    template.setInterpolationMethod(InterpolationMethod.LAGRANGE)


    # Begin writing the ephemeris to a Java string
    oem_string = StringWriter()
    writer = EphemerisWriter(WriterBuilder().buildOemWriter(), header, template, FileFormat.KVN, 'dummy', 60)
    writer.write(oem_string, ephemeris_file)