Basic Features of Mini GaussSense
With , you can easily visualize the magnetic field on Mini GaussSense as well as the bipolar points (north and south), roll angle, and pitch angle of tilt.
In this tutorial, you will learn how to use the examples of GaussSense SDK to showcase the basic features of Mini GaussSense.
Open File > Examples… > Contributed Libraries > GaussSense SDK for Processing.
You can see 9 examples in the Basics folder.
We are going through the first 5 examples here.
- Draw Raw Data
- Open e1_HelloGaussSense example, you can see a function called drawRawData2D .
- This function draws the magnetic field sensed by Mini GaussSense in 2D.
- Simply change the value of this.width and this.height to create images of the size you want.
- Draw Smooth Data
- In the second example e2_UpsampledData2d , you can use the drawUpsampledData2D function to draw a smoother magnetic field.
int upsampleFactor = 5; // Set between 1 ~ 10
gs.drawUpsampledData2D(this.width, this.height, upsampleFactor);
Before moving on, let’s first take a look at the GData data type.
GData stores useful information about a polar point such as its position in the Processing window, intensity, pitch and roll angles, etc.
Get the X coordinate on the display.
Get the Y coordinate on the display.
Get the magnetic field intensity. Unit: Gauss
Get the angle of roll. Unit: Radian
Get the pitch of tilt.
Get the polarity of magnetic field. (0: North, 1: South)
- Draw/Get Polar Points
- Open e3_BasicBipolarPoints example.
- Draw different kinds of polar points with drawBasicBipolarPoints, drawBasicNorthPoint, and drawBasicSouthPoint.
- Also, simply get their information (without drawing) with getNorthPoint and getSouthPoint.
float thld = 15; // Unit: Gauss
float PointRadius = 15;
// Draw both polar points with intensity threshold
// Draw N/S polar point with intensity threshold