OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
402 stars 106 forks source link

Enhancement: Android: Automatic north alignment toggle #1164

Open mlerjen opened 6 years ago

mlerjen commented 6 years ago

Discussion

  1. The automatic north alignment ("ANA") is a very powerful tool, enabling proper feature positioning on sight. Thereby you can use your device as a virtual pointer. You just point the device to a feature in real world and the beam of the pointer is being represented on your devices screen (gray hairline). [ given that your GPS is accurate and your internal compass is re-calibrated regularly.]
  2. Using this technique, you do not rotate the device to align digital map with reality with the help of the internal compass. You hold it always straight in front of you and scan the real world by turning your device toghether with your body. 2018-10-24-16-04-00 fig.1. Pointing the device at the edge of a light green area.

Enhancements

  1. As for now the map just rotates around the map windows center it would be more sensible it turned around the GPS position (if available).
  2. As the focus is on the terrain ahead of the device the GPS position on the screen could be fixed and placed closer to the lower toolbar. Horizontally centered, but vertically at 1/3 of the map window.
  3. And as the top of the cream-cake the beam-line on the map could be enhanced with some sort of scale bar. This would make it very easy for those working with some range finder (instead of working with the the INFO functionality). Depending on the graphical solution this scale bar it could be permanent or to be toggled. 2018-10-24-15-19-07 fig.2. sketch of a simple scale bar (not necessarily numbered)

    Result

    In my opinion this would be a game-changer. Enhanced that way it would integrate compass, location display, distance rings, move to location and somehow the INFO button in one single functionality.

Configuration

Mapper Version: a.s.a.p. :-) Operating System: Android

ollesmaps commented 6 years ago

Relates to #1073.

dg0yt commented 6 years ago

How stable is the compass reading on your device (when you don't move it)?

I wonder if might make more sense to connect these features to the "temporary position markers" ("TPM") created by , either just the last one, or the last N (giving you crossing bearings).

puzzlepaint commented 6 years ago

My experience has unfortunately been that the magnetometers are too inaccurate to really be useful, but this is only based on using a few devices which were released several years ago, maybe there exist better ones.

As a side note, I think it could be very interesting to try to use vision-based pose estimation with ARCore to stabilize the orientation estimate. I think it should be able to give very good results as long as the device camera has a reasonable view of the ground. But while this should give very good relative precision, it will still not give good absolute accuracy on its own. Perhaps it would be acceptable when fused with magnetometer measurements, but this would still fail if those measurements have a bias (as I suspect they might have). As an alternative, perhaps it could be worth trying to fuse ARCore's pose estimates with the GPS position estimates, for example with a variant of a Kalman Filter. Then, when the GPS position moves, this is compared to the movement direction estimated by ARCore to give it information on the absolute orientation (which is not dependent on an inaccurate magnetometer). I am not sure though whether the ARCore tracking is stable enough over a long enough period of time to be able to average out the GPS noise. In case it does work, it should result in both quite accurate absolute position and orientation estimates for the device. The only big downside might be that it probably drains the battery very quickly.

In case the above works, there would be even more nice things one could try with ARCore / computer vision, such as marking an object in the camera view and having its position estimated automatically, but this gets offtopic.

puzzlepaint commented 6 years ago

Actually, an initial attempt at fusing the ARCore and GPS estimates might be very simple:

This could be extended by accounting for the accuracy estimates of the GPS estimates, and to align the height as well, but should already allow to judge whether this might be useful.

mlerjen commented 6 years ago

@dg0yt: The stability of the compass reading is not perfect but "okay" (need to re-calibrate regularly). There are small "jumps" while holding the device stable. (Maybe one could filter (average) the reading a bit more? or Introduce the possibility to pause the map adjustment-> to overrule the compass relying on other indications (basemap a.s.o.).

Personally I would see 1 & 2 as directly related to ANA, while 3 could also be related to the TPM. In contrast to TPM we have a "direction of interest" allowing to provide a more detailed scale bar towards this direction (thus more detailed scale bar if ANA and TPM are switched on?).

dg0yt commented 6 years ago

Before someone jumps into implementation :-) I have got a couple of changes on top of class Compass which should go in before any other changes to the processing of sensor readings. The key change is a adopting a functional style, i.e. properly return values (even for vectors) instead of passing in pointers. The resulting code is much easier to read and understand.

dg0yt commented 6 years ago

I have got a couple of changes on top of class Compass

Cf. #1170, especially ~9ed40d3~ 0ebcf33 (No, not a single new feature yet. But it does cut build times when touching this code.)

mlerjen commented 6 years ago

Two more comments: 1) The compass is actually very good on my "prehistoric" galaxy note 2 if re-calibrated on regularly ( 8-shape move; approx 10 times a day). I guess the compass was never the issue, but the GPS. All the compass is worthless without the proper positioning. I work with an external gps, with 1-2m accuracy most of the day. 2) I mounted a laser pointer on my device to use a direction pointer. Thus I point to a feature or to a direction with the pointer in real world and get the correspondent direction on screen by the grey hairline. The next step forward now would be to replace the pointer with a range finder... image and to connect the range finder via Bluetooth to the device and Mapper. -> a temporary mark would be shown at the distance (by RF) in the pointing direction of your device (by internal compass; instead of constructing every RF measurement by hand). As an example one could get the outline of a clearing just by pointing at its bordering objects. image

Just to let you know my vision.

I wonder if there was a standardized easy way to establish communication between a random Range Finder and Mapper.

Zerbembasqwibo commented 6 years ago

My dream is to connect a "Wii"-control (GPS/compass/Gyro to get best result), voice command to change symbol, possibiity to draw line/area and at same time combined with possibility to add point objects, kind of left/right mouse click. Forgive my off topic message!