private static void sendData(byte[] data, byte length)
 {
     // if RTCM broadcast is checked - send GPS data to single broadcast adress
     // else - send GPS data to every UAV
     if (Instance.chk_rtcmBroadcast.Checked)
     {
         IPAddress IpBrd;
         int       portBrd;
         if (IPAddress.TryParse(Instance.txt_UDPBroadcastIP.Text, out IpBrd))
         {
             if (int.TryParse(Instance.txt_UDPBroadcastPort.Text, out portBrd))
             {
                 (broadcastPort.BaseStream as UdpSerial).RemoteIpEndPoint = new IPEndPoint(IpBrd, portBrd);
                 broadcastPort.InjectGpsData(0, 0, data, (byte)length, rtcm_msg);
             }
         }
     }
     else
     {
         foreach (var port in MainV2.Comports)
         {
             foreach (var MAV in port.MAVlist)
             {
                 port.InjectGpsData(MAV.sysid, MAV.compid, data, (byte)length, rtcm_msg);
             }
         }
     }
 }