Skip to content

Instantly share code, notes, and snippets.

@sprintr
Created June 2, 2021 23:40
Show Gist options
  • Save sprintr/ca07a185e59b785abde63c999127dddb to your computer and use it in GitHub Desktop.
Save sprintr/ca07a185e59b785abde63c999127dddb to your computer and use it in GitHub Desktop.
SkyCam Equations
# SkyCam Equations
# ----------------
# See https://www.scienceforums.com/topic/9394-skycam-formula-upside-down-pyramid/?tab=comments#comment-148968
import math
# Distances between adjacent towers
v = 460
w = 250
# Height of the towers
h = 100
# Horizontal Position
x = w / 2
y = v / 2
# Vertical Position
z = 0.0000000000000002
# Lengths of the lines
r1 = math.sqrt(x ** 2 + y ** 2 + (z - h) ** 2)
r2 = math.sqrt(y ** 2 + (x - w) ** 2 + (z - h) ** 2)
r3 = math.sqrt(x ** 2 + (y - v) ** 2 + (z - h) ** 2)
r4 = math.sqrt((x - w) ** 2 + (y - v) ** 2 + (z - h) ** 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment