Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by GuardianArchangelJohn · Apr 15, 2015 at 07:41 PM · iphoneaccelerometergyroscopesensor

Obtaining and Filtering Gyroscope/Accelerometer Data

As explained here: http://www.pieter-jan.com/node/11

The Gyroscope data that I'm getting from an iPhone in Unity 5 tends to drift over time after even about a minute it drifts from its original position in Unity in relation to its original physical position.

Is there some Unity C# code that implements a Complementary filter that does a gyroscope/accelerometer fusion? The C code in the link also looks like it only does roll/pitch and I need the yaw too.

Basically I want to put my iPhone on an armband and have it TCP/IP over WiFi to my PC to use as an armband controller for the PC much like a poor man's MYO armband.

If that works, then I want to figure out ALSO how to do this with an Arduino and Gyro/Acc setup to PC via Bluetooth. I'll tackle one thing at a time though, I'd like to figure out both solutions just for the sake of learning. :P

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by GuardianArchangelJohn · Apr 22, 2015 at 04:24 PM

I managed to find a white paper from TI about integrating a direction cosine matrix (I'm not sure of all the math behind it) to implement a nine axis fusion of gyroscope/accelerometer/magnetometer to get more accurate results.

http://www.ti.com/lit/an/slaa518a/slaa518a.pdf

Not sure if the magnetometer on iPhone is 3 axis or just yaw? I'd have to check.

Would really be nice to get such a thing implemented in Unity, although if I can communicate with Unity over Bluetooth like I can with my MYO, it might just be better to implement a hardware solution.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Sensor Fusion - Angular Velocity 0 Answers

Racket gesture using the accelerometer/gyroscope on iPhone 0 Answers

Sensor fusion script for ios? 0 Answers

Sensor Fusion of Accelerometer and Gyroscope 0 Answers

External IMU data to control iOS game via BLE 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges