gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GPS data from multiple android GPS sources over UDP


From: Gary E. Miller
Subject: Re: GPS data from multiple android GPS sources over UDP
Date: Thu, 20 Apr 2023 11:36:53 -0700

Yo Debashisha!

On Thu, 20 Apr 2023 10:10:57 +0200 (CEST)
Debashisha Mishra <debashisha.mishra@univ-lorraine.fr> wrote:

> Thank you. I appreciate it a lot. I attempted what you advised. To
> transmit GPS data to the host computer, I utilized two mobile devices
> running the GPSD Forwarder program. The first phone's GPS forwarding
> port number was 12345, while for the second phone's was 12346. Using
> gpspipe and the following instructions, I was able to collect GPS
> data from many ports on the host machine and organize it in a way
> that made sense. 
> 
> gpsd -Nn udp://*:12345 udp://*:12346 
> 
> and then using gpspipe command as follows to filter out NMEA
> sentences from two different phones. 
> 
> gpspipe -r localhost:2947:udp://*:12345 
> gpspipe -r localhost:2947:udp://*:12346 

Good news that you got it working!

> I wanted to bring another fact which I noticed in the data which I
> collected. I used a sample c++ program (attached to this email and
> also available on Internet) to understand the latitude and longitude
> which I receive from these two different device. I put the two
> devices close to each other (~1 meter apart).

A common test.  More interesting when you use PPP or RTK.


> I believe the GPSD in
> the host computer is presenting the GPS fix information (latitude and
> longitude) by intelligently multiplexing them even if one of the
> phone does not report any GPS data intermittently .

Nope.  gpsd is GIGO: Garbage In/Garbage Out.  The most it will do
is compute some missing values.  Like computing ECEF from Lat/Lon?alt
when the receiver does not report ECEF.

Why not just run one cpgs for each feed?  Like you did with the gpspipe?

> The screenshot
> "gpsd-two-phones.png" is attached to the email to show this. Each row
> shows the <time stamp, latitude, longitude and the device path>. The
> data were very identical from two devices. I would NOT expect them to
> be exactly identical to 8 decimal digits for both latitude and
> longitude. 

Depends on the device.  Many receivers do not report Lat/Lon to better
than several meters precision.

> Am I missing something here while capturing them in the c++ program?

Yes, you are missing things.  You make the same mistakes we often soo.
I suggest you read the gpsd examples:

    https://gpsd.io/gpsd-client-example-code.html

And certainly do not block:

      // Do nothing until fix, block execution for 1 second (busy wait 
mitigation)

Just have gpsd tell you when new data is available,




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpczjFVCGSVa.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]