Hauk icon indicating copy to clipboard operation
Hauk copied to clipboard

New Metric: Altitude

Open tuffnerdstuff opened this issue 3 years ago • 15 comments

Hi, I just came across your excellent project! As I want to use Hauk to keep track of my buddies when paragliding, I'd also like to have the altitude displayed. I made all necessary changes to the android app, backend and frontend (plus some refactoring) and hope you find it useful. I tested both unencrypted and encrypted communication and it looks fine. Let me know if something needs to be changed and feel free to cherry pick if you don't like my refactorings.

Cheers!

P.S.: If I find the time I would like to incorporate the OpenElevation API in order to get the height above ground and maybe also a custom icon for when the tracked user is airborne.

tuffnerdstuff avatar Mar 27 '21 16:03 tuffnerdstuff

This looks very good, and a welcome addition to the project.

Thank you, I'm glad you like it :) I'll find a solution for your remarks and update the pull request.

I've proposed some changes that are mainly in how the markers are rendered. I suggest moving the altitude display to its own line underneath the velocity to make the marker label a bit more compact; see proposed changes.

I agree, that would look much nicer!

Maybe it would be an idea to also allow altitude to be hidden? I.e. an altitude_unit of NONE that would hide it from the map altogether. From my experience, altitude fixes on phone GPS units can be.. inaccurate, and for most users, knowing user's altitudes probably isn't of great importance. Although for your use case, altitude display looks to be a very useful feature, and should definitely be included.

Supporting altitude_unit of NONE also came to my mind, but I thought that maybe you might want to use the unit in some other place in the future, independent from one specific metric. So I would suggest to add flags for each metric like display_speed and display_alt_amsl. This also has the advantage that you can freely choose to enable/disable metrics which have the same unit, like altitude above mean sea level and altitude above ground or absolute speed and average speed.

Any considerations on how to handle cases where a device only reports a 2D fix? Currently it appears to default to 0.0 meters, or the last available altitude, if any.

If Location.hasAltitude() (Android client) is false, then I would suggest either displaying n/a as value or not displaying the altitude at all. I prefer the latter solution, because it does not waste valuable screen estate. Although, If the device sends bogus values, I don't think there is anything we can do about it.

tuffnerdstuff avatar Mar 31 '21 12:03 tuffnerdstuff

Regarding the metric panel, I played around on JSFiddle a bit. What do you think about this:

Style 1

image

Demo: https://jsfiddle.net/hqwjaxo8/2/

Style 2

image

Demo: https://jsfiddle.net/hqwjaxo8/3/

Style 3

I tested both styles in the frontend and it looks a bit dodgy. The monospaced labels look good in the demos, but in the frontend they look strange. Therefore I made it much simpler and now it looks fine to me.

image

I did not include "AMSL", because there is no other altitude value, yet.

tuffnerdstuff avatar Apr 01 '21 12:04 tuffnerdstuff

@tuffnerdstuff thanks for this very good idea ! I would like to try it and I have checked-out my branch to your PR and added the parameters to my config.php, but when I am watching the files changes, it seems that the Android App needs to have some changes...I don't have any dev machine or env, is there a simple way to create the apk somehow? excuse my ignorance, I never tried to build/compile an Android app before.

2Belette avatar Apr 27 '21 22:04 2Belette

@2Belette I doubt that there is something like a 1-click option to compile an arbitrary Android Project. That said, it is much easier nowadays to set up your machine to do so than it was a few years ago. If you have any kind of Mac/Windows/Linux PC, just grab the Android SDK (command line tools are sufficient to compile), it's not too hard to set up. If you just want to try it out and/or you don't want to start hacking, then here is my locally built version. Use it on your own risk, though, it's always safer to compile stuff yourself.

tuffnerdstuff avatar Apr 27 '21 22:04 tuffnerdstuff

Sorry about being super late to get back to this. I've had a lot of other things on my hands and kind of forgot about this pull request.

I'm not sure if we need both velocity and altitude to be explicitly labeled. My main concern was that altitude would be easy to mix up with distance (e.g. distance from map viewer) without labeling that specifies it as the altitude. I'm wondering if we could either stick to just e.g. "353.1 masl."/"1022 ft.amsl", or if we could maybe use icons in front of the labels as a replacement for text (which could also be more translation-friendly).

Something like this is the concept I'm thinking of:

🚶 3.4 km/h ⛰️ 351.3 m

I don't have time to make a mock-up right now, so I just used emoji for that demo, but I'm thinking we could use some kind of monochrome icons that fit well with the rest of the design. Let me know what you think, and I can write up a demo and post it this weekend.

bilde2910 avatar Apr 30 '21 08:04 bilde2910

On my side I really like your idea!

2Belette avatar Apr 30 '21 12:04 2Belette

@bilde2910 would it be hard to maybe publish a beta version on F-Droid that we can test? I saw the concept of pre-release version which is not proposed to users but available when Unstables update option is ticked only

2Belette avatar Apr 30 '21 21:04 2Belette

Sorry about being super late to get back to this. I've had a lot of other things on my hands and kind of forgot about this pull request.

No problem :)

I'm wondering if we could either stick to just e.g. "353.1 masl."/"1022 ft.amsl", or if we could maybe use icons in front of the labels as a replacement for text (which could also be more translation-friendly).

Using icons was exactly what I was thinking too. I did a cursory search for suitable icons in the fontawesome set, but couldn't find anything. Maybe you're luckier than me :) I was thinking about some speedometer icon for "speed" and an arrow pointing upwards above wavy lines (water) for height AMSL. In that case we could also leave out the AMSL, as the icon would express the meaning.

tuffnerdstuff avatar May 02 '21 18:05 tuffnerdstuff

@bilde2910 just wondering if you plan to merge/integrate this nice feature soon into the F-droid app ? Or if something prevents it from happening ? many thanks!

2Belette avatar Jun 29 '21 09:06 2Belette

Using Hauk almost to all my trails and this enhancement would be very useful, I am wondering if the project is dead/in maintenance mode @bilde2910 ? it seems that what @tuffnerdstuff PR - work is 99% ready, is there anything can be done to be integrated in the addition of the Android App to make it happens ? Many thanks for the good job

2Belette avatar Mar 07 '22 09:03 2Belette

@2Belette if I recall correctly @bilde2910 wanted icons instead of text labels, so if you would like to help getting the feature merged, then feel free to propose a nice GUI solution.

tuffnerdstuff avatar Mar 07 '22 17:03 tuffnerdstuff

I've honestly been meaning to look into this pull request and the other issues on the repository for a while, but it's fallen completely off the radar, and for that I'm sorry. The truth is, I've been rather overwhelmed with commitments due to university and work, so I haven't been able to work on this project at all for a long time.

I've been thinking of passing the main responsibility for the project to someone else, so that the project doesn't just die off. I haven't entirely made up my mind yet, but if anyone has any thoughts about this, I'd be happy to discuss. I'm open to granting co-contributor rights to the repository to someone else.

bilde2910 avatar Mar 07 '22 18:03 bilde2910

@tuffnerdstuff @bilde2910 for this particular PR is it just a matter of icon vs. text which is blocking it or anything else ? If we want to stick with the current speed, text is fine but I think any of them is cool as long as we have the option it would be a very nice add-on. For the project globally, it would be indeed to bad if it would be abandoned as I really like it !

2Belette avatar Mar 07 '22 21:03 2Belette

Is there any reason why this great proposal is still at the the same stage and blocked ?

2Belette avatar Sep 17 '22 09:09 2Belette

@bilde2910 would you consider to add this PR in the coming versions ? I am glad to see that the project is still live and your are back! So glad when I saw this morning F-Ddoid to propose the update

2Belette avatar Aug 20 '23 06:08 2Belette