C
L
O
S
E
3
|
2006-05-07-17-50 start
This program
http://freeman2.com/jscircl2.htm
create small circle/great circle equation
and locus point.
The key parameters are from a starting
point (first city) and one or two more
points (cities)
They are (phi and lambda are Greek)
phi1Lon = city1 Longitude
lam1Lat = city1 Latitude
phi2Lon = city2 Longitude
lam2Lat = city2 Latitude
phi3Lon = city3 Longitude
lam3Lat = city3 Latitude
eastRad = city1 east deviation angle
angEarth= earthCenter deviation angle
If small circle radius is given, any
point on circle has same earth center
deviation angle.
All parameters are angles, they are
degree/minute/second. When program
calculate, all angle must change to
radian. One radian equal to
57.2957795130823208767981548141051703
degree. Or degree number / 57.295779
get radian number.
To define a small circle, need
1. three cities lon/lat values
OR
2. two cities lon/lat values plus
city1's east angle.
A small circle or great circle pass
city1 at an angle. Which is a local
measured angle.
On given circle, east deviation angle
varies.
On given circle, earth deviation angle
constant.
If small circle at city1 go east-west
direction, its east deviation angle
is zero. No east deviation.
Positive east deviation angle point to
north-east.
Negative east deviation angle point to
south-east.
Above is circle arc section.
Below is circle area.
At city1, if a small circle or great
circle area pass earth center. This
is zero earth deviation angle.
Otherwise, earth deviation angle is
non-zero.
Sign of earth deviation angle is
determined by right hand rule.
Right hand thumb up toward small
circle east deviation angle direction.
Four finger bent to positive earth
deviation angle direction.
If circle center is north to earth center
earth deviation angle is positive.
If circle center is south to earth center
earth deviation angle is negative.
To create small circle equation need
four coordinate transformation.
They are coordinate rotation. Five
coordinates are used.
x,y,z coordinate, before rotation.
x',y',z' coord., after first rotation.
x",y",z" coord., after second rotation.
x"',y"',z"' coord., after 3rd rotation.
x"",y"",z"" coord., after 4th rotation.
All five coordinate center coincide with
earth center.
First rotation:
rotate z (3) axis [+phi1Lon] radian
from x,y,z to x',y',z' coordinate
phi1Lon is city1's Longitude value
in Radian. East hemisphere positive
West hemisphere negative. [+] in
[+phi1Lon] means not reverse sign.
Second rotation:
rotate y (2) axis [-lam1Lat] radian
from x',y',z' to x",y",z" coordinate
lam1Lat is city1's Latitude value
in Radian. North hemisphere positive
South hemisphere negative. [-] in
[-lam1Lat] means must reverse sign.
Third rotation:
rotate x (1) axis '+eastRad' radian
from x",y",z" to x"',y"',z"' coordinate
Fourth rotation:
rotate y (2) axis '+angEarth' radian
from x"',y"',z"' to x"",y"",z"" coordinate
Up to here get
x""=f1(x,y,z)
y""=f2(x,y,z)
z""=f3(x,y,z)
ONLY in x"",y"",z"" coordinate system
small circle has a parallel great circle.
Use this parallel great circle to define
small circle that is extremely simple.
Just set
z"" = sin(angEarth)
Then done !!
In x,y,z; x',y',z'; x",y",z"; x"',y"',z"'
coordinate system, NO z"' = sin(angEarth)
relation. Because great circle and small
circle are not parallel.
In z"" = sin(angEarth)
move sin(angEarth) to left side, then
it is possible to evaluate error. Zero
value indicate no error.
Up to here, get small circle equation.
Each rotation bookkeeping the relation
between new orientation coordinate
system with ground coordinate system.
That means
we know z""=f3d(x"',y"',z"')
we know z"'=f3c(x",y",z")
we know z" =f3b(x',y',z')
we know z' =f3a(x,y,z)
that is
we know z""=f3(x,y,z)
Small circle equation complete form is
next.
sin(angEarth)
*(cos(lam1Lat)
*( cos(Var0Lat)*cos(Var0Lon)*cos(phi1Lon)
+cos(Var0Lat)*sin(Var0Lon)*sin(phi1Lon)
)
+sin(Var0Lat)*sin(lam1Lat)
)
+ cos(angEarth)
*(-sin(eastRad)
*(-cos(Var0Lat)*cos(Var0Lon)*sin(phi1Lon)
+cos(Var0Lat)*sin(Var0Lon)*cos(phi1Lon)
)
+cos(eastRad)
*(-sin(lam1Lat)
*(cos(Var0Lat)*cos(Var0Lon)*cos(phi1Lon)
+cos(Var0Lat)*sin(Var0Lon)*sin(phi1Lon)
)
+sin(Var0Lat)*cos(lam1Lat)
)
)
- sin(angEarth)
=0
[Var0Lon, Var0Lat] is a moving point on
circle, VARiable point.
City1's Longitude/Latitude phi1Lon, lam1Lat
City1's earth center deviation angle angEarth,
City1's east deviation angle eastRad
are all known value.
This is change face small circle equation.
Because different start point get different
coefficient, equation look differently.
It is possible to find a constant face
small circle equation. The method is to
use small circle center axis and sphere
intersection point B. This is north pole
in x"",y"",z"" coordinate system.
Point B coordinate is
[x"",y"",z""] = [0, 0, 1]
But it is necessary to express everything
in ground x,y,z coordinate system.
Now rotate again, this time start from
known [x"",y"",z""] = [0, 0, 1] back to
[x,y,z]. This is reverse procedure.
Result is
xp= ..... eq. C04
+cos(phi1Lon)*cos(lam1Lat)*sin(angEarth)
-cos(phi1Lon)*sin(lam1Lat)*cos(eastRad)*cos(angEarth)
+sin(phi1Lon)*sin(eastRad)*cos(angEarth)
yp= ..... eq. C05
+sin(phi1Lon)*cos(lam1Lat)*sin(angEarth)
-sin(phi1Lon)*sin(lam1Lat)*cos(eastRad)*cos(angEarth)
-cos(phi1Lon)*sin(eastRad)*cos(angEarth)
zp= ..... eq. C06
+sin(lam1Lat)*sin(angEarth)
+cos(lam1Lat)*cos(eastRad)*cos(angEarth)
[xp,yp,zp] is point B location in ground
[x,y,z] coordinate system.
eq. C04, eq. C05, eq. C06 are used in the
derivation page
http://freeman2.com/tutc0002.htm
If starting point change location on circle
arc, small circle polar point [xp,yp,zp]
never change its value, so here is
constant face small circle equation:
xp*[cos(Var0Lon)*cos(Var0Lat)]
+yp*[sin(Var0Lon)*cos(Var0Lat)]
+zp*[sin(Var0Lat)]
-sin(angEarth)=0
Set angEarth to zero, small circle become
great circle.
2006-05-07-18-59 stop
2006-05-08-05-34 start
If assign a circle center pole point (on
earth surface, [xp,yp,zp]) and if assign
a distance between circle center (under
ground) and earth center, then it is easy
to construct a small circle by the
following equation
xp*[cos(Var0Lon)*cos(Var0Lat)]
+yp*[sin(Var0Lon)*cos(Var0Lat)]
+zp*[sin(Var0Lat)]
-centerToCenterDistance=0
But this simple method created circle
equation can not pass three given points
on sphere. Because the determination of
pole point and distance not take three
given point into consideration. This
program has the ability to construct a
small circle equation and pass three
given point. The key step is next six
variables
A2, B2, C2, A3, B3, C3
The definition of A2, B2, C3 take city1
and city2 location into consideration.
The definition of A3, B3, C2 take city1
and city3 location into consideration.
Please use the key string 'B88' to 'B93'
to search these definitions.
After six variables are defined, then
define east deviation angle and earth
deviation angle.
If given city1 and city2 and city1's
east angle, find earth angle as next
angEarth=atan((sin(eastRad)*A2-cos(eastRad)*B2)/C3)
If given city1 and city2 and city3
find east angle and earth angle as next
eastRad=atan((B2*C2-B3*C3)/(A2*C2-A3*C3));
angEarth=atan((sin(eastRad)*A2-cos(eastRad)*B2)/C3)
Finally, use city1's Longitude/Latitude
and city1's east angle and earth angle
to construct small circle equation. This
procedure allow us to build a small circle
equation which pass three given points.
2006-05-08-05-52 stop
2006-05-08-12-58 start
If you want test great circle in this
small circle program. First find two
cities Longitude/Latitude value.
These two cities data can be used for
both great circle and small circle.
Two cities determine one great circle.
Three cities determine one small circle.
To find third city for small circle
program and still stay on great circle.
Use next great circle program
http://freeman2.com/jscircle.htm
Input city1 and city2 Longitude/Latitude
value. Click to run
Key point is
DO NOT GOTO BOX2 TO PICK A POINT
Because box2 has earth rotation, which
is not for static problem use.
Goto box1 (jscircle.htm)
to choose one point coordinate. (do not
use first point which is city1 coord.)
put third point coordinate in this small
circle page
http://freeman2.com/jscircl2.htm
box3. Click run.
if output at
Circle earth angle [ number here ] Radian;
get a number nearly zero, then this
small circle program get a great circle
output.
2006-05-08-13-08 stop
Earth angle and City1's east angle are
used to create small circle equation.
see code at
document.answer0.ans0EastRad.value=eastRad; //9505081025
document.answer0.ans0EarthRad.value=angEarth; //9505081026
2006-05-09-10-01
|