Raytracing

radarsimpy.rt.lidar_scene(lidar, targets, t=0)

Lidar scene simulator

Parameters:
  • lidar (dict) –

    Lidar configuration

    {

    • position (numpy.1darray) –

      Lidar’s position (m). [x, y, z]

    • phi (numpy.1darray) –

      Array of phi scanning angles (deg)

    • theta (numpy.1darray) –

      Array of theta scanning angles (deg)

    }

  • targets (list[dict]) –

    Target list

    [{

    • model (str) –

      Path to the target model

    • origin (numpy.1darray) –

      Origin position of the target model (m), [x, y, z]. default [0, 0, 0]

    • location (numpy.1darray) –

      Location of the target (m), [x, y, z]. default [0, 0, 0]

    • speed (numpy.1darray) –

      Speed of the target (m/s), [vx, vy, vz]. default [0, 0, 0]

    • rotation (numpy.1darray) –

      Target’s angle (deg), [yaw, pitch, roll]. default [0, 0, 0]

    • rotation_rate (numpy.1darray) –

      Target’s rotation rate (deg/s), [yaw rate, pitch rate, roll rate] default [0, 0, 0]

    }]

  • t (float) – Simulation timestamp. default 0

Returns:

rays

Return type:

numpy.array

radarsimpy.rt.rcs_sbr(model, f, obs_phi, obs_theta, inc_phi=None, inc_theta=None, pol=[0, 0, 1], density=1)

Calculate target’s RCS by using shooting and bouncing rays (SBR)

Parameters:
  • model (str) – Path of the model file

  • f (float) – Center frequency (Hz)

  • obs_phi (float) – Observation angle phi (deg)

  • obs_theta (float) – Observation angle theta (deg)

  • inc_phi (float) – Incidence angle phi (deg). default None means inc_phi = obs_phi

  • inc_theta (float) – Incidence angle theta (deg). default None means inc_theta = obs_theta

  • pol (list) – Polarization [x, y, z]. default [0, 0, 1]

  • density (float) – Ray density (number of rays per wavelength). default 1

Returns:

Target’s RCS (m^2), use 10*log10(RCS) to convert to dBsm

Return type:

float

radarsimpy.rt.scene(radar, targets, density=1, level=None, noise=True, debug=False)

Radar scene simulator

Parameters:
  • radar (Radar) – Radar model

  • targets (list[dict]) –

    Target list

    [{

    • model (str) –

      Path to the target model

    • origin (numpy.1darray) –

      Origin position of the target model (m), [x, y, z]. default [0, 0, 0]

    • location (numpy.1darray) –

      Location of the target (m), [x, y, z]. default [0, 0, 0]

    • speed (numpy.1darray) –

      Speed of the target (m/s), [vx, vy, vz]. default [0, 0, 0]

    • rotation (numpy.1darray) –

      Target’s angle (deg), [yaw, pitch, roll]. default [0, 0, 0]

    • rotation_rate (numpy.1darray) –

      Target’s rotation rate (deg/s), [yaw rate, pitch rate, roll rate] default [0, 0, 0]

    }]

    Note: Target’s parameters can be specified with Radar.timestamp to customize the time varying property. Example: location=(1e-3*np.sin(2*np.pi*1*radar.timestamp), 0, 0)

  • density (float) – Ray density (number of rays per wavelength). default 1

  • level (str) –

    Fidelity level of the simulation, default None

    • None: Perform one ray tracing simulation for the whole frame

    • pulse: Perform ray tracing for each pulse

    • sample: Perform ray tracing for each sample

  • noise (bool) – Flag to enable noise calculation, default True

  • debug (bool) – Flag to enable debug output, default False

Returns:

{

  • baseband (numpy.3darray) –

    Time domain complex (I/Q) baseband data. [channes/frames, pulses, samples]

    Channel/frame order in baseband

    [0] Frame[0] -- Tx[0] -- Rx[0]

    [1] Frame[0] -- Tx[0] -- Rx[1]

    [N] Frame[0] -- Tx[1] -- Rx[0]

    [N+1] Frame[0] -- Tx[1] -- Rx[1]

    [M] Frame[1] -- Tx[0] -- Rx[0]

    [M+1] Frame[1] -- Tx[0] -- Rx[1]

  • timestamp (numpy.3darray) –

    Refer to Radar.timestamp

  • rays (numpy.array) –

    Received rays

}

Return type:

dict