Python Forum
GPS Points to map for game/simulator
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPS Points to map for game/simulator
#1
Hi All,
I'm new to attempting any game development but been fooling about with pygame a bunch and seems pretty intuitive as I've got a decent programming background doing other python, c and such.
I'm looking for the best approach to take a set of gps data, essentially a csv file of lat/lon points and have them plotted in a way I can use the perspective of cameras in pygame to scroll about and zoom in/out to the map I create.
So I should have stated, I can already convert the lat/lon to x,y cartesian, so that makes the data a little more straight forward I would think for my approach.
My end goal is to have a sort of simulator for a little robot I have to wander about a property and report back position, and I could plot this on a map. I was taking baby steps to understand the movements and positioning aspects of sprites in pygame, and also plotting with matplotlib figuring I could merge the two to provide what I'm looking for. But I'm stuck on how to best get my data plotted to a "map" environment that I can simply use that information as an image or such to be a basemap of sorts. I did attempt to follow some "Basemap" tutorials but found my environment just won't load/recognize the "mpl_toolkit.basemap" on sublime text 3.

Sorry for the long and deviated path, but what is the recommended way to take my x,y coordinates and formulate a map of sorts that I can represent a robot sprite over?

Thank you for any suggestions!!
AvgPlum
Reply
#2
I just joined this forum and I'm surprised that someone is making games in such a slow programming language.
About 3 times the difference compared to C#
Reply
#3
From the position that you want, imagine a vertical line to the X axis, and use the values shown on the X axis to estimate the x coordinate where your line meets the X axis. Then do the same with a horizontal line to the Y axis to estimate the y coordinates.
<snipped>
Gribouillis write Jun-22-2023, 10:08 PM:
Offsite link promotion removed. Please read What to NOT include in a post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Where to start, a fun simulator SX1493 10 4,259 Jul-10-2019, 03:51 AM
Last Post: SX1493

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020