Float to String from 5DOF with Kalman Filter
skybot
Posts: 14
Hi all,
·
I need help from you guys.
I am using 5DOF with Kalman Filter from obex for my FPV project.
The problem is that I want to convert float number from KF to simple degree based numbers.
I think I need some kind·formula to convert the float numbers to degree based numbers something like "1234455666" to "1.5".
Does anyone know how to convert the float data to real degree based numbers?
·
I need help from you guys.
I am using 5DOF with Kalman Filter from obex for my FPV project.
The problem is that I want to convert float number from KF to simple degree based numbers.
I think I need some kind·formula to convert the float numbers to degree based numbers something like "1234455666" to "1.5".
Does anyone know how to convert the float data to real degree based numbers?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
the test screen is like;
Pitch Angle: -1002112226
Roll·· Angle: 1122110002
Yaw· Angle: -1002332003
How can I convert the data to degree based number like 1.5 or -1.0?
Please help if·you know.
Thanks.
John Abshier
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
John Abshier
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
I think I need some formula to present the degree.
pub get_angle
{{
Return the current Kalman Filtered angle as a Float in Degrees
}}
return angle
So IMU_Test should be printing out (I only checked pitch) the angle in degrees. All the answers are in the code.
A comment from IMU_RANGE also indicates degrees
{{
┌───────────────────────────────────────────┐
│ Convert gyro rate to deg/sec │
│ │
│ My Setup │
│ 2mV/deg/sec │
│ 500deg/sec │
│ │
│ 0deg/sec=2048 │
│ 500deg/sec=4096adu=2048 + 2048 │
│ each 1deg/sec = 2048/500 = 4.096 │
│ each 1=1/4.096deg/sec=0.244140625deg/sec │
└───────────────────────────────────────────┘
}}
John Abshier