public TelemetryPacket()
 {
     telemetryData = new TelemetryData();
     diagnosticData = new DiagnosticData();
     electricData = new ElectricData();
     positionData = new PositionData();
     configurationData = new ConfigurationData();
 }
 public TelemetryPacket(string data)
 {
     lock (sync)
     {
         string[] split = data.Split('#');
         try
         {
             telemetryData = new TelemetryData(split[0]);
             diagnosticData = new DiagnosticData(split[1]);
             electricData = new ElectricData(split[2]);
             positionData = new PositionData(split[3]);
             configurationData = new ConfigurationData(split[4]);
             if (telemetryData.isValid() && diagnosticData.isValid() && electricData.isValid() && positionData.isValid() && configurationData.isValid())
                 _isValid = true;
             else
                 _isValid = false;
         }
         catch (IndexOutOfRangeException)
         {
             _isValid = false;
         }
     }
 }