Scrap Mechanic

Scrap Mechanic

SComputers [Fork]
Kalendarz2 6 Oct, 2023 @ 2:17pm
Incorrect calculation of quaternions in GPS module
GPS incorrectly calculates quaternions from rotation vectors. Using shape.worldRotation returns a different result than getSelfGpsData().rotation. Commenting out line 35 in gps.lua fully fixes the bug, so the calculation is probably incorrectly performed in the fromEuler() function.
< >
Showing 1-5 of 5 comments
BananaPen  [developer] 14 Oct, 2023 @ 12:29pm 
this is a serious problem, and I don't even know how to fix it correctly so as not to break someone else's code, most likely after I make corrections I will add a separate "worldRotation" field without this bug, and "rotation" will remain as legacy. I would also like to know if it is possible to use a rotation distorted by incorrect calculations(to understand the level of severity of the problem)?
Kalendarz2 16 Oct, 2023 @ 10:59am 
In its current form, it is completely unusable. When the gps is rotated only in 1 axis at a time, the calculations are correct. However, when rotated in 2 axes, some values become inverted. When rotated in 3 axes, the calculations become completely wrong
BananaPen  [developer] 18 Oct, 2023 @ 8:32am 
it's horrible... could you try to fix the GPS script. just commenting out a line is not enough, as you need to impose noise on the measurements. the standard conversion method is sm.quat.fromEuler didn't work for me for some reason
BananaPen  [developer] 25 Nov, 2023 @ 9:37am 
I temporarily removed the rotation noise from the GPS, when I make it work normally, I will make it so that it can be turned off in the "Permission Tool"
BananaPen  [developer] 13 Dec, 2023 @ 5:00am 
I also added a creative GPS unit that does not contain any noise at all, and even when I make the correct noise formula for the rotation, the creative GPS unit will not contain any noise
< >
Showing 1-5 of 5 comments
Per page: 1530 50