tim-balloon / TIMflight

Flight MCP repo
0 stars 0 forks source link

Is gyro angle random walk variance wrong? #77

Open evanmayer opened 9 months ago

evanmayer commented 9 months ago

Describe the bug dsp1760.h defines the gyro variance as

/**
 * @brief Gyro noise: 7' / rt(hour)
 * 
 */
#define GYRO_VAR (0.7E-6)

This doesn't agree with the datasheet value, which is ≤0.7°/hr/(Hz^1/2) (or ≤0.012°/(hr^1/2)). The comment is very old, and totally wrong. It's possible the GYRO_VAR value is outdated.

To Reproduce Steps to reproduce the behavior:

The DSP-1760 datasheet value yields is 0.012 deg / (hr^1/2). Multiply by an effective integration time of (1 / 100 Hz), and square it to give a variance value ~4e-10 deg^2 / sample, which is the variance used to weight each sample when gyro data is combined with data from any other sensor.

Expected behavior Gyro variance agrees with datasheet, applying proper variance when weighted against other sensors.

Note that the impact of a large change in gyro variance weighting, making it smaller, may cause all other sensor measurements to be rejected, if their variance is much larger than the gyros. This value worked when BLAST-TNG flew with this gyro, so any changes should be carefully tested.

Screenshots N/A

Environment info (please complete the following information):

Additional context This isn't the exact datasheet, it's more of a brochure, but the bias instability and random walk values agree with the datasheet I have on file: https://emcore.com/wp-content/uploads/2024/01/DS_DSP1760.pdf