Skip to content

MagneticField

Magnetic field of the device in 3D space, measured in microteslas μT for each three-dimensional axis. Typically captured by a magnetometer sensor.

Data type CarpDataTypes.MAGNETIC_FIELD.

Inheritance
Annotations

Constructors

MagneticField.fromJson

MagneticField.fromJson(
  1. Map<String, dynamic> json
)

MagneticField

MagneticField({
  1. double x = 0,
  2. double y = 0,
  3. double z = 0,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

x

double x
getter/setter pair

y

double y
getter/setter pair

z

double z
getter/setter pair

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.