3
Shardj
1y

I've been given two months to make an AR app that gives information on buildings seen out of the window of a client's skyscraper office.

So off I go, smash together some Ar.js in a few days because it looks easy. Yet I quickly find out that the compass on mobile phones are completely trash. Every device I try has true north randomly chosen from anywhere between 10 degrees wrong or full on 180 degrees the opposite direction. It's a miracle that none of these devices have managed to stumble onto true north by luck. I'm getting suspicious that ar.js is actually just mapping coordinates based on north instead of true north or something ridiculous. This likely won't be helped by GPS interference from the skyscraper.

It isn't helped that ar.js is a steaming pile of bugs on top of bugs, many of the examples taken straight from documentation straight up don't work.

I'm trying to get ar.js with three.js now in the hope that I can figure out some kind of true north calibration controls as an offset to whatever the phone says north is.

If anyone has any suggestions for a better solution that would be grand.

Comments
  • 1
    @horus I had a working prototype finished in a few days apart from the compass being dodgy and ruining the whole thing. It's just plugging in a few 3d models of giant map pins with latitude and longitude and some on click functionality to bring up images with the desired info. So I don't think it's really that ambitious.

    My boss doesn't like the idea of having to calibrate true north by dragging so I have literally no idea how I'm meant to fix the fact that phone compasses are shit.
  • 3
    Have the user point at the sun and the horizon, locate these two on screen with image recognition and use the accurate GPS and clock to identify where they should be compared to north?
  • 1
    I don't know what to do at night or when the sun is on the other side
  • 0
    @lorentz yeah I was thinking something like a marker image might work, I'll just have to figure out how to get it done within the library
  • 0
    @horus just finished it today, travelling up to the client next week for sign off
Add Comment