I just want to say firstly, I know that no one is making you help us here, so I want to thank you up front for your time!!
What I want to do is find out what roll angle is needed for a satellite to see a Topocentric frame. I’m having trouble figuring out how to find the roll angle from a satellite position to a Topocentric frame translated to the sat’s orbital frame. To determine the desired angle I have this (borrowed from the forums here):
LofOffset VVLH = new LofOffset(s.getFrame(), LOFType.VVLH); SpacecraftState converted = new SpacecraftState(s.getOrbit(), VVLH.getAttitude(s.getOrbit(), s.getDate(), s.getFrame())); TimeStampedPVCoordinates pv2 = converted.toTransform().transformPVCoordinates(farmFrame.getPVCoordinates(s.getDate(), s.getFrame())); double xAngleFromSpaceCraft = Vector3D.angle(pv2.getPosition(), Vector3D.PLUS_K);
From what I understand, this should give us an angle from the Topocentric frame to the z axis in the satellite’s orbital frame, which should be pointing towards the earth.
Right now, i’m triggering this code when the Topocentric frame triggers a field of view detector with a Nadir attitude. The angle I get appears to be off. Furthermore, when I make the field of view detector larger (like increasing the half-aperture angle) the ‘angle’ I get from the code above grows too. Is there a way to do what I am trying to do?
How should I be thinking about this problem?
Thanks again for your support on everything we space junkies try to do here.
Thank you for your time!!!