Update app.py
Browse files
app.py
CHANGED
@@ -735,8 +735,8 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
735 |
locations = json.loads(coordinates)
|
736 |
for k, location in enumerate(locations):
|
737 |
if "tiles" in locations[k]:
|
738 |
-
locations[k]["heading"] = locations[k]["tiles"]["originHeading"]
|
739 |
-
locations[k]["pitch"] = locations[k]["tiles"]["originPitch"]
|
740 |
elif not "heading" in locations[k] or not "pitch" in locations[k]:
|
741 |
locations[k]["heading"] = 0.0
|
742 |
locations[k]["pitch"] = 0.0
|
|
|
735 |
locations = json.loads(coordinates)
|
736 |
for k, location in enumerate(locations):
|
737 |
if "tiles" in locations[k]:
|
738 |
+
locations[k]["heading"] = locations[k]["tiles"]["originHeading"] / 180 * np.pi
|
739 |
+
locations[k]["pitch"] = locations[k]["tiles"]["originPitch"] / 180 * np.pi
|
740 |
elif not "heading" in locations[k] or not "pitch" in locations[k]:
|
741 |
locations[k]["heading"] = 0.0
|
742 |
locations[k]["pitch"] = 0.0
|