My original problem with connecting to GPS with GPS::NMEA has something to do with macOS Sonoma. When tried on linux, GPS::NMEA never fails to connect, but it still does fail to provide altitude sometimes on the first or second poll for reasons explained by NERDVANA. When using gpsd to manage the GPS unit and Net::GPSD3 to contact gpsd there is no problem connecting and it always provides an altitude! Thank you