How to determine whether the satellite is in the ascending or descending phase at a specific moment, as well as whether it is daytime or nighttime?

Hello everyone, I have obtained the orbital data now. Could you please advise on how to determine whether the satellite is in the ascending or descending phase at a specific moment, as well as whether it is daytime or nighttime? Your assistance is greatly appreciated.

If you consider ascending/descending with respect to apogee/perigee, then you could just check the sign of Vector3D.dotProduct(position, velocity) in any inertial frame. Positive sign means satellite is moving away from center, i.e. ascending between perigee and apogee. Negative sign means satellite is moving towards center, i.e. descending between apogee and perigee.

If you consider ascendig/descending with respect to equator, just check the sign of the Z component of the velocity.

For daytime/nighttime you can use an eclipse detector and directly call its g function yourself and check its sign.

2 Likes

Thank you for your response.