Hi,
I have been using Orekit via the Python Wrapper for a while, and it has been great. Thank you so much for keeping this community so active. I am currently trying to create a Walker Constellation and visualize all the orbits. I am having trouble accessing the orbit information from the list of WalkerConstellationSlot objects. I have attached my code below:
rE = Constants.WGS84_EARTH_EQUATORIAL_RADIUS # Earth Radius [meters]
muE = Constants.WGS84_EARTH_MU # m3/s2
J2000 = FramesFactory.getEME2000() # J2000 inertial frame
utc = TimeScalesFactory.getUTC() # Universal Coordinate Time [UTC]
# Define Starlink Parameters
initialEpoch = AbsoluteDate(2024, 9, 16, 10, 30, 00.000, utc) # UTC
massSL = 800.0 # kg
sma = rE + 550*1e3 # meters
ecc = 0.0 # unitless
inc = radians(53) # rad
argPeri = radians(0.0) # rad
RAAN = radians(0.0) # rad
trueAnom = radians(0.0) # rad
# Define Initial State
orbitSL = KeplerianOrbit(sma, ecc, inc, argPeri, RAAN, trueAnom, PositionAngleType.TRUE, J2000, initialEpoch, muE)
const = WalkerConstellation(30, 10, 1, WalkerConstellation.Pattern.DELTA)
refSlot = const.buildReferenceSlot(orbitSL)
regularSlots = const.buildRegularSlots(orbitSL)
# Extract the first plane of orbits
planeSlots = regularSlotsget(0)
firstSlot = planeSlot.get(0).getOrbit()
In this case, the regularSlots is a <List: [[org.orekit.orbits.WalkerConstellationSlot@75fc1992, org.orekit.orbits....]]>
object. Thus, the planeSlots
returns <Object: [org.orekit.orbits.WalkerConstellationSlot@129bd55d, org.orekit.orbits.WalkerConstellationSlot@7be7e15, org.orekit.orbits.WalkerConstellationSlot@3abfe845]>
when I expected it to return a List
of WalkerConstellationSlot
objects.
Can anyone help me access individual orbits? Do I need to cast the variables into a Python type somewhere here? Thank you so much!