Talk:Project Compass
Faulx, the following is basically copied from your spreadsheet, with a few additional notes here and there.
- Okay, I've touched it up a bit.-Faulx
This page discusses the math underlying the calculation of coordinates for Anoikis systems used by Project Compass, part of the Arek’Jaalan Project. The main project page describes the basic concept underlying the calculations, while this page documents the actual calculations used to derive coordinates for Anoikis systems from the data collected in the Project. The math is provided to allow those reviewing the project to check and critique its math, techniques, data analysis, and conclusions. All questions and comments regarding these calculations should be directed toward co-project lead Faulx.
Set Up
We start with 4 systems in known space at the points A(xa, ya, za), B(xb, yb, zb), C(xc, yc, zc), and D(xd, yd, zd). A 5th point, R(x, y z), represents the distant unknown solar system. The distances measured from R to A, B, C, and D are da, db, dc, and dd respectively. Using these distances as the radii for 4 spheres centered at A, B, C, and D, we generate 4 equations, which we will then expand and solve with standard addition/multiplication of equations:
(x-xa)^2 + (y-ya)^2 + (z-za)^2 = da^2
(x-xb)^2 + (y-yb)^2 + (z-zb)^2 = db^2
(x-xc)^2 + (y-yc)^2 + (z-zc)^2 = dc^2
(x-xd)^2 + (y-yd)^2 + (z-zd)^2 = dd^2
where,
- (x, y, z) is the coordinate position of the star system being measured and is the unknown for which we are solving.
- (xa, ya, za) is the coordinate position of reference system A
- (xb, yb, zb) is the coordinate position of reference system B
- (xc, yc, zc) is the coordinate position of reference system C
- (xd, yd, zd) is the coordinate position of reference system D
- "da", is the measured distance from (x, y, z) to (xa, ya, za)
- "db", is the measured distance from (x, y, z) to (xb, yb, zb)
- "dc", is the measured distance from (x, y, z) to (xc, yc, zc)
- "dd", is the measured distance from (x, y, z) to (xd, yd, zd)
Work
We begin by expanding the quadratic terms:
(x^2 - 2xa*x + xa^2) + (y^2 - 2ya*y + ya^2) + (z^2 - 2za*z + za^2) = da^2
(x^2 - 2xb*x + xb^2) + (y^2 - 2yb*y + yb^2) + (z^2 - 2zb*z + zb^2) = db^2
(x^2 - 2xc*x + xc^2) + (y^2 - 2yc*y + yc^2) + (z^2 - 2zc*z + zc^2) = dc^2
(x^2 - 2xd*x + xd^2) + (y^2 - 2yd*y + yd^2) + (z^2 - 2zd*z + zd^2) = dd^2
Next, we subtract the first row from the other three:
(x^2 - 2xa*x + xa^2) + (y^2 - 2ya*y + ya^2) + (z^2 - 2za*z + za^2) = da*da
(x^2 - 2xb*x + xb^2) + (y^2 - 2yb*y + yb^2) + (z^2 - 2zb*z + zb^2) + (-x^2 + 2xa*x - xa^2) + (-y^2 + 2ya*y - ya^2) + (-z^2 + 2za*z - za^2) = db*db - da*da
(x^2 - 2xc*x + xc^2) + (y^2 - 2yc*y + yc^2) + (z^2 - 2zc*z + zc^2) + (-x^2 + 2xa*x - xa^2) + (-y^2 + 2ya*y - ya^2) + (-z^2 + 2za*z - za^2) = dc*dc - da*da
(x^2 - 2xd*x + xd^2) + (y^2 - 2yd*y + yd^2) + (z^2 - 2zd*z + zd^2) + (-x^2 + 2xa*x - xa^2) + (-y^2 + 2ya*y - ya^2) + (-z^2 + 2za*z - za^2) = dd*dd - da*da
Simplifying eliminates the quadratic term and creates a 3x4 matrix of the last 3 rows:
(x^2 - 2xa*x + xa^2) + (y^2 - 2ya*y + ya^2) + (z^2 - 2za*z + za^2) = da*da
(-2xb*x + xb*xb) + (-2yb*y + yb*yb) + (-2zb*z + zb*zb) + (2xa*x - xa*xa) + (2ya*y - ya*ya) + (2za*z - za*za) = db*db - da*da
(-2xc*x + xc*xc) + (-2yc*y + yc*yc) + (-2zc*z + zc*zc) + (2xa*x - xa*xa) + (2ya*y - ya*ya) + (2za*z - za*za) = dc*dc - da*da
(-2xd*x + xd*xd) + (-2yd*y + yd*yd) + (-2zd*z + zd*zd) + (2xa*x - xa*xa) + (2ya*y - ya*ya) + (2za*z - za*za) = dd*dd - da*da
Simplifying and regrouping:
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
-2xb*x - 2yb*y - 2zb*z + 2xa*x + 2ya*y + 2za*z = db*db - da*da - xb*xb - yb*yb - zb*zb + xa*xa + ya*ya + za*za
-2xc*x - 2yc*y - 2zc*z + 2xa*x + 2ya*y + 2za*z = dc*dc - da*da - xc*xc - yc*yc - zc*zc + xa*xa + ya*ya + za*za
-2xd*x - 2yd*y - 2zd*z + 2xa*x + 2ya*y + 2za*z = dd*dd - da*da - xd*xd - yd*yd - zd*zd + xa*xa + ya*ya + za*za
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
2x*(xa - xb) + 2y*(ya - yb) + 2z*(za - zb) = db*db - da*da - xb*xb - yb*yb - zb*zb + xa*xa + ya*ya + za*za
2x*(xa - xc) + 2y*(ya - yc) + 2z*(za - zc) = dc*dc - da*da - xc*xc - yc*yc - zc*zc + xa*xa + ya*ya + za*za
2x*(xa - xd) + 2y*(ya - yd) + 2z*(za - zd) = dd*dd - da*da - xd*xd - yd*yd - zd*zd + xa*xa + ya*ya + za*za
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x*(xa - xb) + y*(ya - yb) + z*(za - zb) = (db*db - da*da - xb*xb - yb*yb - zb*zb + xa*xa + ya*ya + za*za)/2
x*(xa - xc) + y*(ya - yc) + z*(za - zc) = (dc*dc - da*da - xc*xc - yc*yc - zc*zc + xa*xa + ya*ya + za*za)/2
x*(xa - xd) + y*(ya - yd) + z*(za - zd) = (dd*dd - da*da - xd*xd - yd*yd - zd*zd + xa*xa + ya*ya + za*za)/2
At this point we introduce substitutions to simplify the math:
e = (db*db - da*da - xb*xb - yb*yb - zb*zb + xa*xa + ya*ya + za*za)/2
f = (dc*dc - da*da - xc*xc - yc*yc - zc*zc + xa*xa + ya*ya + za*za)/2
g = (dd*dd - da*da - xd*xd - yd*yd - zd*zd + xa*xa + ya*ya + za*za)/2
Now we begin solving the matrix formed by the last 3 rows:
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x*(xa - xb) + y*(ya - yb) + z*(za - zb) = e
x*(xa - xc) + y*(ya - yc) + z*(za - zc) = f
x*(xa - xd) + y*(ya - yd) + z*(za - zd) = g
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x + y*(ya - yb)/(xa - xb) + z*(za - zb)/(xa - xb) = e/(xa - xb)
x + y*(ya - yc)/(xa - xc) + z*(za - zc)/(xa - xc) = f/(xa - xc)
x + y*(ya - yd)/(xa - xd) + z*(za - zd)/(xa - xd) = g/(xa - xd)
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x + y*(ya - yb)/(xa - xb) + z*(za - zb)/(xa - xb) = e/(xa - xb)
0 + y*[ (ya - yc)/(xa - xc) - (ya - yb)/(xa - xb) ] + z*[ (za - zc)/(xa - xc) - (za - zb)/(xa - xb) ] = [ f/(xa - xc) - e/(xa - xb) ]
0 + y*[ (ya - yd)/(xa - xd) - (ya - yb)/(xa - xb) ] + z*[ (za - zd)/(xa - xd) - (za - zb)/(xa - xb) ] = [ g/(xa - xd) - e/(xa - xb) ]
More substitutions to simplify the math:
i = [ (ya - yc)/(xa - xc) - (ya - yb)/(xa - xb) ]
j = [ (za - zc)/(xa - xc) - (za - zb)/(xa - xb) ]
p = [ (ya - yd)/(xa - xd) - (ya - yb)/(xa - xb) ]
q = [ (za - zd)/(xa - xd) - (za - zb)/(xa - xb) ]
Continuing to solve the matrix:
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x + y*(ya - yb)/(xa - xb) + z*(za - zb)/(xa - xb) = e/(xa - xb)
0 + y*i + z*j = [ f/(xa - xc) - e/(xa - xb) ]
0 + y*p + z*q = [ g/(xa - xd) - e/(xa - xb) ]
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x + y*(ya - yb)/(xa - xb) + z*(za - zb)/(xa - xb) = e/(xa - xb)
0 + y + z*j/i = [ f/(xa - xc) - e/(xa - xb) ]/i
0 + y + z*q/p = [ g/(xa - xd) - e/(xa - xb) ]/p
x*x - 2xa*x + y*y - 2ya*y + z*z - 2za*z = da*da - xa*xa - ya*ya - za*za
x + y*(ya - yb)/(xa - xb) + z*(za - zb)/(xa - xb) = e/(xa - xb)
0 + y + z*j/i = [ f/(xa - xc) - e/(xa - xb) ]/i
0 + 0 + z*(q/p - j/i) = { [ g/(xa - xd) - e/(xa - xb) ]/p - [ f/(xa - xc) - e/(xa - xb) ]/i }
Solution
At this point we have equations that are sufficient to create spreadsheet formulas with x and y developing from the calculations of z:. Although we could continue to explicitly solve for y and x, the math is starting to become a bit of bear with all these variables and we risk introducing human error in the calculations if we attempt to simplify further. Sufficient precision in the measurements of the k-space systems A, B, C, and D will make the effects of repeated round off errors negligible. A few decimal places more than the measuring tower's tenth of a light year precision should be sufficient (the coordinates the project is using are at least 5 past this).
z = { [ g/(xa - xd) - e/(xa - xb) ]/p - [ f/(xa - xc) - e/(xa - xb) ]/i }/(q/p - j/i)
y = [ f/(xa - xc) - e/(xa - xb) ]/i - z*j/i
x = e/(xa - xb) - y*(ya - yb)/(xa - xb) - z*(za - zb)/(xa - xb)
where again,
- (x, y, z) is the coordinate position of the star system being measured.
- (xa, ya, za) is the coordinate position of reference system A
- (xb, yb, zb) is the coordinate position of reference system B
- (xc, yc, zc) is the coordinate position of reference system C
- (xd, yd, zd) is the coordinate position of reference system D
- "da", is the measured distance from (x, y, z) to (xa, ya, za)
- "db", is the measured distance from (x, y, z) to (xb, yb, zb)
- "dc", is the measured distance from (x, y, z) to (xc, yc, zc)
- "dd", is the measured distance from (x, y, z) to (xd, yd, zd)
and
i = [ (ya - yc)/(xa - xc) - (ya - yb)/(xa - xb) ]
j = [ (za - zc)/(xa - xc) - (za - zb)/(xa - xb) ]
p = [ (ya - yd)/(xa - xd) - (ya - yb)/(xa - xb) ]
q = [ (za - zd)/(xa - xd) - (za - zb)/(xa - xb) ]
e = (db*db - da*da - xb*xb - yb*yb - zb*zb + xa*xa + ya*ya + za*za)/2
f = (dc*dc - da*da - xc*xc - yc*yc - zc*zc + xa*xa + ya*ya + za*za)/2
g = (dd*dd - da*da - xd*xd - yd*yd - zd*zd + xa*xa + ya*ya + za*za)/2