An apparatus-based method for calibration of a three-dimensional, 3D, field sensor comprised in an apparatus, said method comprising: accessing a plurality of first samples, the first samples from the 3D field sensor, each first sample representing a magnitude and an orientation of a 3D field sensed by the 3D field sensor; selecting a plurality of second samples from the first samples using an orientation of the apparatus determined with at least one orientation sensor comprised in the apparatus in selecting each second sample; using the plurality of second samples, determining a plurality of parameters of an ellipsoid, wherein the determining the plurality of parameters is performed so that the ellipsoid fits the plurality of second samples; determining a transformation that transforms the ellipsoid into a sphere; applying the transformation to at least one of a first sample and a second sample to create a transformed sample; and using the transformed sample to determine at least an orientation of the apparatus; wherein selecting a plurality of second samples from the first samples comprises: quantizing the orientation determined with the at least one orientation sensor corresponding to a first sample into a given one of three directions, each direction corresponding to a bucket; based on a direction for the orientation, assigning the first sample to a given bucket; determining whether a number of second samples already assigned to the given bucket is a largest number of second samples assigned to one of the three buckets; and in response to the number of second samples assigned to the given bucket being not the largest number of second samples assigned to one of the three buckets, assigning the first sample to the given bucket as a second sample. accessing a plurality of first samples, the first samples from the 3D field sensor, each first sample representing a magnitude and an orientation of a 3D field sensed by the 3D field sensor; selecting a plurality of second samples from the first samples using an orientation of the apparatus determined with at least one orientation sensor comprised in the apparatus in selecting each second sample; using the plurality of second samples, determining a plurality of parameters of an ellipsoid, wherein the determining the plurality of parameters is performed so that the ellipsoid fits the plurality of second samples; determining a transformation that transforms the ellipsoid into a sphere; applying the transformation to at least one of a first sample and a second sample to create a transformed sample; and using the transformed sample to determine at least an orientation of the apparatus; wherein selecting a plurality of second samples from the first samples comprises: quantizing the orientation determined with the at least one orientation sensor corresponding to a first sample into a given one of three directions, each direction corresponding to a bucket; based on a direction for the orientation, assigning the first sample to a given bucket; determining whether a number of second samples already assigned to the given bucket is a largest number of second samples assigned to one of the three buckets; and in response to the number of second samples assigned to the given bucket being not the largest number of second samples assigned to one of the three buckets, assigning the first sample to the given bucket as a second sample. quantizing the orientation determined with the at least one orientation sensor corresponding to a first sample into a given one of three directions, each direction corresponding to a bucket; based on a direction for the orientation, assigning the first sample to a given bucket; determining whether a number of second samples already assigned to the given bucket is a largest number of second samples assigned to one of the three buckets; and in response to the number of second samples assigned to the given bucket being not the largest number of second samples assigned to one of the three buckets, assigning the first sample to the given bucket as a second sample.