Hi everyone!
I’m quite new to both python and java, therefore I apologize in advance if my questions are going to be too trivial.
Let me first state the problem in order to give you and intuitive understanding of what I’m doing: basically, I’m working on the development of a tool for coverage analysis. The idea is to have the ephemeris of the spacecraft as input, from here model the footprint of the payload (which is ideally a SAR antenna) and see which points of my discretized Earth map (done previously with rHEALPix) will fall within the footprint; from here, analyze the data in order to get the revisit time, gap time and other relevant parameters.
Now, let’s get to the point. I have modelled the SAR footprint with “DoubleDihedraFieldOfView” as:
SARfov = DoubleDihedraFieldOfView(Vector3D.PLUS_K, Vector3D.PLUS_I, halfAperture1, Vector3D.PLUS_J, halfAperture2, fovMargin)
Then, obtain the footprint by following exactly the example given in the documentation as:
footPrintList = ArrayList()
def getFootPrint(EME2000, footPrintList, earth, angularStep, absDate, px, py, pz, vx, vy, vz):
position = Vector3D(px, py, pz)
velocity = Vector3D(vx, vy, vz)
absPVC = AbsolutePVCoordinates(EME2000, absDate, position, velocity)
scState = SpacecraftState(absPVC)
inertToBody = scState.getFrame().getTransformTo(earth.getBodyFrame(), scState.getDate())
fovToBody = Transform(scState.getDate(),
scState.toTransform().getInverse(),
inertToBody)
footPrintList.add(SARfov.getFootprint(fovToBody, earth, angularStep))
So far so good, and the results also seem to be quite sound. However, now I would like to access separately to the latitude and longitude. They are in the form:
[[[{lat: 39,6907985886 deg, lon: -66,2586228327 deg, alt: 0}, {lat: 42,2344991495 deg, lon: -79,5407962508 deg, alt: 0}, {lat: 40,9579292005 deg, lon: -79,8274133058 deg, alt: 0}, ...
And, if I check the type I get:
print(type(footPrintList))
<class 'java.util.ArrayList'>
print(type(footPrintList.get(0)))
<class 'java.lang.Object'>
I was actually expecting to access those data by using the methods getLatitude() and getLongitude(), for the GeodeticPoint class (as indicated in the documentation). But, as you can see, what I get is actually a List<Object (instead of List<List<GeodeticPoint). Hence, I’m not able to use those two methods to access the data I need.
Could you please tell me what I’m doing wrong, and how to fix this?
Thank you in advance