Exemplo n.º 1
0
 public void Set(Telemetry.DataIndex key, TelemetryValue tv)
 {
     if (Telemetry.logHeaderLine)
     {
         Console.WriteLine(string.Format("{0},", key.ToString()));
     }
     else if (this.originalpacketlength > 0)
     {
         Console.WriteLine(string.Format("{0},", tv.AsString));
     }
     this.telemetryValues[key] = tv;
 }
        public void RefreshGUIForNewValues(Telemetry telem)
        {
            //              EPS
             this.PanXvoltTextBox.Text = telem.Get(Telemetry.DataIndex.PanelVoltX).AsDouble.ToString("F2") + " mV";
             this.PanYvoltTextBox.Text = telem.Get(Telemetry.DataIndex.PanelVoltY).AsDouble.ToString("F2") + " mV";
             this.PanZvoltTextBox.Text = telem.Get(Telemetry.DataIndex.PanelVoltZ).AsDouble.ToString("F2") + " mV";
             this.TotalPhCTextBox.Text = telem.Get(Telemetry.DataIndex.PanelCurrentTotal).AsDouble.ToString("F2") + " mA";
             this.BatteryVoltTextBox.Text = telem.Get(Telemetry.DataIndex.BattVolt0).AsDouble.ToString("F2") + " mV";
             this.TotalSysCTextBox.Text = telem.Get(Telemetry.DataIndex.BattCurrentBus).AsDouble.ToString("F2") + " mA";
             this.RebootCountTextBox.Text = telem.Get(Telemetry.DataIndex.RebootCount).AsInt.ToString();
             this.EPSSoftErrTextBox.Text = telem.Get(Telemetry.DataIndex.EpsErrorCount).AsInt.ToString();
             this.BconvTemp1textBox.Text = telem.Get(Telemetry.DataIndex.EpsTemp1).AsDouble.ToString("F2") + " ºc";
             this.BconvTemp2textBox.Text = telem.Get(Telemetry.DataIndex.EpsTemp2).AsDouble.ToString("F2") + " ºc";
             this.BconvTemp3textBox.Text = telem.Get(Telemetry.DataIndex.EpsTemp3).AsDouble.ToString("F2") + " ºc";
             this.BatteryTemptextBox.Text = telem.Get(Telemetry.DataIndex.BattTemp0).AsDouble.ToString("F2") + " ºc";
             this.Latch5CounttextBox.Text = telem.Get(Telemetry.DataIndex.LatchCount5_0).AsDouble.ToString("F2");
             this.Latch33CounttextBox.Text = telem.Get(Telemetry.DataIndex.LatchCount3_3).AsDouble.ToString("F2");
             this.ResetCausetextBox.Text = telem.Get(Telemetry.DataIndex.ResetCause).AsString;
             this.PPTrackingtextBox.Text = telem.Get(Telemetry.DataIndex.PptTrackingMode).AsString;

             //               BOB
             this.SunXplustextBox.Text = telem.Get(Telemetry.DataIndex.AsibSunSensorX1).AsDouble.ToString("F2");
             this.SunYplustextBox.Text = telem.Get(Telemetry.DataIndex.AsibSunSensorY1).AsDouble.ToString("F2");
             this.SunZplustextBox.Text = telem.Get(Telemetry.DataIndex.AsibSunSensorZ1).AsDouble.ToString("F2");
             this.XPlustmptextBox.Text = telem.Get(Telemetry.DataIndex.AsibPanelTempX1).AsDouble.ToString("F2") + " ºc";
             this.XminustmptextBox.Text = telem.Get(Telemetry.DataIndex.AsibPanelTempX2).AsDouble.ToString("F2") + " ºc";
             this.YPlustmptextBox.Text = telem.Get(Telemetry.DataIndex.AsibSunSensorY1).AsDouble.ToString("F2") + " ºc";
             this.YminustmptextBox.Text = telem.Get(Telemetry.DataIndex.AsibPanelTempY2).AsDouble.ToString("F2") + " ºc";
             this.Bus33Volttextbox.Text = telem.Get(Telemetry.DataIndex.AsibBusVolt3_3).AsDouble.ToString("F2") + " mV";
             this.Bus33CurrtextBox.Text = telem.Get(Telemetry.DataIndex.AsibBusCurrent3_3).AsDouble.ToString("F2") + " mA";
             this.Bus5Volttextbox.Text = telem.Get(Telemetry.DataIndex.AsibBusVolt5_0).AsDouble.ToString("F2") + " mV";

             //               RF
             this.DoplerRXtextBox.Text = telem.Get(Telemetry.DataIndex.RfReceiverDoppler).AsDouble.ToString("F2") + " kHZ";
             this.RssiRXtextBoxtextBox.Text = telem.Get(Telemetry.DataIndex.RfReceiverRSSI).AsDouble.ToString("F2") + " kHZ";
             this.RfTemptextBox.Text = telem.Get(Telemetry.DataIndex.RfTemp).AsDouble.ToString("F2") + " ºc";
             this.RxCurrtextBox.Text = telem.Get(Telemetry.DataIndex.RfReceiveCurrent).AsDouble.ToString("F2") + " mA";
             this.Tx33CurrtextBox.Text = telem.Get(Telemetry.DataIndex.RfTransmitCurrent3_3).AsDouble.ToString("F2") + " mA";
             this.Tx5CurrtextBox.Text = telem.Get(Telemetry.DataIndex.RfTransmitCurrent5_0).AsDouble.ToString("F2") + " mA";

             //               PA
             this.RxPowertextBox.Text = telem.Get(Telemetry.DataIndex.PaReversePower).AsDouble.ToString("F2") + " mW";
             this.FrwPowertextBox.Text = telem.Get(Telemetry.DataIndex.PaForwardPower).AsDouble.ToString("F2") + " mW";
             this.BoardtTemptextBox.Text = telem.Get(Telemetry.DataIndex.PaTemperature).AsDouble.ToString("F2") + " ºc";
             this.BoardCurrtextBox.Text = telem.Get(Telemetry.DataIndex.PaCurrent).AsDouble.ToString("F2") + " mA";

             //               ANTS
             this.AntTemp0textBox.Text = telem.Get(Telemetry.DataIndex.AntTempA).AsDouble.ToString("F2") + " ºc";
             this.AntTemp1textBox.Text = telem.Get(Telemetry.DataIndex.AntTempB).AsDouble.ToString("F2") + " ºc";
             this.deploy0.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.AntDeploy1).AsBool);
             this.deploy1.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.AntDeploy2).AsBool);
             this.deploy2.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.AntDeploy3).AsBool);
             this.deploy3.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.AntDeploy4).AsBool);

             //               SW
             this.SeqNumtextBox.Text = telem.Get(Telemetry.DataIndex.SequenceNumber).AsInt.ToString();
             this.DTMFCmdCnttextBox.Text = telem.Get(Telemetry.DataIndex.DtmfCommandCount).AsInt.ToString();
             this.DTMFLstCmdtextBox.Text = telem.Get(Telemetry.DataIndex.DtmfLastCommand).AsInt.ToString();
             this.DTMFCmdSucc.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DtmfCommandSuccess).AsBool);
             this.DataASIB.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidBob).AsBool);
             this.DataEPS.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidEps).AsBool);
             this.DataPA.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidPa).AsBool);
             this.DataRF.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidRf).AsBool);
             this.DataMSE.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidMse).AsBool);
             this.DataANTS_A.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidAnts2).AsBool);
             this.DataANTS_B.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DataValidAnts1).AsBool);
             this.Eclipse.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.InEclipse).AsInt.ToString());
             this.Safe.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.InSafeMode).AsInt.ToString());
             this.ABFHrd.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.HardwareABF).AsInt.ToString());
             this.ABFSoft.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.SoftwareABF).AsBool);
             this.DeployWait.ForeColor = Parser.OnOffElement(telem.Get(Telemetry.DataIndex.DeployWait).AsInt.ToString());

             //             GENERAL
             this.FrameIdtextBox.Text = telem.Get(Telemetry.DataIndex.FrameId).AsString;
             this.SatIdtextBox.Text = telem.Get(Telemetry.DataIndex.SatelliteId).AsInt.ToString();

             if (telem.IsFitter)
                 this.FitterMessageWindow.AppendText("   " + telem.SequenceNumber.ToString() + " , " + telem.Get(Telemetry.DataIndex.FrameId).AsString+" : " + Parser.GetFitterMessage(telem.Payload) + "\n");
        }
Exemplo n.º 3
0
 public TelemetryValue Get(Telemetry.DataIndex key)
 {
     if (this.telemetryValues.ContainsKey(key))
     {
         return this.telemetryValues[key];
     }
     return new NullTelemetryValue();
 }