Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS Noise Computation #1041

Open
rafaeljer opened this issue May 19, 2024 · 1 comment
Open

GPS Noise Computation #1041

rafaeljer opened this issue May 19, 2024 · 1 comment

Comments

@rafaeljer
Copy link

I have some doubts regarding how GPS noise is being computed.

if (gps_noise_) {
noise_gps_pos_.X() = gps_xy_noise_density_ * sqrt(dt) * randn_(rand_);
noise_gps_pos_.Y() = gps_xy_noise_density_ * sqrt(dt) * randn_(rand_);
noise_gps_pos_.Z() = gps_z_noise_density_ * sqrt(dt) * randn_(rand_);
noise_gps_vel_.X() = gps_vxy_noise_density_ * sqrt(dt) * randn_(rand_);
noise_gps_vel_.Y() = gps_vxy_noise_density_ * sqrt(dt) * randn_(rand_);
noise_gps_vel_.Z() = gps_vz_noise_density_ * sqrt(dt) * randn_(rand_);
random_walk_gps_.X() = gps_xy_random_walk_ * sqrt(dt) * randn_(rand_);
random_walk_gps_.Y() = gps_xy_random_walk_ * sqrt(dt) * randn_(rand_);
random_walk_gps_.Z() = gps_z_random_walk_ * sqrt(dt) * randn_(rand_);
}

Noise density for XY has, as unit, (m) / sqrt(hz) and the noise has as unit (m).

static constexpr double kDefaultGpsXYNoiseDensity = 2.0e-4; // (m) / sqrt(hz)

So, by the current formula, noise_gps_pos_.X() = (m) / sqrt(hz) * (1/sqrt(Hz)) = (m) / (Hz).

So, it would make me sense that the formula divides noise density by sqrt(df) [sqrt(s)], so that the result is in (m) instead of multiplying:
noise_gps_pos_.X() = ((m) / sqrt(hz)) / (1/sqrt(Hz)) = (m)

The formula I referred is also used in other places of the code, like here

double sigma_g_d = 1 / sqrt(dt) * imu_parameters_.gyroscope_noise_density;

If you could clarify, I would appreciate.

@Jaeyoung-Lim
Copy link
Member

@rafaeljer I think you may be right. If you want to make a PR to make it more correct, it would be greatly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants