Open Lelelo1 opened 4 years ago
Making a translation, the calibrated data that comes out is the same as raw input data
When running from a c console program I also get NaN
, just as I got when running from C#. So there is probably something wrong in the library?
expected_field
- I assume is earth's magnetic field from world magnetic model? Sensor data is in ENU
coordinate system, can a mismatch with wmm (which i think is in NED coordinate system) - causing NaN after first update?
I have manage to interact with the library to some degree from C#.
The raw magnetometer on iphone11 on the left and the
calibrated_reading
float array values to the right as System.Numerics.Vector3:I can set and get norm just fine. The first app update I get values back, but then there is only NaN values.
Here is the update code in the C# wrapper library:
The
handle
is some sort of pointer to theTRICAL_instance.t
, being ofTRICALSafeHandle : SafeHandleZeroOrMinusOneIsInvalid
in C#Also I had to change c -> cpp and remove
retsrict
keyword to remove error. The dll building guide seem to require cpp.So is this problem, communicating between C# <---> C++, or what could be the problem?