HashMap Python Wrapper

Hi all,

I am confused how to cast HashMap in Python wrapper. (This post suggest it is possible)

HashMap().of_(Type, Type)

I am not clear how above code works and appreciate if someone can explain it and give an example.
I am trying to implement a new measurement class. getOffsetToInertial method in the GroundStation class requires last parameter to be of type [Map]. The method does not accept a Python dictionary as an input. Following is my test code. gs is a GroundStation instance.

indices = {}
gs = stations[0]
offsetToInertialDownlink = gs.getOffsetToInertial(state.getFrame(), orekit_measurement_times[0],6,indices)

I would like the output of the getOffsetToInertial to be of type FieldTransform.

Thank you.

Hi @niluj,

Maybe you already solved it, but looking at the call it looks like it wants:
`` getOffsetToInertial(Frame inertial, AbsoluteDate clockDate, int freeParameters, Map<String,Integer> indices)

You can get the string and integer from
from java.lang import Integer, String

and then get a map by:

HashMap().of_(String, Integer)

I think, didn’t test :slight_smile:

Regards

Thank you very much. I will try and see how it goes. :slight_smile: