diff --git a/app/Services/LinkosDeviceLogService.php b/app/Services/LinkosDeviceLogService.php index e86a8a5..2ac1074 100644 --- a/app/Services/LinkosDeviceLogService.php +++ b/app/Services/LinkosDeviceLogService.php @@ -449,7 +449,7 @@ class LinkosDeviceLogService $y += cos($radian); } - $degree = round(rad2deg(atan($x / $y))); + $degree = round(rad2deg(atan2($y, $x))); if (($x > 0 || $x < 0) && $y < 0) { $degree += 180;