Trouble with Ground Station Framing

Edit: I’m stupid and was being blind, got it figured out. Not sure how to delete this post but admins feel free to do so

I am trying to get line-of-sight windows for a ground station on a highly inclined orbit using an ElevationDetector, but the date timestamps it was giving were pretty far off (or non-existent) compared to two other sources that agreed. I am doing a propagation with a simple Keplerian Orbit.
I narrowed the problem down to my ground station, but I’m not exactly sure what is wrong with it. When I plot the station’s location in ECI over 24 hours I get a strangely elongated ellipse, much more than I would expect. The ground station’s location is orange and the orbit is in blue. Here are two views for perspective:

Hopefully that’s clear, I can post another view in the comments if needed. The ground plot is a horizontal ellipse while the orbit is near vertical.

Here is my code to define the earth and ground station:

    earthConventions = IERSConventions.IERS_2010
    earthRadius      = Constants.WGS84_EARTH_EQUATORIAL_RADIUS
    earthFlattening  = Constants.WGS84_EARTH_FLATTENING
    earthBodyFrame   = FramesFactory.getITRF(earthConventions, False)
    earthShape = OneAxisEllipsoid(earthRadius, earthFlattening, earthBodyFrame)
    earthShape = ReferenceEllipsoid.getWgs84(earthBodyFrame)
    earthMu    = Constants.WGS84_EARTH_MU
    gravity_provider = GravityFieldFactory.getNormalizedProvider(175, 175)
    gravity_model = HolmesFeatherstoneAttractionModel(earthBodyFrame, gravity_provider)
    from org.orekit.frames import TopocentricFrame
    from org.orekit.bodies import GeodeticPoint
    from org.orekit.estimation.measurements import GroundStation
    earthShape = earthparameters['earthShape']
    coordinates    = GeodeticPoint(radians(latitude), radians(longitude), altitude)
    ground_frame   = TopocentricFrame(earthShape, coordinates, 'Barrow')
    ground_station = GroundStation(ground_frame)
    ground = {
        'station': ground_station, 
        'frame': ground_frame
    }

And to convert the ground station coordinates for plotting I loop through the relevant times (every ~1 min for 24 hours) and call ground_frame.getPVCoordinates(date, FramesFactory.getGCRF())

I’m pretty lost about what the issue might be. Maybe I need a fresh set of eyes but I think the setup matches closely with given example code. Any tips would be greatly appreciated :slight_smile:

Hi @dbyrne,

Welcome to the forum!
There’s no dumb question here :slight_smile:
We can delete your post if you really want it. Or you can explain how you fixed the issue and mark the post as “resolved”. Maybe it will help someone else in the future :wink:

Cheers,
Maxime

I realized that at I was not equalizing the plot axes like I thought. One axis was elongated, but perpendicular to the orbit plot so it still appeared circular. So the ground station was actually propagating as expected.

But I did run into something interesting:
I was propagating with a TLE that I pulled from Celestrak, this was a day or two ago. But my calculated visibilities were wrong because the TLE strings were being interpreted incorrectly (I think). The time/date field of the TLE was something like ‘25132.41010948’ which is one or two days ago, but it was initializing the TLE object with a date in April, about a month earlier than it should have. So when I propagated out to the current day with SGP4 it wasn’t accurate anymore.

The problem is I can’t seem to recreate the issue… it’s working fine now at predicting ground station visibilities. Not sure what changed.