Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Map API, need suggestions for how to execute ideas
-
-
how do you choose the pin's group for which you need to compute the center?
-
Or do you want the center of all green pin's?
And if you add a supplementary green pin, do you want the center to move automatically ? -
what is customized image? A photo or something I would have to draw?
-
-
@RocketBlaster05 said:
I need to be able to triangulate the center of various pins.
I have found a fairly simple looking code to address this, which can be found here: https://www.101computing.net/cell-phone-trilateration-algorithm/
The issue I have now is implementing the stored coordinates into this algorithm. I basically want to make it so that if there are three pins specifically in a close location, then it would combine them into one point using the algorithm above.- Only three pins at once should be combined, and only those in a close proximity.
- New pins should not affect the location, as once the new center pin is made, I wish that the three trash pins are removed.
- Maybe not drawn, but just an image off the internet of like a crosshair or center mark.
-
@RocketBlaster05 sorry, I'm not sure to understand correctly.
Suppose we have 20 green pin's. Which pin's have to be, let us say, centered?
What is "close"? Which is the distance?The triangulation you gave does not work here, you don't have radious of antennas.
-
@cvp I'd prefer a distance of 10 meters
-
@RocketBlaster05 Thus, I begin with pin 1, if I find some pin's at less of 10 meters, I search their center and I replace them by a cross-hair, which I save in the file and I remove the original pin's.
Then, I continue with a pin which was at more than 10 meters... correct? -
@cvp exactly.
-
@RocketBlaster05 but you have to know that the result would not be the same if I did begin with another pin than pin 1
-
Assume you have some green pin's, how do you want to start this process? A button?
-
@cvp I more so wish for the process to be automatic. Also, it should combine the trash pins, not the green pins. The goal is that there will never be more than 3 trash pins in close proximity to one another, so the results should not change much when it comes to getting the center.
-
@RocketBlaster05 understood. I would need perhaps some hours for that, ready to wait?
-
@cvp as long as you need my man. I got about a week and a couple days to get this done so if you need some extra time it is there. I'll check back every couple hours to see if you have any questions.
Thank you so much!
-
@cvp actually sorry forgot to mention: I need all three trash pins to be present so I can record their locations. I would ask that you write the script as we just discussed, but show me where I would comment out the code to prevent the three pins from getting removed. Sorry for the inconvenience.
-
@RocketBlaster05 said:
show me where I would comment out the code to prevent the three pins from getting removed
We will see later... First, lines to be removed have to be written 🤔
-
@cvp all good. Just wanted to make sure you knew for later
What you wrote below sounds good.
-
@RocketBlaster05 said:
so I can record their locations
I could, for instance, store their locations in the cross-hair subtitle, thus you would see them when tapping the cross-hair, but ok, that's for the future.
-
@RocketBlaster05 for info, I'll use Haversine formula to compute the distance between two points of the earth.
-
@cvp 👍 sounds good
-
@RocketBlaster05 do you want this as cross-hair, or only the "plus" without the foot?
-
@RocketBlaster05 I want to take advantage of this big modification to change entirely the file layout to be able to save their:
- green
- trash
- cross-hair
But that would say that you would loose all of your actual data.
Ok with that?
-
@cvp as in the locations already saved in the a.loc file? If so then yes. I can always just plot more points
P.S. could you find a cross with a circle around it