attitude_analysis: Module to obtain instrument pointing direction in various reference frames — cavsiopy 1.1.1 documentation

# attitude_analysis: Module to obtain instrument pointing direction in various reference frames

attitude_analysis module includes functions for finding the instrument pointing direction in spacecraft orbital frame(ORF), GEI J2000, ECEF, ITRF,

> NEC, NED and ENU.

Additional functions are available to calculate the look angles of the spacecraft and the instrument with respect to a ground point, line-of-sight look direction vector from the ground point to the spacecraft and the distance between spacecraft and the ground point. Slew quality can be calculated given the threshold for the angle between the LOS direction and the instrument pointing.

@author: ceren

attitude_analysis.LA_inst(vec, e, n, lon, lat, pLon)
  vecArray of float

    Boresight pointing vector.

  eint

    Column of the east vector in vec.

  nint

    Column of the north vector in vec.

  lonnumpy.ndarray[float]

    spacecraft longitude (degrees).

  latnumpy.ndarray[float]

    spacecraft latitude (degrees).

  pLonfloat

    Longitude of the target on the ground (degrees).

  dictdict

    Look angles of the instrument: azimuth and depression. vec_azim: Array of float

    > Look angle of the instrument in horizontal plane (degrees)

    vec_dep: Array of float

      Depression angle of the instrument (degrees)

  inst_look_angles = LA_rri(RRI_enu, 0, 1, Lon, Lat)

attitude_analysis.LA_sat(plon, plat, palt, slon, slat, salt)

  Calculates the satellite look angle: elevation and azimuth angle that is needed for the satellite to look towards a point in GEO frame.

  Ref: ASD5: Earth Station Look Angles By Prof. Gregory D. Durgin,

    Astrodynamics, Georgia Tech, 2009.

  plonfloat

    Longitude of the target on the ground (degrees).

  platfloat

    Latitude of the target on the ground (degrees).

  paltfloat

    altitude of the point in GEO frame (km).

  slonnumpy.ndarray[float]

    spacecraft longitude (degrees).

  slatnumpy.ndarray[float]

    spacecraft latitude (degrees).

  saltnumpy.ndarray[float]

    altitude of satellite in GEO frame (km).

  dictdict

    Look angles of the spacecraft: azimuth and elevation. azimuth: numpy.ndarray[float]

    > Satellite location in terms of azimuth (degrees).

    elevation: numpy.ndarray[float]

      Elevation angle of the spacecraft (degrees).

  sat_look_angles = LA_sat(plon, plat, palt, slon, slat, salt)

attitude_analysis.calculate_los_vec(pLon, pLat, pAlt, slon, slat, salt)

  calculates line-of-sight vector from a point to the spacecraft location using the geopy.dist.geodesic

  plonfloat

    Longitude of the target on the ground (degrees).

  platfloat

    Latitude of the target on the ground (degrees).

  paltfloat

    altitude of the point in GEO frame (km).

  slonnumpy.ndarray[float]

    spacecraft longitude (degrees).

  slatnumpy.ndarray[float]

    spacecraft latitude (degrees).

  saltnumpy.ndarray[float]

    altitude of satellite in GEO frame (km).

  los_enu_arrnumpy.ndarray[float]

    line-of-sight vector from the point to the spacecraft in ENU system.

  los_ned_arrnumpy.ndarray[float]

    line-of-sight vector from the point to the spacecraft in NED system.

attitude_analysis.calculate_reception_angle(inst_ned, pLat, pLon, pAlt, lat, lon, alt, inst='boresight')

  function to calculate the reception angle of an instrument. reception angle: angle between the instrument look direction vector and the line-of-sight vector from the target

  inst_nednumpy.ndarray[float]

    instrument look direction vector in North-East-Down.

  pLatfloat

    geodetic latitude of the target (degrees).

  pLonfloat

    geodetic longitude of the target (degrees).

  pAltfloat

    Altitude of the target (km).

  latnumpy.ndarray[float]

    spacecraft position in geodetic latitude (degrees).

  lonnumpy.ndarray[float]

    spacecraft position in geodetic latitude(degrees).

  altnumpy.ndarray[float]

    spacecraft altitude (km).

  inststr, optional

    cra is calculated as (90-ra) for dipoles, (180-ra) for boresight. input can be boresight or dipole. The default is ‘boresight’.

  ra_losnumpy.ndarray(float)

    reception angle of the instrument (degrees).

  cra_losnumpy.ndarray(float)

    complementary reception angle of the instrument (degrees).

attitude_analysis.find_instrument_attitude(rotated_body, geiX, geiY, geiZ, geiVx, geiVy, geiVz, geoX, geoY, geoZ, time_array, start_date, end_date, lat, lon, path_to_sofa_files, method1='ephemeris', frame2='itrf', frame3='nec')

  Takes in the rotated body vector in orbital frame and outputs instrument look direction in NEC or NED coordinate systems by utilizing the functions in use_rotation_matrices module.

  rotated_bodyTYPE

    DESCRIPTION.

  geiXnumpy.ndarray[float]

    X position in GEIJ2K (km).

  geiYnumpy.ndarray[float]

    Y position in GEIJ2K (km).

  geiZnumpy.ndarray[float]

    Z position in GEIJ2K (km).

  geiVxnumpy.ndarray[float]

    X component of velocity in GEIJ2K (km/s).

  geiVynumpy.ndarray[float]

    Y component of velocity in GEIJ2K (km/s).

  geiVznumpy.ndarray[float]

    Z component of velocity in GEIJ2K (km/s).

  geoXnumpy.ndarray[float]

    X position in GEO (km).

  geoYnumpy.ndarray[float]

    Y position in GEO (km).

  geoZnumpy.ndarray[float]

    Z position in GEO (km).

  time_arraydatetime.datetime

    time.

  start_datedatetime.datetime

    start of the experiment.

  latnumpy.ndarray[float]

    Geodetic latitude in degrees.

  lonnumpy.ndarray[float]

    Geodetic longitude in degrees.

  path_to_sofa_filesstr

    path_to_initialization files (IERS and EOP).

  method1str, optional

    Transformation method to ICRF/GEI J2K. Can be ‘ephemeris’ or ‘orbital_elements’. The default is ‘ephemeris’.

  frame2str, optional

    Terrestrial frame: ‘ecef’ or ‘itrf’. The default is ‘itrf’.

  frame3str, optional

    Final coordinate system: ‘nec’ or ‘ned’. The default is ‘nec’.

  inst_geonumpy.ndarray[float]

    instrument look direction in the requested coordinate system:NEC or NED

attitude_analysis.find_slew_inst(ra_los, criteria)
  function to classify slew according to the given criteria

    1 : Front face slew 0: no dipoles slewed -1: Back face slew

  ra_losnumpy.ndarray[float]

    Boresight reception angle (degrees).

  criteriafloat

    criteria/threshold for slew (degrees).

  slewint

    Classification of slew according to the given criteria

attitude_analysis.find_slew_rri(ra_los, ra_D1, ra_D2, criteria)
  function to classify slew according to the given criteria

    2: Front face slew 1: 1 dipole back, 1 dipole front, boresight front slew 0.5 : 1 dipole front slew 0: no dipoles slewed -0.5: 1 dipole back slew -1: 1 dipole back, 1 dipole front, boresight back slew -2: Back face slew

  ra_losnumpy.ndarray[float]

    Boresight reception angle (degrees).

  ra_D1numpy.ndarray[float]

    Dipole1 reception angle (degrees).

  ra_D2numpy.ndarray[float]

    Dipole2 reception angle (degrees).

  criterianumpy.ndarray[float]

    criteria/threshold for slew (degrees).

  slewint

    Classification of slew according to the given criteria

attitude_analysis.rotate_inst(body_vec, Roll, Pitch, Yaw)

  Rotation of body vectors in orbital frame (ORF) of Swarm-E using roll, pitch, and yaw angles.

  The rotation sequence is X->Y->Z; roll->pitch->yaw according to the RRI data description.

  Ref: University of Calgary, e-POP Radio Receiver Instrument (RRI) User’s Manual, Doc. no. ePOP-5024, Rev. D (2018)

  https://epop.phys.ucalgary.ca/data-handbook/coordinate-systems/

  body_vectuple

    x, y, z : initial position vectors for antenna in ORF

  Rollfloat

    roll angle in degrees

  Pitchfloat

    pitch angle in degrees

  Yawfloat

    yaw angle in degrees

  rotated_bodynumpy.ndarray

    rotated body vectors of instruments onboard Swarm-E in ORF

attitude_analysis.spacecraft_distance_from_a_point(pLon, pLat, pAlt, slon, slat, salt)

  calculates spacecraft distance from a point using the geopy.dist.geodesic

  plonfloat

    Longitude of the target on the ground (degrees).

  platfloat

    Latitude of the target on the ground (degrees).

  paltfloat

    altitude of the point in GEO frame (km).

  slonnumpy.ndarray[float]

    spacecraft longitude (degrees).

  slatnumpy.ndarray[float]

    spacecraft latitude (degrees).

  saltnumpy.ndarray[float]

    altitude of satellite in GEO frame (km).

  distancenp.ndarray[float]

    slant range between the ground point and spacecraft (km).