Skip to content

Comment on Show HN: Galactic Compass – an app that points to the galactic centerparent

Comments

So kind, thank you!

The reason for the phone being flat is perhaps a limitation in iOS or perhaps a limitation of mine — I don’t know which! Basically you can access deviceHeading which is a projection of the north vector onto the long axis of the device. When the phone is orthogonal to north, that becomes unreliable, so the floating arrow breaks. What I really need is the north vector, real-time updated, relative to the device itself, no projection. But it seems like that isn’t available.

Huh, when I go into your debug tab the heading value always seems to stay accurate no matter if my phone is flat or vertical. It seems to work the same as the Compass app, which similarly stays accurate.

However, I do see that the drawn arrow totally breaks down when the phone is held vertically. So I wonder if maybe it's a bug somewhere in the calculations or drawing?

Hm okay, thank you that’s a good observation.

I need to find someone more familiar than I am with combining quaternions and reference frames to lend a hand!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.