-dev:
Try the NMEAGSV.ino example. The comments at the top describe how you need to enable the GSV sentence in NMEAGPS_cfg.h, and make sure your M8 is sending them. It sends them by default, but you can check with NMEAorder.ino. You may need to set LAST_SENTENCE to GGA.The GSV sentences will set the
gps.sat_countvariable. Only read that variable after you read a newfix.
gps.sat_counttells how many satellites are "visible", andfix.satellitestells how many are locked (tracked).The NMEAGSV.ino example shows how to access the satellite IDs, azimuth, elevation and signal strength (SNR). They are all stored in the
gps.satellitesarray.Here is a way to display a table form of the satellites array:
void loop()
{
while (gps.available( gpsPort )) {
fix = gps.read();
TableSatellitesInView();
}
} // loop
//-----------------
#define CF(x) ((const __FlashStringHelper *) x) // a helper macro for the headers
static const char NB_HEADER[] PROGMEM = "nb ";
static const int8_t NBCOL_WIDTH = sizeof(NB_HEADER)-1;
static const char SAT_HEADER[] PROGMEM = " id el az tr ";
static const int8_t SAT_COL_WIDTH = sizeof(SAT_HEADER)-1;
static const int8_t NBCOL = 7;
void TableSatellitesInView()
{
int i = 0;
if (fix.valid.time && fix.valid.date) {
Serial.print( F("time and date are : ") );
Serial << fix.dateTime; // this "streaming" operator outputs date and time
Serial.println();
}
Serial.print( CF(NB_HEADER) );
Serial.print( '|' );
for ( i=0; i < NBCOL; i++) {
Serial.print( CF(SAT_HEADER) );
Serial.print( '|' );
}
Serial.println();
repeat( '-', NBCOL_WIDTH );
Serial.print( '|' );
for ( i=0; i < NBCOL; i++) {
repeat( '-', SAT_COL_WIDTH );
Serial.print( '|' );
}
Serial.println();
print( gps.sat_count, NBCOL_WIDTH-1 );
Serial.print( F(" |") );
for ( i=0; i < gps.sat_count; i++) {
print( gps.satellites[i].id , 3 );
print( gps.satellites[i].elevation, 3 );
print( gps.satellites[i].azimuth , 4 );
if (gps.satellites[i].tracked)
print( gps.satellites[i].snr, 3 );
else
Serial.print( F(" - ") );
Serial.print( F(" |") );
if ((i % NBCOL) == (NBCOL-1)) {
Serial.println();
repeat( ' ', NBCOL_WIDTH );
Serial.print( '|' );
}
}
i = (i % NBCOL);
while (i++ < NBCOL) {
repeat( ' ', SAT_COL_WIDTH );
Serial.print( '|' );
}
Serial.println();
repeat( '=', (NBCOL_WIDTH+1) + NBCOL * (SAT_COL_WIDTH+1) );
Serial.println();
} // TableSatellitesInView
//-----------------
// Print utilities
static void repeat( char c, int8_t len )
{
for (int8_t i=0; i<len; i++)
Serial.write( c );
}
static void print( int32_t val, int8_t len )
{
char s[16];
ltoa( val, s, 10 );
repeat( ' ', len - strlen(s) );
Serial.print( s );
}
This is a snippet from a long discussion in [this thread](https://forum.arduino.cc/index.php?topic=487187.0).
Thank you is work to me. for date and time, can I use date and timestamp format ? I use it
fix.dateTime
that code output timestamp, how to change timestamp GMT +7 with update date and time now ?

