Blog

We believe there is something unique at every business that will ignite the fuse of innovation.

Subway TrainIn the age of the consumer, people expect service providers of all kinds to make the customer experience more positive and engaging than ever. In some industries and environments, however, the challenges can be formidable.

We recently were engaged to develop an indoor-positioning application for a large city’s subway system, so that passengers could easily find their way around inside subway stations.

Subway stations are typically difficult for people to navigate. They are large internal spaces with either sparse or congested signage and lack external references, such as the sun or a particular building, all of which can make finding your way around difficult and scary. Moreover, the stations are underground, where GPS signals don’t reach, and, without extraordinary assistance, a phone can’t figure out its own location.

Although the challenges presented by subway stations are considerable, they aren’t entirely unique. Finding your way around large hospitals, sports stadiums, airports, casinos, and university campuses can present similar issues.

For the transit authority that runs the subway system, the challenge was far more than a technical one. It was also a business issue. Making navigation easier for passengers removes anxiety from the subway experience, especially for first-time riders and tourists. That, in turn, increases ridership, driving revenue growth.

The blue dot

Typically, when you open Apple Maps inside a building, especially underground, your phone will display a small, solid-blue dot surrounded by a larger semi-transparent blue circle that represents your approximate location. Without a good GPS signal, the diameter of the larger circle is roughly 1,000 meters, because the phone is using cellular signals to determine location. What the map is telling you is that you – the small blue dot – could be anywhere in that larger circle. Given that a typical subway station isn’t likely to be any bigger than the larger 1,000-meter circle, your map isn’t helping you pinpoint your position.

Transit authority officials asked us to deliver a technology solution that would enable passengers to determine with far greater precision their location inside a subway station. They also wanted to us to provide passengers with guidance on how to get from their current location to a specific exit, to the correct platform, to the escalators, restrooms, retail shops, and other key points within the station. Finally, they wanted to make it feasible for visually impaired passengers to use smartphones to navigate the station, an environment in which a wrong turn can be fatal.

We focused on a single subway station, developing a proof of concept to demonstrate indoor positioning and phone-aided navigation in preparation for a wider deployment to multiple stations.

If you’re considering undertaking a similar project, whether for a subway system, hospital, stadium, or other venue, you may find it useful to consider the process we followed and a few of the lessons we learned along the way.

Process: from floor plans to proof of concept

Prepare your venue. The first thing to do is send your technical team to visit the space to ensure that a WiFi signal is available there. Typically, the team that manages a venue’s WiFi will have tools for determining the quality and pervasiveness of the WiFi, or as an individual, you can find many apps on the App Store that will allow an individual to get a crude approximation.

The WiFi signals don’t need to be usable by visitors to your venue, and the visitors don’t need to join the networks for iOS to use these to determine position. You don’t have to pair to the signals, and the signals don’t have to be overly dense, but you will need some WiFi coverage in the space in order to proceed. The more WiFi coverage, the better the accuracy will be. The WiFi access points don’t need to be connected to any network, they just need to be emitting a signal. There needs to be a minimum amount of WiFi signal or texture in the venue for CoreLocation (the API that provides location services) to provide accurate positioning, and though that texture can be using any available WiFi signal in the venue, it is best if the emitters are under the venue’s control.

There is a common misconception that the phone will also use iBeacons or other Bluetooth Low Energy (BLE) signals for positioning. The CoreLocation API in iOS listens to iBeacons for background triggers, but not active positioning, meaning that you can’t ready your venue for positioning by installing clusters of beacons. Third-party SDKs that do position based on beacons are available, but they require app-specific coding and configuration to operate and don’t provide as much coverage and accuracy as the native WiFi positioning.

Collect floor plans. The next step is to collect the floor plans for the venue being mapped. The floor plans need to be scale accurate as the quality of the positioning is partially dependent on the scale accuracy of the floor plans. These plans can be in AutoCAD, Shapefiles, or Esri GeoDB format and Apple with some level of interior details. If the files are not geo-referenced, and are underground, some form of reference points need to be provided to enable accurate positioning of the file. A geo-reference is the latitude and longitude – i.e., the location on the Earth – of a point on the floor plan. Geo-references are used to essentially pin your venue’s floor plan to the correct place on the map of the world. In the subway station, that proved tricky because the building was underground and had no externally visible reference point. Moreover, the original 50-year-old plans didn’t contain geo-references.

If you’re working with a building visible via satellite, be careful using that for the geo-reference points. Often the roof of a building is offset visually from the ground, providing an inaccurate reference. Choose a point as near the ground as possible for the geo-reference points. Typically, Apple will do the geo-reference work where possible.

With respect to the floor plans, you’ll need to identify private areas so they can be removed from the final product, and leave in only walls, walkways, openings, penetrations, space identifiers, shops, and amenities.

Submit the floor plans to Apple. Using the maps portal (mapsconnect.apple.com) provided by Apple, you’ll need to sign in with any Apple ID associated with your organization. This does not need to be the same ID used by your organization to submit apps to the App Store and, in many cases, is better if it is a different ID. Once you’ve submitted your floor plans via the Apple portal, Apple will take the plans and convert them to an RFC standard format called GeoJSON, so they are suitable for use in Apple’s WiFi survey app. When the conversion or mapmaking is complete, Apple will schedule the survey. We waited about 8 weeks for ours. Your mileage may vary. Apple recommended that its staff perform the first survey and that we perform subsequent surveys of the venue.

Stylize your floor plans. While waiting for the survey, you should begin programming your mobile application to integrate custom floor plans. Apple offers a sample app called Footprint (https://developer.apple.com/library/ios/samplecode/footprint/Introduction/Intro.html), which provides much of the code that you’ll need to integrate custom floor plans into your app.

To integrate a custom floor plan, you’ll need the floor plans of your venue again. Your app doesn’t need to use the same DWG drawing that you submitted to Apple. You can integrate a set of stylized or branded floor plans, but the plans you integrate must be to scale. You can remove detail, add information, or change the colors to match your brand, but the drawing must have a uniform reduction from the actual floor plans.

jc

Orginal floor plans 

jc

Stylized floor plans

You will also need to reference the latitude and longitude of the actual venue to the exact pixels within your stylized floor plan. We used the same geo-reference points provided to Apple.

Another option is to use the GeoJSON map Apple created, and they are happy to provide it for use in our app if we were able to render the file.

Get the survey completed. Apple will send a surveyor to your venue. The person will walk about the site, carrying an iPhone, and capturing WiFi signal strength and ground truthing. It took the surveyor a day and a half to survey both levels of our subway station. Apple provides thorough documentation on best practices for performing site surveys at http://help.apple.com/indoorsurvey/#/ .

Within hours of the survey, the positioning data was available for testing via CoreLocation. That meant that anyone in the subway station who opened up a mapping app on iOS (which uses Apple’s location services) would receive positioning information for inside the station. The information was fairly accurate, although not accurate enough for use by the visually impaired. (More about that in a moment.)

Although every iOS device in the vicinity now shows users’ locations, what’s unique about your app is that it contains the floor plans—unless you’ve specifically shared them with others—in addition to the positioning information.

Establish wayfinding. Although users of your app will now be able to determine their location within the venue, the app won’t help them get from one location to another until you develop wayfinding capabilities in the app.

The wayfinding logic on an Apple device is provided by MapKit, which provides the turn-by-turn directions used within Apple maps and any app that uses the Apple Maps internally. Unfortunately, MapKit doesn’t know about the internal structure of your venue, so it has no way of calculating a route through it.

Adding wayfinding to your app involves creating a virtual map of all possible turn points and connections between those points, then using an algorithm to calculate the quickest path between any two points in the map. In our work for the transit system, we used Dijkstra’s least cost routing algorithm to find the shortest path. It is possible to pre-calculate paths through your venue, but as the complexity of a venue increases (e.g., the number of entry, egress, and points of interest), the number of possible paths increases exponentially.

Combining this with positioning information, we now had a functioning app that passengers could use to navigate the station.

Build an augmented reality system.

Once we had accurate positioning and wayfinding maps, we added augmented reality navigation to the app. Traditional phone navigation presents the user with a dot on a floor plan and a path to follow. Users must convert that top-down, bird’s-eye view into the direction that they must travel. I’m sure that, like me, you’ve done this conversion incorrectly and walked half a block and had to turn around to go in the correct direction.

Augmented reality reduces the cognitive load of navigation by having the phone provide a traveler’s eye view of the route to take. The user holds up the phone, which plays the video coming from the camera and overlays the video with virtual signs, or augmentations, that provide guidance from the user’s perspective. The augmentations can include navigation information or information about points of interest. They can be actionable; for example, tap the sign to get a coupon for coffee at the donut shop in the station.

Findings

Among the key lessons we learned in the course of our project:

  • The accuracy of the positioning information we achieved was about 20 feet, which can be attributed to the lack of pervasive WiFi texture as Apple expects anywhere from 10-15 feet as typical. While that’s far better than what we had without the positioning survey, it’s not good enough for navigation by the visually impaired. (Apple advised us that the positioning wouldn’t be sufficiently accurate for visually impaired navigation.) We are researching other technologies that use computer vision (from companies such as COSYRobo and Insider Navigation), which may solve for the visually impaired use-case problem. We saw demos of this technology but didn’t have time to integrate them for our proof of concept.
  • Within a subway station, accuracy of positioning is heavily influenced by trains. For example, if you’re standing on a platform when a train enters the station, your position may jump by 30 to 40 feet. To solve that problem, we recommend increasing the number of WiFi access points that cover the space. These don’t have to be connected to a network; rather, they just need to powered on. If you add many access points, Apple will need to redo its WiFi survey. Remember that the accuracy of your positioning information is heavily dependent on WiFi availability.
  • When you’re on a train in a tunnel, your smartphone has no idea where you are. When you pull into the station and the phone starts detecting WiFi, the position jumps wildly for several seconds. We recommend establishing programmatic compensation, so that as users pull into the station they will understand that the phone is trying to get a fix.

Although the technical challenges we faced were considerable, making the subway system more manageable for passengers not only improves customer experience but it also increases ridership. Organizations in other industries also can improve the customer experience and drive revenue growth through effective use of indoor-positioning and wayfinding technologies. 

About the Author

Jack CoxJack Cox has over a decade of experience helping Fortune 500 clients build mobile strategy through technology, security and cryptography. He is a software developer, systems architect, and Managing Director at CapTech where he is responsible for the firm’s mobile software practice. Jack’s love of software development and all things mobile has driven a career developing software for businesses of all sizes including large-scale transaction processing systems, embedded software, and smart-phone software. Jack co-authored the book ‘Professional iOS Network Programming’ (Wiley). He has been involved in several startups, holds multiple patents and frequently speaks nationally. Jack is based in CapTech’s Richmond, Virginia office and helps clients both locally and across the US.

About the Author

Jack Cox
Jack Cox has over a decade of experience helping Fortune 500 clients build mobile strategy through technology, security and cryptography. He is a software developer, systems architect, and a Fellow at CapTech where he is responsible for the firm’s mobile software practice. Jack’s love of software development and all things mobile has driven a career developing software for businesses of all sizes including large-scale transaction processing systems, embedded software, and smart-phone software. Jack co-authored the book ‘Professional iOS Network Programming’ (Wiley). He has been involved in several startups, holds multiple patents and frequently speaks nationally. Jack is based in CapTech’s Richmond, Virginia office and helps clients both locally and across the US.