Star map on FOV

Look! there's a flower!·2024년 10월 25일

Night sky area

  1. Start with your location (latitude/longitude)
  2. Get current time (convert to local sidereal time/LST)
  3. The LST tells you what Right Ascension (RA) is directly overhead
    • Objects with RA = LST are on your meridian (highest in sky)
    • Visible RA range is roughly LST ± 6 hours

FOV Sky area from object

  1. Get orbital parameters:

    • Position vector (X, Y, Z in space)
    • Velocity vector (direction of movement)
    • Current time
  2. Convert to viewing coordinates:

    • Calculate spacecraft's local vertical
    • Use orientation to determine which way instruments/windows point
    • Convert to equatorial coordinates (RA/Dec)
  3. Calculate field of view:

    • Define cone angle from viewing direction
    • Map this to RA/Dec coordinates

step2:
1. From orbital position, define local reference frame:

  • Z-axis: local vertical (from Earth center to spacecraft)
  • Y-axis: perpendicular to orbital plane
  • X-axis: completes right-handed system
  1. Spacecraft orientation relative to this frame:

    • Usually given in quaternions or Euler angles
    • Convert to rotation matrix R
  2. Viewing direction in spacecraft frame:

    • If looking through window, use window normal vector
    • Apply rotation matrix: v_local = R * v_spacecraft
  3. Convert to equatorial coordinates:

    • Use spacecraft position to get Earth-centered inertial (ECI) frame
    • Transform local viewing vector to ECI
    • Convert to RA/Dec using:
      RA = atan2(y_eci, x_eci)
      Dec = asin(z_eci/sqrt(x_eci² + y_eci² + z_eci²))

step3:
1. Define FOV parameters:

  • Central viewing direction (from step 2)
  • FOV angle (α) for window/instrument
  1. Create FOV cone:

    • All points making angle α with viewing direction
    • In equatorial coordinates, this makes a circle on celestial sphere
  2. Map FOV boundaries:

    • For circular FOV:
      • Generate points around cone at angle α
      • Convert each to RA/Dec
    • For rectangular FOV:
      • Define corners using horizontal/vertical angles
      • Convert corners to RA/Dec
      • FOV is area inside these points

sample code:

def get_viewing_area(
    position_eci,      # spacecraft position vector
    orientation_quat,  # spacecraft orientation quaternion
    window_normal,     # viewing direction in spacecraft frame
    fov_angle         # field of view in degrees
):
    # Convert orientation to rotation matrix
    R = quat_to_matrix(orientation_quat)
    
    # Get viewing direction in ECI
    view_local = R @ window_normal
    view_eci = local_to_eci(view_local, position_eci)
    
    # Get central RA/Dec
    ra, dec = vector_to_radec(view_eci)
    
    # Generate FOV boundary points
    fov_points = []
    for theta in range(0, 360, 10):  # every 10 degrees
        # Generate point on FOV cone
        point = rotate_vector(view_eci, fov_angle, theta)
        ra_p, dec_p = vector_to_radec(point)
        fov_points.append((ra_p, dec_p))
    
    return ra, dec, fov_points

Find stars in the night sky area

  1. Find LST at your position
  • this gives the meridian (highest position in the sky)
  • with longitude, you can get z position in equitorial coordinates
  • that's the night sky direction outward onto space.
  1. if you want to change view direction from there, you have to rotate it.
  2. that's the sky direction you are looking at in equitorial coordinates.
  3. define area from the direction.
  4. find stars with the area from star catalogue.
profile
Why don't you take a look around for a moment?

0개의 댓글