Esempio n. 1
0
 public Quadruple Get_PositionFilterParameters()
 {
     SendCommand('X', false);
     currentHeader = ReadHeader();
     if (currentHeader.Command != 'X')
         throw new PolhemusException(0xF3);
     Quadruple fp = new Quadruple();
     if (_format == Format.ASCII)
     {
         fp = Quadruple.FromASCII(TReader, "Sx.xxxB");
         parseASCIIStream("<>");
     }
     else
     {
         if (currentHeader.Length != 16)
             throw new PolhemusException(0xF2);
         fp = new Quadruple(BReader.ReadSingle(), BReader.ReadSingle(), BReader.ReadSingle(), BReader.ReadSingle());
     }
     return fp;
 }
Esempio n. 2
0
 public void AttitudeFilterParameters(double F, double FLow, double FHigh, double Factor)
 {
     Quadruple fp = new Quadruple(F, FLow, FHigh, Factor);
     SendCommand("Y" + fp.ToASCII().Substring(1), true); //drop initial comma
 }
Esempio n. 3
0
 public static Quadruple FromASCII(StreamReader sr, string format)
 {
     Quadruple q = new Quadruple();
     q.v1 = (double)PolhemusController.parseASCIIStream(sr, format);
     q.v2 = (double)PolhemusController.parseASCIIStream(sr, format);
     q.v3 = (double)PolhemusController.parseASCIIStream(sr, format);
     q.v4 = (double)PolhemusController.parseASCIIStream(sr, format);
     return q;
 }
Esempio n. 4
0
 public void PositionFilterParameters(double F, double FLow, double FHigh, double Factor)
 {
     Quadruple fp = new Quadruple(F, FLow, FHigh, Factor);
     SendCommand("X" + fp.ToASCII().Substring(1), true); //don't forget to truncate first comma
 }
Esempio n. 5
0
 public void PositionFilterParameters(double F, double FLow, double FHigh, double Factor)
 {
     Quadruple fp = new Quadruple(F, FLow, FHigh, Factor);
     SendCommand("X" + fp.ToASCII(), true);
 }
Esempio n. 6
0
 public Quadruple Get_PositionFilterParameters()
 {
     SendCommand('X', true);
     ResponseHeader r = ReadHeader();
     if (r.Command != 'X')
         throw new PolhemusException(0xF3);
     Quadruple fp = new Quadruple();
     if (_format == Format.ASCII)
         fp = Quadruple.FromASCII(TReader, "Sx.xxxB");
     else
     {
         if (r.Length != 16)
             throw new PolhemusException(0xF2);
         fp = new Quadruple(BReader.ReadSingle(), BReader.ReadSingle(), BReader.ReadSingle(), BReader.ReadSingle());
     }
     return fp;
 }