transform_sensor_bias: Transform sensor bias

View source: R/transform_sensor_bias.R

transform_sensor_biasR Documentation

Transform sensor bias

Description

Sensor systems occasionally have a bias in bearing, range, or altitude, e.g., targets are always 2 degrees clockwise or 10 meters lower in altitude. This function takes sensor data and ownship data given in lat/lon/alt units and transforms the bearing, range, or altitude AS SPECIFIED BY THE USER. Note that this is not an automatic correction. It returns the transformed sensor data in lat/lon/alt units.

Usage

transform_sensor_bias(
  ownShipData,
  sensorData,
  biasBearing = 0,
  biasRange = 0,
  biasAlt = 0
)

Arguments

ownShipData

data frame containing all of the truth position of the sensor system (likely from GPS or land-based radar systems). This may be ownship if testing something on a ship or the lat/lon position of a stationary ststem. MUST have the following columns (but can have more, for example heading and truthID):

  • time: (double) time of measurement. We currently recommend POSIX

  • lon: (double) longitude of target at time of measurement

  • lat: (double) latitude of target at time of measurement

  • alt: (double) altitude of target at time of measurement

sensorData

data frame containing each sensor point for all of the tracks. MUST have the following columns:

  • time: (double) time of measurement. We currently recommend POSIX

  • lon: (double) longitude of target at time of measurement

  • lat: (double) latitude of target at time of measurement

  • alt: (double) altitude of target at time of measurement

  • trackNum: (factor) identifier for the track. We recommend numbers for each unique track returned by the sensor system

biasBearing

(Default = 0) amount to adjust bearing bias, in degrees azimuth. Positive numbers are clockwise, negative are counterclockwise

biasRange

(Default = 0) amount to adjust range bias, in meters. Positive numbers shift sensor points away from sensor system, negative numbers shift sensor points closer to sensor system

biasAlt

(Default = 0) amount to adjust altitude, in meters. Positive numbers shift sensor point to higher altitude, negative numbers shift sensor points to lower altitude

Value

data frame with the lat and lon position of the targets. Variables include:

  • time: time of measurement (POSIX)

  • trackNum: (factor) name of sensor track. Number is recommended

  • lat: latitude (degrees)

  • lon: longitude (degrees)

  • alt: altitude (meters)

Examples


ownShipData <- example1_ownShipData
sensorData <- example1_sensorData

# Increasing the bearing of each sensor point by 10 degrees (i.e., clockwise)
adj1 <- transform_sensor_bias(ownShipData, sensorData, biasBearing = 10)

# Increasing the range of each sensor point by 3000 meters
adj2 <- transform_sensor_bias(ownShipData, sensorData, biasRange = 3000)

battleVerse/scenarioMaker documentation built on July 16, 2024, 4:21 a.m.