Scrap Mechanic

Scrap Mechanic

SComputers [Fork]
Kalendarz2 2023 年 10 月 6 日 下午 2:17
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.
< >
正在显示第 1 - 5 条,共 5 条留言
BananaPen  [开发者] 2023 年 10 月 14 日 下午 12:29 
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 2023 年 10 月 16 日 上午 10:59 
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  [开发者] 2023 年 10 月 18 日 上午 8:32 
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  [开发者] 2023 年 11 月 25 日 上午 9:37 
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  [开发者] 2023 年 12 月 13 日 上午 5:00 
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
< >
正在显示第 1 - 5 条,共 5 条留言
每页显示数: 1530 50