UBCSailbot / sailbot_workspace

UBC Sailbot's monorepo
https://ubcsailbot.github.io/sailbot_workspace/main/
Apache License 2.0
4 stars 1 forks source link

Sensors: Add delay model #311

Closed DFriend01 closed 5 months ago

DFriend01 commented 5 months ago

Description

Add a delay modeling option, which just delays registering values in the sensor by a single update cycle. "Registering" refers to storing a value in the sensor.

Delay model will delay sensor value updates by one update cycle:
    - Sensor has initial data x0 at t = 0
    - Sensor provided new data x_1 at t = 1
    - Sensor provided new data x_2 at t = 2. At t = 2, x1 is registered into the sensor.
    - Sensor provided new data x_i at t = i. At t = i, x_{i-1} is registered into the sensor.

Verification

Resources

chrischang5 commented 5 months ago

Comments leftover from https://github.com/UBCSailbot/boat_simulator/pull/75

https://github.com/UBCSailbot/boat_simulator/pull/75#discussion_r1518541636

The standard deviation will be at different units/scales for each of these properties. We should have three instead of one. We should also make it clear that the standard deviation is only used for noise generation in its variable name

Resolved via commit.

https://github.com/UBCSailbot/boat_simulator/pull/75#discussion_r1518541839

What happens when it's zero? Similar question for the wind sensor

Behaves like the constant generator.