AVSLab / basilisk

Astrodynamics simulation framework
https://hanspeterschaub.info/basilisk
ISC License
136 stars 60 forks source link

Magnetometer Sensor Noise Std is scaled by a factor of 1.5 #800

Open AmolikaSoni opened 1 month ago

AmolikaSoni commented 1 month ago

Describe the bug The standard deviation provided as input for magnetometer modelling is scaled by a factor of 1.5

To reproduce Locate line no. 71 in https://github.com/AVSLab/basilisk/blob/develop/src/simulation/sensors/magnetometer/magnetometer.cpp auto nMatrix = (this->senNoiseStd * 1.5).asDiagonal();

Expected behavior Not sure on why 1.5 is being multiplied.

Screenshots Code lines already mentioned above

schaubh commented 3 weeks ago

Howdy @AmolikaSoni , thanks for the info. I'm not sure either why this 1.5 multiplier was added there in the original code. I'll take a look this weekend and correct or document if needed.

AmolikaSoni commented 1 week ago

Hi @schaubh, any updates on this? I just found the same scaling of 1.5 in the coarse sun sensor modeling as well! https://github.com/AVSLab/basilisk/blob/develop/src/simulation/sensors/coarseSunSensor/coarseSunSensor.cpp

schaubh commented 1 week ago

Howdy @AmolikaSoni , I found the same. I searched the BSK code base for the use of .setNoiseMatrix() and found that only the magnetometer and CSS modules use the 1.5 multiplier. At this point I have a task to make a branch to remove the 1.5x term and document this change in the known issues file.

sdunlap-afit commented 18 hours ago

Hi @schaubh, While reviewing the following document, I came across multiple references to scaling standard deviations by 1.5 and remembered this thread. Is the document correct, or should I provide the desired standard deviations without scaling? Thank you for your time.

"where senRotNoiseStd and senTransNoiseStd are input by the user as 1.5x the desired standard deviation as scalar floats."

https://github.com/AVSLab/basilisk/blob/develop/src/simulation/sensors/imuSensor/_Documentation/BasiliskCorruptions.pdf

schaubh commented 6 hours ago

@sjkcarnahan , you wrote this original documentation. Do you recall why this 1.5x factor was put in there? Some modules used it, most didn't?