CoreLocation location with incorrect floor and level property

Hi All,

I would like to bring to your attention an issue I’m experiencing while using the Indoor Maps Program.

I have already fingerprinted floor 0 and 2 of a venue with Apple’s Survey app and indoor locations are already live.

I have also been able to receive location updates from CoreLocation API, floor (CLFloor) object within location (CLLocation) is not nil and is returning floor level values.   However, when I am first transitioning from one level to another (say 2 -> 0), I do get a few locations back with floor equal to -1, which I believe is wrong and should be nil instead, if anything.

Also, I have noticed that this is also happening if requesting for location updates for the first time, on any app that requests location updates with CoreLocation, indoor maps program aside. I have noticed how floor object (CLFloor) within location (CLLocation) is not nil, and level is equal to -1 on the first few locations that come back.

According to Apple’s Documentation:

Level values represent logical levels above or below ground level and are not intended to correspond to any numbering scheme in use by the building itself. The ground floor of a building is always represented by the value 0. Floors above the ground floor are represented by positive integers, so a value of 1 represents the floor above ground level, a value of 2 represents two floors above ground level, and so on. Floors below the ground floor are represented by corresponding negative integers, with a value of -1 representing the floor immediately below ground level and so on. It is erroneous to use the user’s level in a building as an estimate of altitude.  

CLLocation    var floor: CLFloor? { get }       var level: Int { get }

Hence, this issue seems like a bug. Could you please indicate to me if this is indeed the case, or if this is to be interpreted somehow, please?  

I can imagine this might be a radar among thousands of them that you might receive, but I would greatly appreciate it if someone could please get the time to investigate it 🙏.

Honestly looking forward to hearing and learning from you.

Kind regards,

Inigo M.

CoreLocation location with incorrect floor and level property
 
 
Q