TinyGPS++, is possible to have TOTAL SATS IN VIEW?

Hallo dear gentlemen, good morning.

This is Roberto, 44 years old, from southern Italy.

I'm using your arduino library TonyGPSPlus with probably the cheapest GPS module on the market: ATGM336H-5N-31, we can buy at $3.20 more or less.
This module receives two satellites constellations: GPS and BEIDOU.

So, a typical group of sentences is the follow:

22:26:09.123 -> $GNGGA,202609.000,4029.8119,N,01722.5227,E,1,09,2.5,3.8,M,0.0,M,,*72 ← (used in TinyGPS++ library)

22:26:09.191 -> $GNGLL,4029.8119,N,01722.5227,E,202609.000,A,A*42

22:26:09.224 -> $GPGSA,A,3,04,16,26,03,09,,,,,,,,3.3,2.5,2.1*3B (max 12 satellites in a GSA sentence)

22:26:09.291 -> $BDGSA,A,3,07,20,02,09,,,,,,,,,3.3,2.5,2.1*29 (max 12 satellites in a GSA sentence)

22:26:09.325 -> $GPGSV,2,1,08,02,29,305,,03,21,121,40,04,44,056,35,06,51,260,*7C

22:26:09.428 -> $GPGSV,2,2,08,07,53,188,,09,73,355,30,16,16,071,34,26,06,037,31*79

22:26:09.494 -> $BDGSV,2,1,06,02,08,107,39,05,,,35,07,18,062,40,09,12,065,37*5B

22:26:09.561 -> $BDGSV,2,2,06,10,,,41,20,41,095,45*50

22:26:09.594 -> $GNRMC,202609.000,A,4029.8119,N,01722.5227,E,0.00,0.00,060720,,,A*76 ← (used in TinyGPS++ library)

22:26:09.661 -> $GNVTG,0.00,T,,M,0.00,N,0.00,K,A*23

22:26:09.695 -> $GNZDA,202609.000,06,07,2020,00,00*46

22:26:09.728 -> $GPTXT,01,01,01,ANTENNA OPEN*25

As you know, TinyGPS++ library uses only GGA and RMC sentences to keep its data, that give us possibility to extract the "satellites" value.
Yes, "satellites" value: this means the number of satellites used for position fix. As you know, this number (in the above list it is 9) may be lower than "all satellites in view".

In particular, as you can see above, the module sees 8 GPS satellites plus 6 BEIDOU satellites.

My need is exactly this: to extract these numbers, separately.

I tried to go inside your library to try a modification, even if I'm not so skilled to make this.

The problem is that the GPGSV sentences may be more than one (in the upper case 2 rows, 2 sentences). So, I'm afraid the code can get crazy looking two or more sentences beginning with GPGSV.

Same problem for BDGSV.

I hope you can help me, if this answer doesn't cost a time fortune for you, gentlemen.

Thank you very much indeed.

Best wishes from southern Italy.
Roberto

If you lookup the makeup of the $GPGSV sentence (try a google search) you will see that each $GPGSV sentence gives the total number of satellites in view.

And if you do another Google search on 'TinyGPS++' you will find the reference page for TinyGPS++ and the section entitled 'Custom NMEA Sentence Extraction' will explain how to extract the value you want.

Hallo dear srnet, good morning.
First of all, thank you for answering me quickly. I appreciate.
I have already had a look inside 'Custom NMEA Sentence Extraction'. My concern (probably unnecessary concern...) is that $GPGSV sentences are more than one, exactly 1 row every 4 satellites in view.
For example, if GPS total satellites in vie are 10, we will have 3x $GPGSV sentences (4 satellites in the first, 4 in the second and last 2 in the third).

$GPGSV,3,1,10,.....
$GPGSV,3,2,10,.....
$GPGSV,3,3,10,.....

So, if I put a new query to extract that value, does the command excecute fine?
When the istruction will search for total sats in view, it will find that value in 3 rows (as described above).
Same thing for $BDGSV, of course.

Thank you for your support.
Roberto.

pietrafesa:
I have already had a look inside 'Custom NMEA Sentence Extraction'. My concern (probably unnecessary concern...) is that $GPGSV sentences are more than one, exactly 1 row every 4 satellites in view.
For example, if GPS total satellites in vie are 10, we will have 3x $GPGSV sentences (4 satellites in the first, 4 in the second and last 2 in the third).

$GPGSV,3,1,10,.....
$GPGSV,3,2,10,.....
$GPGSV,3,3,10,.....

So, if I put a new query to extract that value, does the command excecute fine?

I can't see why not - the GPS is emitting all its sentences continually, why would the library care that it gets three of the same type in a row? Just try it.

Hallo wildbill, good afternoon.
I'm searching on google since couple of hours.
No useful documents.
The problem is how to extract
-total satellites in view by GPS constellation (GPGSV) and
-total satellites in view by BEIDOU constellation (BDGSV).

Is there anyone may put here the right code?
Thank you so much indeed.
Roberto

It's the first example under "Custom sentence extraction with TinyGPSCustom" right here: TinyGPS++: A New View of Global Positioning | Arduiniana.
Exactly what you're asking for.

"Gentlemen"?!

HillmanImp:
“Gentlemen”?!

Yes, Sir! :slight_smile:

gfvalvo:
It's the first example under "Custom sentence extraction with TinyGPSCustom" right here: TinyGPS++: A New View of Global Positioning | Arduiniana.
Exactly what you're asking for.

Hallo gfvalvo, thank you! I had already seen these instructions. I reporto here the code:

TinyGPSCustom sats(gps, "GPGSV", 3);
...
Serial.println(sats.value());

Ok, this code is valid for GPS constellation. What do I have to code to extract same value for BeiDou constellation? Is it possible something like this?

TinyGPSCustom sats(gps, "BDGSV", 3);
...
Serial.println(sats.value());

(I changed ONLY GPGSV to BDGSV, but I suppose I must change also sats.value in something like beidousats.value in order to avoid values conflicts, isn't it? Or do I change more terms?)

Thank you so much!
Roberto

The beauty of Arduino is that programs are usually small enough that compiling them is fast.

It would be trivial to try it out. It's likely (depending on where you put those snippets) that you will need a different name for the beidou object.

I know nothing of BeiDou. Does the receiver for this output proper NMEA?

pietrafesa:
but I suppose I must change also sats.value in something like beidousats.value in order to avoid values conflicts, isn't it? Or do I change more terms?

Probably, what happens when you try it on a real GPS ?

gfvalvo:
I know nothing of BeiDou. Does the receiver for this output proper NMEA?

Yes, if you look first post above, the BeiDou sentences are these beginning with $BD

This comes from cheapest module I know, ATGM336H-5N-31, that costs about $3.20 from Aliexpress.
It works fine, I'm using it since couple of years.
It receives GPS and BeiDou.
$GP for GPS
$BD for BeiDou
$GN all systems data, comes from "joining" both data.

So, as already advised, just try doing what you want. It won't hurt anything.

pietrafesa:
This comes from cheapest module I know, ATGM336H-5N-31, that costs about $3.20 from Aliexpress.
It works fine, I'm using it since couple of years.
It receives GPS and BeiDou.
$GP for GPS
$BD for BeiDou
$GN all systems data, comes from "joining" both data.

It sounds like a Ublox GPS, thats exactly the GPS systems they support, although its not often the BeiDou is turned on and I have never seen it have a significant impact on performance.

Be suscpicous of very low prices, a lot of Ublox fakes out there.

srnet:
It sounds like a Ublox GPS, thats exactly the GPS systems they support, although its not often the BeiDou is turned on and I have never seen it have a significant impact on performance.

Be suscpicous of very low prices, a lot of Ublox fakes out there.

That's not a fake Ublox, that is ATGM336H-5N-31 original, cheap and reliable.
It works fine, since one year I used more than ten.
Now I only would improve data, reading total sats in view.
Thank you.