-//#include <AltSoftwareSerial.h>
-//SoftwareSerial mySerial(10, 11);
 #include <AltSoftSerial.h>
 
 AltSoftSerial mySerial;

  getUBX();
  if (gotUBX == true)
  {
    mySerial.println("Got it!");
    decodeUBX();
    clearVars();
    gotUBX = false;
  }

    {
      case 0x02:  //NAV-POSLLH
        {
          longitude = 0xFF & message[7];       //долгота
          longitude = longitude << 8;
          longitude |= message[6];
          longitude = longitude << 8;
          longitude |= message[5];
          longitude = longitude << 8;
          longitude |= message[4];
          longitudef = longitude / 10000000.0;

          latitude = 0xFF & message[11];       //широта
          latitude = latitude << 8;
          latitude |= message[10];
          latitude = latitude << 8;
          latitude |= message[9];
          latitude = latitude << 8;
          latitude |= message[8];
          latitudef = latitude / 10000000.0;

          height = 0xFF & message[19];         //высота
          height = height << 8;
          height |= message[18];
          height = height << 8;
          height |= message[17];
          height = height << 8;
          height |= message[16];
          heightf = height / 1000.0;
          
          POSLLH = true;
          break;
        }
      case 0x12:  //NAV-VELNED
        {
          speed3 = 0xFF & message[19];        //скорость
          speed3 = speed3 << 8;
          speed3 |= message[18];
          speed3 = speed3 << 8;
          speed3 |= message[17];
          speed3 = speed3 << 8;
          speed3 |= message[16];
          speed3f = speed3 / 100.0;

          VELNED = true;
          break;
        }
      case 0x06:  // NAV-SOL
        {
          NumSV = message[47];          //кол-во спутников в решении
          FixType |= message[10];        //тип фикса
   //     mySerial.print(message[47]);
          
          SOL = true;
          break;
        }
    }
  }
}

void sendGPS(void)
{
  mySerial.print("A");
  mySerial.print(longitudef, 5);
  mySerial.print("  B");
  mySerial.print(latitudef, 5);
  mySerial.print("  C");
  mySerial.print(heightf, 3);
  mySerial.print("  D");
  mySerial.print(speed3f, 3);
  mySerial.print("  E");
  mySerial.print(NumSV);
  mySerial.print("  F");
  mySerial.println(FixType);
  longitude = 0;
  latitude = 0;
  height = 0;
  speed3 = 0;
  NumSV = 0;
  FixType = 0;
}

void clearVars(void)
