Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waypoints Management #40

Open
jgauchia opened this issue Jun 9, 2023 · 3 comments
Open

Waypoints Management #40

jgauchia opened this issue Jun 9, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request high-priority High Priority

Comments

@jgauchia
Copy link
Owner

jgauchia commented Jun 9, 2023

Summary

Add the option to save/load waypoints in GPX format.

@jgauchia jgauchia added the enhancement New feature or request label Jun 9, 2023
@jgauchia jgauchia self-assigned this Jun 9, 2023
@jgauchia jgauchia added the medium-priority Medium Priority label Jul 3, 2023
@robertlipe
Copy link

As a corollary to this, is it possible to pass an array of lat/lon/icons (and maybe labels) to have them overlaid on the PNGs as they're rendered and still have them scaled and rendered properly? Bonus points if you can register a click handler when a point is selected. I looked in the code and didn't find a way to do this, but I haven't checked it out and run it.

There's some non-obvious math in just scaling wgs84 latlongs to screen coordinates due to that annoying curvature of the planet. What works well at a tile center works poorly near tile boundaries and they can be hard to keep in place when the map moves. It may take more than Pythagorean to make it look right, depending on how the tiles are generated.

It needs to be high performance as there could be many hundreds of points on a map. Other than not being able to handle selection events, I considered generating a transparent png overlay and merging them at tile load time, but that's hard to keep dynamic, such as being able to selectively disable some from view or change their icons on the fly.

Im hoping this code is already there and you can point me to adding such icons and handlers. I'm in the early stages of an ESP32.project and am "shopping" for blocks of code I can reuse and I really like the looks of this project.

I really like the code. Very clean!

@jgauchia
Copy link
Owner Author

jgauchia commented May 1, 2024

Hi thank you for your comments (sorry for my English).

As a corollary to this, is it possible to pass an array of lat/lon/icons (and maybe labels) to have them overlaid on the PNGs as they're rendered and still have them scaled and rendered properly? Bonus points if you can register a click handler when a point is selected. I looked in the code and didn't find a way to do this, but I haven't checked it out and run it.

The version in the master branch uses pre-generated tiles in PNG format. Currently, in the dev branch, I'm implementing vector maps (thanks to another ESP32 GPS project that I've found in github) that are generated directly on the ESP. I see it "possible" to add labels to overlay them on the map, either in the current PNG format or in the one I'm working on, as well as adding a handler for the touch input. Currently, none of that is in the code, but it would be a good challenge.

This is an example of the vector map.

vectorial

There's some non-obvious math in just scaling wgs84 latlongs to screen coordinates due to that annoying curvature of the planet. What works well at a tile center works poorly near tile boundaries and they can be hard to keep in place when the map moves. It may take more than Pythagorean to make it look right, depending on how the tiles are generated.

Understood, my knowledge in GPS position handling, conversions, etc., is somewhat limited. I'll keep that in mind as the project evolves.

It needs to be high performance as there could be many hundreds of points on a map. Other than not being able to handle selection events, I considered generating a transparent png overlay and merging them at tile load time, but that's hard to keep dynamic, such as being able to selectively disable some from view or change their icons on the fly.

In the dev branch, I'm already working on adding elements to the map screen. In fact, it's possible to deactivate or activate some of the already present elements such as zoom level, speed, etc. To make it dynamic, as you suggest, we would need to implement a way to store them along with either GPS coordinates or screen coordinates and then display them. I don't think it would affect performance much, but yes, it's another big challenge.

Im hoping this code is already there and you can point me to adding such icons and handlers. I'm in the early stages of an ESP32.project and am "shopping" for blocks of code I can reuse and I really like the looks of this project.

This project is like a hobby for me. I started it quite a few years ago, if I remember correctly, in 2013. It began with an Atmega, then a NavSpark, and now with an ESP (since the latter has a bit more power). Since then, I've been gradually implementing things, and I'm still in the process of changing part of the original code created for Atmega to use it with ESP. You mentioned you're starting a project with ESP? What is it about (if you don't mind me asking)? I have no problem exchanging opinions, ideas, code, and so on.

I really like the code. Very clean!

Thank you very much! My programming level is limited, and I'm trying to learn little by little. Originally, I wasn't going to show or share this project, but thanks to the advice of some friends, I decided to publish it. It's clear that my dedication to it is not complete, but I'm gradually improving, learning, and more.

Any other questions, inquiries, or suggestions, feel free to let me know.

@jgauchia jgauchia changed the title Waypoints Waypoints Management May 15, 2024
@jgauchia jgauchia added high-priority High Priority and removed medium-priority Medium Priority labels Jun 20, 2024
@jgauchia
Copy link
Owner Author

If waypoint is in map screen boundaries , add a overlay image of waypoint position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority High Priority
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants