bearing

The bearing — the horizontal direction of travel of this device, measured in degrees and relative to due north.

Values are measured in degrees starting at due north and continue clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on.

null — and only null — means the bearing is missing or invalid: no numeric value is a sentinel. In particular -1 is a legal bearing (359 degrees), because a route-derived bearing comes from Turf's bearing, whose range is -180..180, while a device-derived one is Location.getBearing()'s 0..360.