Comments (5)
Hey @max-krichenbauer
Did you find a way to get a degree value or something like that from the magnetometer outputs? It is hard to find anything on the internet about using the magnetometer values of the HoloLens...
Edit: So, I received values like x: 400 y: 400 z: -200 +/- around 40 depending on what direction I looked at. I had to remove the hard iron distortion by getting the max and min value of each axis and removing the mean value of those from the incoming values.
Example: When rotating the headset I gathered a max-X value of 420 and a min-X value of 380. So now I remove the mean value (400) from all incoming x-values. That way the values I get are centered around 0 and not around 400 anymore. Same goes for the y and z axis.
Then I used the atan to get degree values from my Y and Z:
if (magValueZ > 0) magDegrees = 90. - ((double)atan(magValueY / magValueZ) * 180. / (atan(1) * 4));
if (magValueZ < 0) magDegrees = 270. - ((double)atan(magValueY / magValueZ) * 180. / (atan(1) * 4));
if (magValueZ == 0 && magValueY < 0) magDegrees = 180;
if (magValueZ == 0 && magValueY > 0) magDegrees = 0;
X is not needed. Might be different in your case because @max-krichenbauer apparently received my z values on his y. No idea how that works though.
(atan(1) * 4) is just Pi.
So in the end I received the clockwise degrees starting at north. 0 is north, 90 is east, 180 sout and 270 west.
from hololens2forcv.
Hey Max,
have you had any update regarding data extraction from the IMU sensor?
from hololens2forcv.
Hi @ozgunkaratas
Through other channels, I received the following explanation:
They *think* the units for the returned values are micro-teslas.
[...]
I'm guessing that the HL2 only uses the magnetometer to sense relative heading.
So it's probably not calibrated to do more than that.
For example, the research API does not give any extrinsic calibration data on how the magnetometer is precisely oriented to the coordinate frames of the other sensors or cameras.
This would also explain why they aren't 100% sure of the units – because they might only be looking at how the direction of the magnetic field changes with HL2 orientation (and not using the absolute field strength).
from hololens2forcv.
Hi @max-krichenbauer
thank you for your update, i was able to compare HL magnetometer data with my external IMU sensor which outputs field strength information in 3 axes in units of Tesla and the HL and the IMU do not match with each other whatsoever. I think you are right in the sense that this is used for sensing relative heading.
from hololens2forcv.
Hi
Hello!
I'm reading the magnetometer values from the Hololens 2, but I can't figure out what they are supposed to mean or if my readings are erroneous.
The documentation doesn't state any unit of measurement or meaning for these values.When I tested it, the values where [464, -198, 483] and after turning 180 degrees they were [456, -223, 463].
What do these values mean an how are they to be processed.Thank you!
Best regards,
Max
Hi Max,
Please how did you get the magnetometer values ?
Best regards
from hololens2forcv.
Related Issues (20)
- Streaming Sensor Data HOT 1
- What is the RGB autofocus camera sensor's resolution?
- Getting pixels per mm of Depth Camera
- variable sampling frequency of rgb and depth cameras in StreamRecorder application
- CameraWithCVAndCalibration runtime error: Unable to activate Microsoft Store app HOT 3
- Can I get spatial mapping directly from the Research Mode?
- PV camera frame's origin HOT 1
- Interpreting depth camera data
- Samples cannt install after the system is updated HOT 1
- Explanation about vectors in StreamRecorder
- sample code StreamRecorder can compile on unity?
- Low resolution on PV stream HOT 1
- Long Throw mode resolution
- Undistort frames from LF camera
- Any ways to extract the TSDF volume?
- A question about getting the 3D coordinates in world space coordinates system according to a pv image point HOT 1
- HOLOLENS 2 RESEARCH MODE COORDINATE SYSTEM AND ROTOTRANSLATIONS BETWEEN SENSORS
- Low-signal depth mode in the Windows 11 update
- problem with git lfs
- Internal Error when Deploying Sensor Visualization(twinapi.core.dll)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hololens2forcv.