Raytracing

A Python module for radar simulation

██████╗  █████╗ ██████╗  █████╗ ██████╗ ███████╗██╗███╗   ███╗██╗  ██╗
██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝██║████╗ ████║╚██╗██╔╝
██████╔╝███████║██║  ██║███████║██████╔╝███████╗██║██╔████╔██║ ╚███╔╝ 
██╔══██╗██╔══██║██║  ██║██╔══██║██╔══██╗╚════██║██║██║╚██╔╝██║ ██╔██╗ 
██║  ██║██║  ██║██████╔╝██║  ██║██║  ██║███████║██║██║ ╚═╝ ██║██╔╝ ██╗
╚═╝  ╚═╝╚═╝  ╚═╝╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚═╝╚═╝     ╚═╝╚═╝  ╚═╝
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). The total sweep angles are the number of phi angles x the number of theta angles

    • theta (numpy.1darray) –

      Array of theta scanning angles (deg). The total sweep angles are the number of phi angles x the number of theta angles

    }

  • 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]

    • unit (str) –

      Unit of target model. Supports mm, cm, and m. Default is m.

    }]

  • t (float) – Simulation timestamp. default 0

Returns:

rays

Return type:

numpy.array

radarsimpy.rt.rcs_sbr(targets, f, inc_phi, inc_theta, inc_pol=[0, 0, 1], obs_phi=None, obs_theta=None, obs_pol=None, density=1)

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

Parameters:
  • 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]

    • rotation (numpy.1darray) –

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

    • permittivity (complex) –

      Target’s permittivity. Perfect electric conductor (PEC) if not specified.

    • unit (str) –

      Unit of target model. Supports mm, cm, and m. Default is m.

    }]

  • f (float) – Center frequency (Hz)

  • inc_phi (float) – Incidence angle phi (deg).

  • inc_theta (float) – Incidence angle theta (deg).

  • inc_pol (list) – Incidence polarization [x, y, z]. default [0, 0, 1]

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

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

  • obs_pol (list) – Observer polarization [x, y, z]. default same as inc_pol

  • 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, log_path=None, debug=False, interf=None)

deprecated Please use simulator.sim_radar(radar, targets, density=1, level=None, log_path=None, debug=False, interf=None)