All posts

Arriving at the door is a circle, and leaving is a wider one

In a test in the iPhone Simulator, the door of a test place had its position on Earth worked out from the place’s alignment, and the simulated phone was put 12 metres away from it. The app reported that it was about 12 metres from the door, and switched to its approach screen without being asked.

That switch is the hinge of every journey in iseeido. Street directions from Google Maps bring you to the door you marked. Your scan of the building takes over inside. In between, the app has to decide that you have arrived, and the obvious way to decide it doesn’t work.

A point you can’t reach

The street leg ends at a coordinate that is accurate to a few metres at best. A phone’s location is an estimate, and each time iOS reports one it also says roughly how far off it might be. Wait for the dot to land exactly on the door and you could wait a long time.

So arrival is a circle around the door, and the phone’s own estimate sets its size. The radius is three times the accuracy the phone reports, kept between 25 and 120 metres. A good fix gives a tighter circle and a poor one a wider circle, so the app doesn’t wait for a precision the phone can’t give.

Leave Arrive Door You
The approach screen appears inside the solid circle. The street map only comes back outside the dashed one.

Why one line isn’t enough

A single circle causes a different problem. Location never sits still: each new estimate lands somewhere slightly different, and while you walk the location updates arrive several times a second. Stand right on the edge of one circle and you would be inside, then outside, then inside again, and the whole screen would flip between the street map and the approach screen with you.

So there are two circles. You enter the approach at the first. You only drop back to the street at the second, which is 1.6 times as wide. At the smallest size, that means in at 25 metres and back out at 40. The general name for this is hysteresis: the line you cross on the way in is not the line you cross on the way out.

25 m 40 m Door Arrive Leave You
At the smallest size: in at 25 metres, out at 40. A wobble across the first line changes nothing.
  • 3×the accuracy your phone reports, which sets the arrival circle’s radius
  • 25 to 120 mthe smallest and largest that circle can be
  • 1.6×how much wider the circle you have to leave is
Three worked examples

The rule is the same each time: three times the reported accuracy, kept between 25 and 120 metres, and 1.6 times that to leave.

  • If the phone reports 5 metres, three times that is 15, below the minimum, so you arrive at 25 metres and leave at 40.
  • If it reports 20 metres, you arrive at 60 metres and leave at 96.
  • If it reports 50 metres, three times that is 150, above the maximum, so you arrive at 120 metres and leave at 192.

What happens inside the circle

Crossing the first circle doesn’t start indoor guidance. The approach screen appears by itself, and indoor guidance starts when you tap Start indoor navigation. That step can’t be automatic. The indoor leg can’t begin until the camera recognises the room, which needs the phone held up, takes seconds, and is allowed to fail. Sliding silently from one leg to the other would leave you watching a spinner.

While the camera is still looking, the approach screen draws your position on the floor plan as a disc the size of the reported accuracy, not as a dot. That is the honest shape of what the phone knows at that moment. And while it is still looking for where you are, you can always go back to the map.

  1. On the street. Turn-by-turn directions from Google Maps take you towards the door you marked.
  2. Inside the first circle. The approach screen appears by itself.
  3. Tap Start indoor navigation. Hold the phone up, camera facing forward, while it recognises where you are.
  4. Recognised. A route on the screen, spoken directions and vibrations lead you to the exact spot.

What it means with the phone in your hand

You get one change of screen as you near the door, and it stays changed, even if you stop on the pavement to get your bearings and your location wanders a little. The decision to go inside stays yours, made with a tap, at the moment you are ready to raise the phone.

It is also why marking the door matters. Without a door, street directions end at the point where the scan started, which is often the middle of a room. With one, they end at the way in, and that is where the handoff happens.