MerginMaps / MerginMaps/mobile

Some headings from pictures taken within the app are above 360° (iOS)

Open
#1,771 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug iOS 🍎
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

Hi,

(iPhone 7 Plus / Input app iOS v1.02)

I had a data collection campaign running this week, and one of the enumerators used an iPhone 7 Plus. I am getting **strange values for the direction the phone is facing** when taking a picture attached to the survey form, since **several of them are above 360** (where I expect values in the 0-359 range, as described here: https://developer.apple.com/documentation/corelocation/clheading/1423568-trueheading).

I have a 'direction' field set up in QGIS as automatically updated with this formula: `read_exif(@project_home + '/pictures/height/' + "Picture_Height", 'GPSImgDirection')` (`/pictures/height/` being the subfolder where the project stores this type of pictures, and `Picture_Height` being the column where the name of the picture is stored).

What I can infer from this code https://github.com/lutraconsulting/input/blob/326a8262f410439026aea2922386f098096537de/app/ios/iosinterface.mm#L157 is that the value is taken as is from the string iOS is exposing.

Any idea on why this happens ?

Gilles

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at app/ios/iosinterface.mm around line 157 and compare the heading value written for attached-picture EXIF with Apple’s CLHeading documentation. Reproduce or inspect the iPhone 7 Plus values alongside the QGIS direction formula; done means identifying why values exceed 360 and ensuring the stored heading follows the documented range.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.