navit icon indicating copy to clipboard operation
navit copied to clipboard

Support Windows Geolocation API

Open S6ril opened this issue 4 years ago • 5 comments

Hey everyone,

I have a windows 10 tablet with a internal GPS. It is possible to link the GPS with navit ?

Config : System : windows 10 pro, 64 bits Processor : Intel(R) Atom(TM) x5-z8550 CPU @ 1.44GH, 4 hearts

Internal GPS : Broadcom GNSS 4752 Geolocation Sensor

Emplacement : Emplacement 22 (BcmGnssBus - GPS Function)

acces link : SENSORS\BCMGNSSLOCATIONSENSOR_BCM_4752_0000\5&2401D037&1&22 Identification number : Sensors\BcmGNSSLocationSensor_BCM_4752_0000 compatible id : BcmGNSSLocationSensorDevice configuration id : oem2.inf:Sensors\BcmGNSSLocationSensor_BCM_4752_0000,BcmGnssLocationSensor_BCM4752.NT

Think you for your help ;) PS : don't hesitate to ask for more information!

S6ril avatar Aug 13 '20 12:08 S6ril

Hey, I have some news.

I find this application to see my gps status. http://awx.black-it.eu/en/products/gnss%20data%20interface/index.htm

After some problems (there are a lot of information on the support page) :

  • Regedit must be modified in order to access the gnss due to the windows permission
  • Power management tab is bug

I can access to my gps location and simulate a COM port or a UDP port. (I can only choose the COMport and baudrate ) But unfortunately after configuring Navit, I still don't have my vehicle at my location !

My navit configuration is :

<vehicle name="my" profilename="car" follow="1" enable="yes" active="1"
source="serial:COM1 baudrate=9600 parity=N data=8 stop=1"> 

I see my vehicle at the coordinate (0,0). Where is the problem ? parity ? data ? stop ? configuration ?

Thx for helping ! ;)

S6ril avatar Aug 15 '20 19:08 S6ril

Where is the problem ? parity ? data ? stop ? configuration ?

Try to use Putty on the com device to find out the right settings with try and error.

Also please look at the Logfile at: "%APPDATA%\Local\VirtualStore\Program Files (x86)\Navit" are there errors related to the vehicle?

jkoan avatar Aug 17 '20 13:08 jkoan

Thx for help.

I successfully obtained my location on Navit. Here's my process:

  1. I'm receiving data from my sensor via GnssDataInterface. So It create a COM (10) Port with GPS data
  2. I create a virtual link to a another COM Port with comOcom because when I send data to the COM Port, it became busy. So Il need a another to read it. (I use Ports class on this software). Here is my config : Capture
  3. I use the new virtual COM5 on my navit config ;)

It work but it is not easy to set up. If you plan a plugin to simplify the setup, I'm still interested!

S6ril avatar Aug 17 '20 16:08 S6ril

When using the Win32 API (which could be deprecated some day) we could use something like this: https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/LocationAwarenessEvents/cpp/LocationEvents.cpp This one is similar to the Geoclue-Plugin I wrote in #1032

The better way would probably be to use the UWP Infrastructure/API, but this would require us to migrate to a official Windows toolchain because MinGW does not support UWP as far i found out so far. The UWP Interface would be: https://docs.microsoft.com/en-us/uwp/api/Windows.Devices.Geolocation?view=winrt-19041

jkoan avatar Aug 18 '20 18:08 jkoan

Just an idea on top of that, as i am not an expert regarding the inner workings of navit:

What would it take to port navit (or parts of it) to .NET C# ? The obvious things i am thinking of are Infrastructure and API.

If there is interest i would join that development.

ummerland avatar Sep 13 '20 12:09 ummerland