<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382357#M12529</link>
    <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;but we log the Easting and Northing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Just to rule out any projection differences, could you instead verify that the original unprojected coordinate matches what you see in powershell? The projection used in Runtime might not match 100% the one you compare with online (or use Runtime to convert your powershell-based location using the same reprojection code and datum transformation steps).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use the newer&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation.geolocator?view=winrt-22621" target="_self"&gt;GeoLocator&lt;/A&gt;, (GeoCoordinateWatcher is based on a deprecated underlying location API) but there are various accuracy settings that might affect it too (we explicitly set it to high), and you seem to just be pulling the coordinate from the location. The very first location we get might be up to an hour old (the property on the location will indicate that and the dot on the map will be gray), but next location event should be "fresh".&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 18:09:02 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2024-02-14T18:09:02Z</dc:date>
    <item>
      <title>Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381558#M12525</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What reason would there be a discrepancy in location between Esri maps using default Windows Location Services, getting a GPS signal (i.e. not a default wi-fi location) and Windows Location Services getting a location using Powershell?&lt;/P&gt;&lt;P&gt;Our application in UWP uses the below code to enable GPS location in Esri using Windows Location Services (default).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C# code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Map.LocationDisplay.IsEnabled = true;&lt;/P&gt;&lt;P&gt;Map.LocationDisplay.DataSource.LocationChanged += (sender, eventArgs) =&amp;gt; OnDeviceLocationChanged(sender, eventArgs);&lt;/P&gt;&lt;P&gt;private void OnDeviceLocationChanged(object sender, Location e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;_ = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =&amp;gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;logger.Info($"Current Device Location:&lt;/P&gt;&lt;P&gt;Easting = { position.Easting}&lt;/P&gt;&lt;P&gt;Northing = { position.Northing}");&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log entry generated using Esri data is below.&lt;/P&gt;&lt;P&gt;Device Location: Easting = 631010.XXXXXXXXX Northing = 143140.XXXXXXXXX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a converter (&lt;A href="https://gridreferencefinder.com/" target="_blank" rel="noopener"&gt;https://gridreferencefinder.com/&lt;/A&gt;) to convert to Lat and Long, result is Lat&lt;/P&gt;&lt;P&gt;51.14 , long 1.30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using System.Device.Location.GeoCoordinateWatcher using the powershell script below to capture GPS coordinates at the same time returns Lat 51.25, Long 0.514)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Powershell code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add-Type -AssemblyName System.Device&lt;/P&gt;&lt;P&gt;$GeoWatcher = New-Object System.Device.Location.GeoCoordinateWatcher&lt;/P&gt;&lt;P&gt;$GeoWatcher.Start()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (($GeoWatcher.Status -ne 'Ready') -and ($GeoWatcher.Permission -ne 'Denied')) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start-Sleep -Milliseconds 100 #Wait for discovery.&lt;/P&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$GeoWatcher.Position.Location | Select Latitude,Longitude&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See: &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.device.location.geocoordinatewatcher?view=netframework-4.8.1" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.device.location.geocoordinatewatcher?view=netframework-4.8.1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaveMorrow_0-1707835596549.png" style="width: 570px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94590i7FF806FCAEE09C40/image-dimensions/570x241?v=v2" width="570" height="241" role="button" title="DaveMorrow_0-1707835596549.png" alt="DaveMorrow_0-1707835596549.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 14:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381558#M12525</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-02-13T14:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381823#M12526</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Your Powershell coordinates are in Lat/Long and your AGSLocation coordinates are in Web Mercator.&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;Sorry - misread the original post. &amp;nbsp;Not sure what the discrepancy is however I've noticed on a few occasions that the AGSLocation objects in my maps seem to start general and then "snap" to a more accurate location after a few seconds.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 00:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381823#M12526</guid>
      <dc:creator>MichaelDavis3</dc:creator>
      <dc:date>2024-02-16T00:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381924#M12527</link>
      <description>&lt;P&gt;What LocationDatasource are you using? I'm a bit surprised you're not getting WGS84 Lat/Long values if you're using the default datasource.&lt;BR /&gt;Whatever spatial reference you're getting it in, the conversion might be using different datum transforms than what you're comparing to online.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 21:44:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1381924#M12527</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-02-13T21:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382100#M12528</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;We are using the&amp;nbsp;&lt;SPAN&gt;default datasource which I believe is returning WGS84 Lat/Long but we log the Easting and Northing (X and Y values from MapPoint projected to BritishNationalGrid). &lt;STRONG&gt;This isn't the issue. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Pasting these into gridreferencefinder.com shows a valid location and is &lt;U&gt;normally&lt;/U&gt; correct. However, in &lt;U&gt;this instance&lt;/U&gt; the location was wrong! But Powershell was reporting the correct location (when converted).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Normally they are both the same location, as you would expect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So the question is why is Powershell returning a different location to ArcGis if they are using the same GPS source.&lt;/P&gt;&lt;P&gt;Does ArcGisRuntime use the same underlying method as our Powershell script does via&amp;nbsp;&lt;SPAN&gt;System.Device.Location.GeoCoordinateWatcher&amp;nbsp;&lt;/SPAN&gt;to get the GPS coordinates and is there any logic (e.g. caching etc.) that occurs that would affect the locations from being the same/correct?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 17:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382100#M12528</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-02-14T17:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382357#M12529</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;but we log the Easting and Northing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Just to rule out any projection differences, could you instead verify that the original unprojected coordinate matches what you see in powershell? The projection used in Runtime might not match 100% the one you compare with online (or use Runtime to convert your powershell-based location using the same reprojection code and datum transformation steps).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We use the newer&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation.geolocator?view=winrt-22621" target="_self"&gt;GeoLocator&lt;/A&gt;, (GeoCoordinateWatcher is based on a deprecated underlying location API) but there are various accuracy settings that might affect it too (we explicitly set it to high), and you seem to just be pulling the coordinate from the location. The very first location we get might be up to an hour old (the property on the location will indicate that and the dot on the map will be gray), but next location event should be "fresh".&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 18:09:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382357#M12529</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-02-14T18:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382801#M12531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm comfortable that the projection is correct (it works the rest of the time).&lt;/P&gt;&lt;P&gt;In this instance the location determined was the initial result from the Esri LocationDisplay and did not get a subsequent&amp;nbsp;LocationChanged event, so quite probably not "fresh". But this was over an 4.5hr period (see below). I note that the location is consistent too, suggesting stale/cached data. This was resolved on restart of the UWP application hosting the Esri map.&lt;/P&gt;&lt;P&gt;10:57:49|Easting = 631010.123456789 Northing = 143140.123456789&lt;BR /&gt;12:50:06|Easting = 631010.123456789 Northing = 143140.123456789&lt;BR /&gt;12:56:42|Easting = 631010.123456789 Northing = 143140.123456789&lt;BR /&gt;14:39:52|Easting = 631010.123456789 Northing = 143140.123456789&lt;BR /&gt;15:13:32|Easting = 631010.123456789 Northing = 143140.123456789&lt;BR /&gt;15:34:13|Easting = 631010.123456789 Northing = 143140.123456789&lt;/P&gt;&lt;P&gt;Yet, the Powershell script was returning correct location at the same time as above.&lt;/P&gt;&lt;P&gt;Presumably both APIs should return the same co-ordinates.&lt;/P&gt;&lt;P&gt;But if there is caching then this could result in different results at the same time.&amp;nbsp;Is this cached by the Esri Runtime or the underlying API?&lt;/P&gt;&lt;P&gt;Can we programmatically determine if the location is Fresh and/or flush the cache or force a fresh read?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 14:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1382801#M12531</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-02-15T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1383117#M12532</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Can we programmatically determine if the location is Fresh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.Location.IsLastKnown.html#Esri_ArcGISRuntime_Location_Location_IsLastKnown" target="_self"&gt;IsLastKnown&lt;/A&gt; property to check whether it is an old cached location.&amp;nbsp;You can also look at the timestamp.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Presumably both APIs should return the same co-ordinates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We're not using the same API. You're using &lt;A href="https://learn.microsoft.com/en-us/dotnet/api/system.device.location.geocoordinatewatcher?view=netframework-4.8.1" target="_self"&gt;GeoCoordinateWatcher&lt;/A&gt; which is built on the older Windows Location APIs &lt;A href="https://learn.microsoft.com/en-us/windows/win32/locationapi/windows-location-api-portal" target="_self"&gt;that has been deprecated&lt;/A&gt;. We're using WinRT's more modern &lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation.geolocator?view=winrt-22621" target="_self"&gt;GeoLocator&lt;/A&gt; in the &lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation?view=winrt-22621" target="_self"&gt;Windows.Devices.Geolocation&lt;/A&gt; APIs, which might also be pulling from IP, WiFi, Celltowers etc to get a quick first location fix. You should be able to tell the origin of the location in the &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.Location.AdditionalSourceProperties.html" target="_self"&gt;AdditionalSourceProperties&lt;/A&gt; property, although it is a bit dependent on your system's Location driver whether that'll get populated. The &lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.Location.HorizontalAccuracy.html" target="_self"&gt;HorizontalAccuracy&lt;/A&gt; property might also be an indication of what kind of location fix you got.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;I'm comfortable that the projection is correct (it works the rest of the time).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I just wanted to rule this out completely. It's a lot easier to troubleshoot if we remove all the extra stuff, just in case - grid transformations can be finicky and a web site is not guaranteed to use the exact same transformation data or calculation as the Maps SDK, and even the Maps SDK can be configured to perform the transformations differently depending on scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 20:53:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1383117#M12532</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-02-15T20:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384048#M12535</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’ve been looking at the additional properties and as you say they depend on underlying API and driver to provide details. I’ve had mixed results but mainly LocationSource is returning Wifi even when using GPS dongle and doesn't always provide any other clue. Most importantly we’re unable to force any refresh of cache or only use GPS to get accurate read.&lt;/P&gt;&lt;P&gt;Our issue is that Windows Location Services used as default in Esri has been unreliable – a combination of slow to update and inaccurate location (e.g. WiFi or cached location).&lt;/P&gt;&lt;P&gt;It was during investigating this that we noticed Powershell script was returning more accurate location results (not cached).&lt;/P&gt;&lt;P&gt;We’re are now looking at replacing with direct call to the GPS device via COM Port, e.g.&lt;/P&gt;&lt;P&gt;var port = new System.IO.Ports.SerialPort("COM3", 9600);&lt;/P&gt;&lt;P&gt;NmeaLocationDataSource serialPortDatasource = NmeaLocationDataSource.FromStreamCreator(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; onStart: (ds) =&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port.Open();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Task.FromResult(port.BaseStream);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; onStop: (ds) =&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port.Close();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Task.CompletedTask;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;MyMapView.LocationDisplay.DataSource = serialPortDatasource;&lt;/P&gt;&lt;P&gt;MyMapView.LocationDisplay.IsEnabled = true; // This will trigger onStart to get called&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, within UWP some calls are restricted. And we’ve had COM ports being reassigned when Windows restart or windows/driver updates.&lt;/P&gt;&lt;P&gt;Obviously I’d rather not write code to identify the correct port but it seems this may be needed.&lt;/P&gt;&lt;P&gt;Any thoughts or suggestions on best approach to implement GPS location reliably and accurately would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 16:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384048#M12535</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-02-19T16:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384117#M12536</link>
      <description>&lt;P&gt;You could also consider replacing your system's location driver with a NMEA based one. Of course that requires system-wide install and managing the connection outside your app. Windows won't "just" use a GPS dongle as its system location without some configuration/driver setup.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wrt UWP and serial ports, there's plenty of device information APIs to help you find the "right" port based on device ids.&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication?view=winrt-22621" target="_blank"&gt;https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication?view=winrt-22621&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The device information will allow you to identify the same device regardless of it's assigned portname dynamically. The UWP version of the NMEA constructor takes that device information object directly as an input:&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/api-reference/api/uwp/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.FromSerialPort.html#Esri_ArcGISRuntime_Location_NmeaLocationDataSource_FromSerialPort_Windows_Devices_Enumeration_DeviceInformation_System_Nullable_System_UInt32__" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/uwp/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Location.NmeaLocationDataSource.FromSerialPort.html#Esri_ArcGISRuntime_Location_NmeaLocationDataSource_FromSerialPort_Windows_Devices_Enumeration_DeviceInformation_System_Nullable_System_UInt32__&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 21:13:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384117#M12536</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-02-19T21:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384419#M12539</link>
      <description>&lt;P&gt;I realised I hadn't installed the GPSComplete GPSDirect middleware driver (as this had been uninstalled for testing) so Windows Location Service couldn't use the GPS device and was actually getting WiFi as a position source. When I reinstalled the driver I do then get GNSS as a PositionSource.&lt;/P&gt;&lt;P&gt;I also get IP as the PositionSource when Wifi is disabled. So now we can use this to assist in troubleshooting. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But we're still looking at bypassing Windows Location Service as there is no control over the above to disable IP or Wifi options only for location purposes and force use of GPS device.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The examples you give for finding the Serial Device assume no other serial devices are installed and potentially fail if another (non-GPS) serial device installed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SerialDevice.GetDeviceSelector takes a portName as parameter or returns all serial devices so does require a known static COM Port.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication.serialdevice.getdeviceselector?view=winrt-22621" target="_blank" rel="noopener"&gt;SerialDevice.GetDeviceSelector Method (Windows.Devices.SerialCommunication) - Windows UWP applications | Microsoft Learn&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;An alternative in the documentation using SerialDevice.GetDeviceSelectorFromUsbVidPid can identify device by vendor and product Id would require configuration per GPS device.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/uwp/api/windows.devices.serialcommunication.serialdevice.getdeviceselectorfromusbvidpid?view=winrt-22621" target="_blank" rel="noopener"&gt;SerialDevice.GetDeviceSelectorFromUsbVidPid(UInt16, UInt16) Method (Windows.Devices.SerialCommunication) - Windows UWP applications | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;var selector &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;SerialDevice&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;GetDeviceSelectorFromUsbVidPid&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;vid&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt; pid&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;var&lt;/SPAN&gt;&lt;SPAN class=""&gt; devices &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt; await &lt;/SPAN&gt;&lt;SPAN class=""&gt;DeviceInformation&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;FindAllAsync&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;selector&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;var&lt;/SPAN&gt;&lt;SPAN class=""&gt; item &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;devices&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;FirstOrDefault&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best option to identify a GPS serial device on UWP application without known static COM port address and with other non-GPS serial devices installed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 16:22:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1384419#M12539</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-02-20T16:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Discrepancy in GPS co-ordinates between Esri LocationDisplay GPS co-ordinates and System.Device.Location.GeoCoordinateWatcher</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1409776#M12623</link>
      <description>&lt;P&gt;From our observations and testing we have concluded that Windows Location Service is not always able to get or provide a GPS-based location to the Esri runtime. We can use Powershell scripts to obtain GPS location but only using a slightly different API.&lt;/P&gt;&lt;P&gt;From comment above we understand that there is some caching involved which can be up to 1hr but we’ve seen examples where Esri has maintained a non-GPS based position for 4+hrs. Restarting the application resolves this which suggests that a GPS location was possible but not available due to a detection issue.&lt;/P&gt;&lt;P&gt;When GPS based location isn’t detected and wifi isn’t enabled, Windows will use IP based location hence the discrepancy we see here.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 15:41:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/discrepancy-in-gps-co-ordinates-between-esri/m-p/1409776#M12623</guid>
      <dc:creator>DaveMorrow</dc:creator>
      <dc:date>2024-04-15T15:41:32Z</dc:date>
    </item>
  </channel>
</rss>

