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
-
@RocketBlaster05 😅 ready for next request....
-
@cvp won’t be anything for a couple days. Got some data to collect. Hope you find some other fun codes to do in the meantime! Thanks as always
-
@cvp sorry been busy so testing has been an issue. Finally got around to it. My iPad doesn’t have an automatic connection (needs WiFi) but it is still able to give locations on the map. I brought a WiFi hotspot with me and it didn’t seem to help. The locations are mostly accurate, but the updating is extremely inconsistent.
I had the update_interval set to values like 0.2, 0.5, 2, 5, and 10. None of them updated on their set intervals. Do you know if this is due to the lack of connection on my iPad or maybe something else is causing the error?
Thanks! -
@RocketBlaster05 don't forget that an iPad without cellular does not have any gps, thus the only location you can get is approximately this one of the router, based on known (by Apple) wifi networks. If you have an iPhone, try with it.
-
@cvp alright. I transferred my files to my iPhone and the tracking works much better. Not sure if this is because of the code or the map API but the app cannot track the person while moving at a speed beyond walking.
The Map only updated when coming to stops, and often times the map would not update after coming to a stop. I would have to reopen the map for it to begin trying to update again.
If you have any ideas I’ll be glad to hear them!Thanks as always!
-
@RocketBlaster05 no idea. Perhaps too much updates asked. Increase interval?
-
@cvp welp. Looks like I need some more improvements because the other information didn't count as data.
This might be the roughest task I've asked of you, but here it is:
I need to be able to triangulate the center of various pins. For example, if there is like 4 pins in a 10 meter area, I need to be able to drop a new pin in the center of all of those pins (to get a more centered marker). Of course, that new pin would need a new picture and its location would need to be saved... If you can use a custom image that would be great, as I've been looking through emoji's and none of them really are like a crosshair or a center "mark" if that makes sense. If a custom image is not possible, there is a recycle emoji that I would prefer as the next best choice.
I'm sorry for dumping all this on you but I have no clue how to do this... if you need any clarification just ask.
Thanks as always!
-
-
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 🤔