VPS - ArgumentOutOfRangeException: Argument must be in range of -180 to 180

Include the following details (edit as applicable):

  • Issue category: VPS
  • Host machine & OS version: Mac
  • Issue Environment : Unity Mock
  • ARDK version: 2.0.0
  • Unity version: 2021.2.7f1

Description of the issue:
When setting the spoof location in the VPS Coverage Image template (VPS Coverage Image – Niantic Lightship), if I set it to an Australian GPS location (e.g. -33.75271477354195, 150.69735115186165), I get the error of:

ArgumentOutOfRangeException: Argument must be in range of -180 to 180
Parameter name: longitude
Niantic.ARDK.LocationService.LatLng…ctor (System.Double latitude, System.Double longtitude) (at Assets/ARDK/LocationService/LatLng.cs:32)
Niantic.ARDK.LocationService.LatLng.ToDegrees () (at Assets/ARDK/LocationService/LatLng.cs:180)
Niantic.ARDK.LocationService.LatLng.Add (System.Double bearing, System.Double distance) (at Assets/ARDK/LocationService/LatLng.cs:157)
Niantic.ARDK.LocationService.SpoofLocationService.StartTravel (System.Double bearing, System.Double distance, System.Single speed) (at Assets/ARDK/LocationService/SpoofLocationService.cs:206)
Niantic.ARDK.LocationService.SpoofLocationService.StartTravel (Niantic.ARDK.LocationService.LatLng destination, System.Single speed) (at Assets/ARDK/LocationService/SpoofLocationService.cs:222)
Niantic.ARDK.Templates.VPSCoverageController.ProcessTargetsResult (Niantic.ARDK.VPSCoverage.LocalizationTargetsResult result) (at Assets/LightshipHUB/Runtime/Scripts/VPSCoverageController.cs:104)
Niantic.ARDK.VPSCoverage._MockCoverageClient.RequestLocalizationTargets (System.String targetIdentifiers, System.Action`1[T] onTargetsReceived) (at Assets/ARDK/VpsCoverage/CoverageClient/_MockCoverageClient.cs:78)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

Has anyone else had this issue? I haven’t been able to test on device yet (not related to this bug), but wanted to raise this in case it’s something others might have come across too.

Hello Patrick,
Our engineers are out of office today for the holiday and we’ll be able to get more details from them tomorrow. While we’re waiting, it does look like you’re sending extremely precise (picometer-level) GPS coordinates. Do you get the same result if you round off to, say 7-9 decimal places?
The fact that this is set to Mock rather than Live Device might also be giving you trouble. What happens when you test this in Live?

I get the same error when doing: -33.7527, 150.69, so doesn’t seem to be the decimal places, but that was a good idea I hadn’t tried!

I haven’t been able to test on real device yet as I’ve got issues with my Apple Dev Account being updated at the moment and they’re preventing me building to device :frowning: So gotta stick with mocks for now!

Hi Patrick, have you been able to try on your device yet?