Exemplo n.º 1
0
        // https://github.com/sfwa/TRICAL
        public TRICAL(float[] expectedField, float norm, float noise = 1.5f)
        {
            handle = TRICALWrapper.CreateTRICAL();

            TRICALWrapper.TRICAL_init(handle);
            TRICALWrapper.TRICAL_norm_set(handle, norm);
            TRICALWrapper.TRICAL_noise_set(handle, noise);
            ExpectedField = expectedField;
        }
Exemplo n.º 2
0
        public float[] Update(float[] raw)
        {
            TRICALWrapper.TRICAL_estimate_update(handle, raw, ExpectedField);

            float[] calibrated_reading = new float[3];
            TRICALWrapper.TRICAL_measurement_calibrate(handle, raw, calibrated_reading);

            calibrated_reading[0] = TRICALWrapper.TRICAL_cx_get();
            calibrated_reading[1] = TRICALWrapper.TRICAL_cy_get();
            calibrated_reading[2] = TRICALWrapper.TRICAL_cz_get();

            return(calibrated_reading);
        }
Exemplo n.º 3
0
 public float GetNorm()
 {
     return(TRICALWrapper.TRICAL_norm_get(handle));
 }