Ejemplo n.º 1
0
 private void OnGyrometerUpdated(object sender, GyrometerReading reading)
 {
     //expects GyrometerX, Y, Z to be defined as fields
     GyrometerFiltered.add(reading.X, reading.Y, reading.Z);
     float[] filteredAvg = GyrometerFiltered.getFilteredRounded();
     GyrometerX.Text = "" + filteredAvg[0];
     GyrometerY.Text = "" + filteredAvg[1];
     GyrometerZ.Text = "" + filteredAvg[2];
     //var properties = new Dictionary<string, string>
     //    {{"name", m_robot.Name}};
     //var results = new Dictionary<string, double>
     //    { { "X", filteredAvg[0]}, { "Y", filteredAvg[1]}, {"Z", filteredAvg[2] }};
     //insights.TrackEvent("Gyrometer Update", properties, results);
     Debug.WriteLine(string.Format("Accelerometer" + Environment.NewLine + "X: " +
                                   filteredAvg[0] + ", Y: " + filteredAvg[1] + ", Z: " + filteredAvg[2] + Environment.NewLine));
 }
Ejemplo n.º 2
0
 private void getFilter(object sender)
 {
     //expects GyrometerX, Y, Z to be defined as fields
     float[] f = new float[3];
     for (int i = 0; i < 3; i++)
     {
         f[i] = RandomFloat();
     }
     filter.add(f[0], f[1], f[2]);
     float[] filteredAvg = filter.getFilteredRounded();
     //var properties = new Dictionary<string, string>
     //    {{"name", m_robot.Name}};
     //var results = new Dictionary<string, double>
     //    { { "X", filteredAvg[0]}, { "Y", filteredAvg[1]}, {"Z", filteredAvg[2] }};
     //insights.TrackEvent("Gyrometer Update", properties, results);
     Debug.WriteLine("New CSV Write");
 }