JUST LEAVING THIS HERE
Vuzix Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



JUST LEAVING THIS HEREExpand / Collapse
Author
Message
Posted 12/20/2009 10:39:02 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2/7/2010 11:57:49 PM
Posts: 31, Visits: 36
The yaw drifts when you look up for one simple reason. The earth is round. Magnetic north is not directly north of you, it's north and DOWN.
For a long time I've been trying to figure out something to accomodate this, and I MAY have something that can do it. Not promising anything, but if you want this in your things just to mess with it, go ahead...




//DO NOT ZERO OUT THE VR920!!!
//The VR defaults to perfect calibration relative to the earth for yaw, and directly away from magnetic north for pitch.

var.angle = -26.5 /*Angle between you and the magnetic pole. This is if you were facing that direction exactly, looking forward, how far down it would be. I crudely got it from google maps.*/

/*I set 45 for how much it should change because it seemed to be correct. Mess with this if it's wrong, it could be a sensitivity thing.*/
debug = Vr920.yaw+(sin(vr920.pitch+var.angle)*sin(abs(vr920.yaw))*45) + ", " + vr920.pitch




If you wanna use continuousyaw for the tracking, don't change it in the equation. In fact, minus the first VR920.yaw in the line would make it an offset.
*EDIT* - IT WORKS! I did something wrong though. Here's the right equation
var.yawoffset = (sin(vr920.pitch-var.angle)*sin(vr920.yaw)*45)
Add that to the yaw for perfect tracking. However, it goes insane ABOVE the offset degrees.

*EDITEDIT* Fixed insaneness. Has some trouble around poles but works excellent otherwise.

Going to put up a script for everyone soon.

*EDITEDITEDIT*

Integrated the code into the improved crouch/mouselooking script I already put up. Enjoy! http://forums.vr920.com/Topic4679-8-1.aspx
Post #4690
Posted 1/2/2010 3:14:47 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2/7/2010 11:57:49 PM
Posts: 31, Visits: 36
Okay, need some help here, found my problem.

This finds what the adjustment should be as a result of what it actually is.
It needs to be the other way around.

Can someone good in calculus figure out Realyaw as a result of Badyaw? Here's the equation to convert
R = Actual yaw
B = VR920 (flawed) yaw
A = angle
P = pitch

B = (sin(P+A)sin(R)*45)+R
Post #4720
Posted 1/7/2010 10:59:23 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2/7/2010 11:57:49 PM
Posts: 31, Visits: 36
Kay, got a friend to inverse it, I give up for now, I need to make a monitering program or something to determine the best equation...
Post #4743
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: TechSupport, Daddo, Tech_Support

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 6:47am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.031. 9 queries. Compression Enabled.