CARVIEW |
Select Language
HTTP/2 200
date: Fri, 10 Oct 2025 18:31:57 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=703532272102d6e9ef8f1afa58affb190fb8948558f74220632904c190d4caefa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22T6H8cdvwmPSl6Gqgev301gQk6ltxkGkK%22%3B%7D; HttpOnly; Path=/
cf-ray: 98c832989c07755c-BLR
GPS - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SoftwareSerial.h>
- #include <TinyGPS.h>
- TinyGPS gps;
- SoftwareSerial ss(4, 3);
- SoftwareSerial SIM800L(8, 7); // RX | TX
- static void smartdelay(unsigned long ms);
- static void print_float(float val, float invalid, int len, int prec);
- static void print_int(unsigned long val, unsigned long invalid, int len);
- static void print_date(TinyGPS &gps);
- static void print_str(const char *str, int len);
- void setup()
- {
- Serial.begin(115200);
- ss.begin(9600);
- }
- void loop()
- {
- float flat, flon;
- unsigned long age, date, time, chars = 0;
- unsigned short sentences = 0, failed = 0;
- static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;
- gps.f_get_position(&flat, &flon, &age);
- print_float(flat, TinyGPS::GPS_INVALID_F_ANGLE, 10, 6);
- print_float(flon, TinyGPS::GPS_INVALID_F_ANGLE, 11, 6);
- print_date(gps);
- Serial.println();
- smartdelay(1000);
- }
- static void smartdelay(unsigned long ms)
- {
- unsigned long start = millis();
- do
- {
- while (ss.available())
- gps.encode(ss.read());
- } while (millis() - start < ms);
- }
- static void print_float(float val, float invalid, int len, int prec)
- {
- if (val == invalid)
- {
- while (len-- > 1)
- Serial.print('*');
- Serial.print(' ');
- }
- else
- {
- Serial.print(val, prec);
- int vi = abs((int)val);
- int flen = prec + (val < 0.0 ? 2 : 1); // . and -
- flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
- for (int i=flen; i<len; ++i)
- Serial.print(' ');
- }
- smartdelay(0);
- }
- static void print_int(unsigned long val, unsigned long invalid, int len)
- {
- char sz[32];
- if (val == invalid)
- strcpy(sz, "*******");
- else
- sprintf(sz, "%ld", val);
- sz[len] = 0;
- for (int i=strlen(sz); i<len; ++i)
- sz[i] = ' ';
- if (len > 0)
- sz[len-1] = ' ';
- Serial.print(sz);
- smartdelay(0);
- }
- static void print_date(TinyGPS &gps)
- {
- int year;
- byte month, day, hour, minute, second, hundredths;
- unsigned long age;
- gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
- if (age == TinyGPS::GPS_INVALID_AGE)
- Serial.print("********** ******** ");
- else
- {
- char sz[32];
- sprintf(sz, "%02d/%02d/%02d %02d:%02d:%02d ",
- month, day, year, hour+7, minute, second);
- Serial.print(sz);
- }
- print_int(age, TinyGPS::GPS_INVALID_AGE, 5);
- smartdelay(0);
- }
- static void print_str(const char *str, int len)
- {
- int slen = strlen(str);
- for (int i=0; i<len; ++i)
- Serial.print(i<slen ? str[i] : ' ');
- smartdelay(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ C
JavaScript | 4 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $500 IN 15 MIN⭐⭐
Java | 8 sec ago | 0.10 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ Y
JavaScript | 15 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 20 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ 0
JavaScript | 26 sec ago | 0.24 KB
-
⭐⭐⭐Exchange Exploit T 3⭐⭐
Java | 31 sec ago | 0.10 KB
-
⭐⭐Exchange Exploit⭐⭐ G
JavaScript | 38 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D A⭐⭐
Java | 47 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand