## SentiNAV configuration file

# The following parameters are for the EKF INS filter.
senti_ins:
  use_full_ins: true # Use the full EKF INS filter. False = INS MVP which does no filtering on GPS
  extract_geoid_params: true # Extract geoide parameters from files. Do not change
  time_resolution: microsecond
  max_roll_deg: 30 # Max allowable roll for the system (will re-initialize if exceeded)
  max_pitch_deg: 30 # Max allowaable pitch
  max_vertical_velocity: 3 # max vertical velocity in m/s
  max_covariance_norm: 8000 # Max norm of the covariance position matrix during dead reckoning before going to IDLE
  alignment_ned_velocity_threshold: 0.5 # Threshold for entering/leaving ALIGNMENT state
  alignment_ars_angular_velocity_threshold: 0.5 # Threshold for entering/leaving ALIGNMENT state
  fix_time_until_exit_idle: 3
  gnss_message_timeout: 10
  gnss_mb_sensor_id: 0 # The SentiBoard SensorID of the connected MovingBase GNSS
  imu_data_rate: 100 # Estimate IMU data rate (for initializing the filter will later calculate the rate based on the timestamps)
  ## Mounting
  # Mounting parameters for the different sensors
  mounting:
    r_ob_rover:             [-4.854,0.775,0.0]       # [m] lever arm from vehicle/vessel CO to antenna of rover (of moving base application), (x-forward/fore, y-right/starboard, z-down)
    r_ob_mb:                [4.854,0.775,0.0]       # [m] lever arm from vehicle/vessel CO to antenna of moving base (global rover position), (x-forward/fore, y-right/starboard, z-down)
    r_ob_imu:               [-4.854,0.0,0.0]  # [m] lever arm from vehicle/vessel CO to IMU, (x-forward/fore, y-right/starboard, z-down)
    imu:                    [0,180,0]
  ## Tuning
  # Tuning parameters for the IMU
  tuning:
    attitude_vector_measurement_scaling: 1.2
    acc_noise_density:      [0.001166667, 0.001166667, 0.001166667]  # [m/s/sqrt(s)]
    acc_vibration_scaling:  5                                        # [unitless]
    acc_bias_instability:   [0.000490332, 0.000490332, 0.000490332]  # [m/s^2]
    acc_bias_scaling:       1.10                                     # [unitless]
    acc_misalignment_err:   0.001200000                              # [rad]
    acc_scale_factor_err:   0.000200000                              # [per cent decimal (0-1)]
    T_bias_acc:             3600                                     # [s]  
    acc_bias_init:          [0.068646550, 0.068646550, 0.068646550]  # [m/s²]

    gyro_noise_density:     [0.000043633, 0.000043633, 0.000043633]  # [rad/sqrt(s)]
    gyro_vibration_scaling: 5                                        # [unitless]
    gyro_bias_instability:  [0.000001454, 0.000001454, 0.000001454]  # [rad/s]
    gyro_bias_scaling:  	1.10                                       # [unitless]
    gyro_misalignment_err:  0.001200000                              # [rad]
    gyro_scale_factor_err:  0.000500000                              # [per cent decimal (0-1)]      
    T_bias_gyro:            3600                                     # [s]
    gyro_bias_init:         [0.001745329, 0.001745329, 0.001745329]  # [rad/s]
  ## Message Subscription Port
  # This is the network/UDP port that senti_ins subscribes to for input sensor data. It expects IMU and GNSS data. 
  message_subscription_port: 3001 # Default SB2.0 Mini configuration
  ## Message Outputs
  # This is the output from senti_ins. There are 3 different timers which can schedule outputs. 1,10 and 100Hz
  # Predefined messages can be registered to output from each timer to a configurable set of IP address + port
  message_outputs:
    - timer1hz:                                   # 1 Hz timer. Messages added here will be outputted with 1 hz
      - all_states:
          - [127.0.0.1, 3000]
      - imu_bias_states:
          - [127.0.0.1, 3000]
      - nmea_gga:
          - [127.0.0.1, 40002]
      - nmea_zda:
          - [127.0.0.1, 40005]
    - timer100hz:                                 # 100 hz timer
      - states:
          - [127.0.0.1, 40000]
