Skip to content

Commit 56ff112

Browse files
authored
PyFix7
1 parent 4040b13 commit 56ff112

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

usr/local/bin/iss-tracker.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,21 @@ def update_display(self):
122122

123123
self.root.after(100, self.update_display)
124124

125-
de
125+
def latlon_to_xy(self, lat, lon, width, height):
126+
x = (lon + 180) * (width / 360)
127+
y = (90 - lat) * (height / 180)
128+
return x, y
129+
130+
def go_forward(self, event):
131+
self.time_offset += timedelta(minutes=1)
132+
133+
def go_back(self, event):
134+
self.time_offset -= timedelta(minutes=1)
135+
136+
def reset_time(self, event):
137+
self.time_offset = timedelta(seconds=0)
138+
139+
if __name__ == "__main__":
140+
root = tk.Tk()
141+
app = ISSTrackerApp(root)
142+
root.mainloop()

0 commit comments

Comments
 (0)