-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i add an offset and magnetic declination to OverlayView drawing? #2
Comments
This is the downside to not using OpenGL, unfortunately.
One way to do this is to pre-rotate (apply the offset) all of the vertices,
before applying the rotation matrix to them.
Adam
…On Sun, May 28, 2017 at 7:07 AM, Fatih Ozcan ***@***.***> wrote:
It's easy to add an offset or magnetic declination value to
mDerivedDeviceOrientation but compass uses rotationMatrix to draw current
angle position, i don't know much about matrix rotation, how can i set
offset to rotationMatrix or is there anywhere i can add offet before
drawing perspective or orthgraphic projection?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AA76H3gNfTHZ7dzfCmsoVclYSFNdiYdMks5r-VWFgaJpZM4NongM>
.
--
Adam Ratana
[email protected]
|
Thanks for replying. I'm using your code on my app,i can use it, right? I
modified it a little bit. I know LibGDX but i've never worked on 3D. Where
should i apply it? Inside OverlayView or OrientationCalculatorImpl class,
and which line should i change? I tried to get orentation array using
*mOrientationCalculator.getOrientation(rotationMatrix,
mDisplayRotation, mDerivedDeviceOrientation); *then set rotationMatrix
from rotationMatrix.setFromEulerAngles(yaw, pitch, roll) inside
rotateView() method of OverlayVİew class but this does not work.
Thanks in advance.
|
I would like ask another question also. There is a difference between azimuth device laying flat or sceen point at me(standing AR). I haven't been able to solve this issue too. Not only all codes i tried has this issue, every compass app on Play Store has the same problem. I've seen up to 10 degrees difference on different position of the device. This is also Issue#1 |
Ah, yes, you can do this in CompassComponent.resetPoints(). What this is
doing is creating all the vertices that make up the sphere of lines. You
would add an offset here. You'll need to modify this as well as any of the
other methods that call through to it to pass the proper offset.
I'd love to see your app, let me know when it's released, or if it's out
already I'd love to check it out. It'd be nice if you referenced this
github project in the "about" part of your app.
Re: issue #1 - I'm not quite sure I would know how to fix it, without doing
a deep dive into everything.
…On Sun, Jun 4, 2017 at 5:17 PM, Fatih Ozcan ***@***.***> wrote:
Thanks for replying. I'm using your code on my app,i can use it, right? I
modified it a little bit. I know LibGDX but i've never worked on 3D. Where
should i apply it? Inside OverlayView or OrientationCalculatorImpl class,
and which line should i change? I tried to get orentation array using
*mOrientationCalculator.getOrientation(rotationMatrix,
mDisplayRotation, mDerivedDeviceOrientation); *then set rotationMatrix
from rotationMatrix.setFromEulerAngles(yaw, pitch, roll) inside
rotateView() method of OverlayVİew class but this does not work.
Thanks in advance.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA76H1MA28c23pKl6OvMGn-8-fI4SkhZks5sAx7-gaJpZM4NongM>
.
--
Adam Ratana
[email protected]
|
I've just finished it. I made a new UI. My app is an anglemeter but i was
planing to add a compass to it, i saw your project while i was looking for
a rotation vector example. I was trying to compensate angle difference
between different position's of device.
Yes, ofcourse, i will reference your project. Is there anything specific
you want me to write? I will change Play Store definition tomorrow, and
check out code and try to modify it again.
This is my app. https://play.google.com/store/apps/details?id=com.
thraciansoftware.anglemeter. I will add images of compass too but i'm done
for today.
Thanks for your code, it's really helpful. If i start to work on LibGDX 3D
it would really help me a lot i guess. But i was thinking Unity for a new
3D game. If you want to take a look at the modified code, please let me
know.
|
I added your name and project link to my app description.
|
I don't know much about referencing if you think something else better to
write please let me know. Thanks for your code.
…On Tue, Jun 6, 2017 at 8:30 PM, Fatih Özcan ***@***.***> wrote:
I added your name and project link to my app description.
|
I am not a lawyer, but one practice that is common is in your application,
if you have a help section or about section, in that section you can
mention all the libraries you are using and what licenses they are under,
with links to the github projects.
On Tue, Jun 6, 2017 at 1:32 PM, Fatih Ozcan <[email protected]>
wrote:
… I don't know much about referencing if you think something else better to
write please let me know. Thanks for your code.
On Tue, Jun 6, 2017 at 8:30 PM, Fatih Özcan ***@***.***> wrote:
> I added your name and project link to my app description.
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA76HyPC2DxBWgFYmB6-OBIeieNDCc9iks5sBY0wgaJpZM4NongM>
.
--
Adam Ratana
[email protected]
|
Okay thanks for the info, i will add your and other library references when
i create an info/help section for my app.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's easy to add an offset or magnetic declination value to mDerivedDeviceOrientation but compass uses rotationMatrix to draw current angle position, i don't know much about matrix rotation, how can i set offset to rotationMatrix or is there anywhere i can add offet before drawing perspective or orthgraphic projection?
The text was updated successfully, but these errors were encountered: