Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows Geolocation API #1044

Open
S6ril opened this issue Aug 13, 2020 · 5 comments
Open

Support Windows Geolocation API #1044

S6ril opened this issue Aug 13, 2020 · 5 comments
Labels
windows Issue affects Windows platform

Comments

@S6ril
Copy link

S6ril commented Aug 13, 2020

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!

@jkoan jkoan added the windows Issue affects Windows platform label Aug 13, 2020
@S6ril
Copy link
Author

S6ril commented Aug 15, 2020

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 ! ;)

@jkoan
Copy link
Member

jkoan commented Aug 17, 2020

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?

@S6ril
Copy link
Author

S6ril commented Aug 17, 2020

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!

@jkoan
Copy link
Member

jkoan commented Aug 18, 2020

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

@ummerland
Copy link

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.

@jkoan jkoan changed the title Internal GPS with Navit Support Windows Geolocation API Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issue affects Windows platform
Projects
None yet
Development

No branches or pull requests

3 participants