freealise commited on
Commit
3bdb91f
·
verified ·
1 Parent(s): c644483

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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