cant understand?

Solved!
Posted in General by David Kachlon Tue May 08 2018 23:59:29 GMT+0000 (Coordinated Universal Time)·13·Viewed 334 times

getDisturbanceLevel method which indicates the maximum disturbance value reached ( this value is between 0 and 255 per sensor). getInnovation method which returns an array of 32 indicators of perturbation per sensor (those values are between 0 and 255 ). What's the difference between getInnovation and getDisturbanceLevel ???
May 9, 2018

Also, if either can be picked up/output on a per sensor basis...

May 22, 2018

Hi,

The getInnovation function returns all disturbance values measured by each sensor (magnetometer) in the form of an array of 32 values. The maximum value of this array is the level of disruption returned via the getDisturbanceLevel function.


marked this as solved
May 22, 2018

Can you please show me an example of how to call getInnovation in Objective-C ?

May 22, 2018

Hello,

In order to detect the magnetic disturbance and use those features you should subscribe to AUTO_LOC_QUALITY like below:

slateManager->subscribe( AUTO_STATUS |
AUTO_SOFTWARE_EVENTS |
AUTO_HARDWARE_EVENTS |
AUTO_LOC_QUALITY) ;

Then you can receive the EVT_LOC_QUALITY event by adding the corresponding case to the processEvent method like below :

case EVT_LOC_QUALITY:
{
EventLocQuality &ev=event.LocQuality;
NSLog(@"Localization status : %d",(int)ev.getLocStatus());
NSLog(@"Disturbance level : %d",(int)ev.getDisturbanceLevel());
}
break ;

Rabeb for the ISKN team.

May 22, 2018

I've done so and I don't receive any messages... how often and when should the subscritption occur?

May 22, 2018

Hi again,

Can you please check your firmware version?

The magnetic indicator features are available since the firmware version 4.0.16.0 of the Slate 2 ( or firmware version 3.0.16.0 for the the Slate ) so it’s mandatory to update you Slate firmware via the Imagink App for PC or MAC .

May 22, 2018

Also - you didn't show me how to use getInnovation - please with a way to log the output...

May 22, 2018

Thank you! One last request - can you show me how to call getInnovation as well as NSLog it ?

May 22, 2018

Hi David,

you can retrieve the array from the getInnovation function as below :

     char innovation[32] ={0};
     memcpy(innovation, ev.getInnovation(), 32);
     for(int i=0;i<32;i++)
            NSLog(@"Disturbance value : %d",(int)innovation[i]);
May 24, 2018

Hi Rabeb,

the code you showed me is not returning values 0-255... it is displaying negative numbers etc.

May 24, 2018

Hi Rabeb,
one more question. How do I detect the power of each 32 magnetic sensor? ie: 0 when the pen is close and 255 when its far

May 25, 2018

Hello David,

Having negative values is really weird, is it repeatable?

The values between 0-255 represent the level of the magnetic disturbance.
0 means that the sensor is not perturbed at all, 255 means that the sensor detects a lot of disruption. The more the disturbance source is close to the slate, the higher the value of the sensor is. Which means 255 when the magnetic disruptor is so close and 0 when its far.

May 25, 2018

Yes it’s releatable

Markdown is allowed