8-3 Perspective mapping equations 249
p 0 = P 0
E 2 ∗∗
North
E 1 ∗∗
East
p 0 = P 0
E 2 ∗
East
E 1 ∗
South
p
p
Fig. 8.12. Ellipsoidal horizontal plane at the point P 0 .
I n the frame that is located at the point P 0 , let us here derive the spherical coordinates of the point
P from the coordinates {α, β, r}:
X
∗
P − X
∗
0 = r cos β cos α , Y
∗
P − Y
∗
0 = r cos β sin α , Z
∗
P − Z
∗
0 = r sin β ,
tan α =
Y
∗
P − Y
∗
0
X ∗
P − X ∗
0
=
r 21
X P − X 0
+ r 22
Y P − Y 0
+ r 23
Z P − Z 0
r 11
X P − X 0
+ r 12
Y P − Y 0
+ r 13
Z P − Z 0
,
tan β =
Z
∗
P − Z
∗
0
X ∗
P − X ∗
0
2 +
Y ∗
P − Y ∗
0
2
.
(8.9 9 )
Finally, we we transfrom the relative placement vector {X P − X 0 , Y P − Y 0 , Z P − Z 0 } E to the relative
placement vector {X
∗
P − X
∗
0 , Y
∗
P − Y
∗
0 , Z
∗
P − Z
∗
0 } E ∗ :
⎡
⎢
⎢
⎣
X
∗
P − X
∗
0
Y
∗
P − Y
∗
0
Z
∗
P − Z
∗
0
⎤
⎥
⎥
⎦
E ∗
= R E (Λ 0 , Φ 0 , 0)
⎡
⎢
⎢
⎣
X P − X 0
Y P − Y 0
Z P − Z 0
⎤
⎥
⎥
⎦
E
,
(8.100)
tan α =
=
− sin Φ 0
X P − X 0
+ cos Λ 0
Y P − Y 0
sin Φ 0 cos Λ 0
X P − X 0
+ sin Φ 0 cos Λ 0
Y P − Y 0
− cos Φ 0
Z P − Z 0
,
tan β analogous .
(8.101)
The arctan leads to the orientation angle we need. B
ut we have to pay attention to the quadrant rule.
The mapping α ∈ [ 0 , 2π] → tan α is not injective. Therefore, we must apply the quadrant rule:
Y
∗
P − Y
∗
0 positive, X
∗
P − X
∗
0 positive: 1st quadrant 0 ≤ α < π/2 ,
Y
∗
P − Y
∗
0 positive, X
∗
P − X
∗
0 negative: 2 nd quadrant π/2 ≤ α < 0 ,
Y
∗
P − Y
∗
0 negative, X
∗
P − X
∗
0 negative: 3 rd quadrant π ≤ α < 3π/2 ,
Y
∗
P − Y
∗
0 negative, X
∗
P − X
∗
0 positive: 4th quadrant 3π/2 ≤ α < 2π .
(8.102 )
p 0 = P 0
E 2 ∗∗
North
E 1 ∗∗
East
p 0 = P 0
E 2 ∗
East
E 1 ∗
South
p
p
Fig. 8.12. Ellipsoidal horizontal plane at the point P 0 .
I n the frame that is located at the point P 0 , let us here derive the spherical coordinates of the point
P from the coordinates {α, β, r}:
X
∗
P − X
∗
0 = r cos β cos α , Y
∗
P − Y
∗
0 = r cos β sin α , Z
∗
P − Z
∗
0 = r sin β ,
tan α =
Y
∗
P − Y
∗
0
X ∗
P − X ∗
0
=
r 21
X P − X 0
+ r 22
Y P − Y 0
+ r 23
Z P − Z 0
r 11
X P − X 0
+ r 12
Y P − Y 0
+ r 13
Z P − Z 0
,
tan β =
Z
∗
P − Z
∗
0
X ∗
P − X ∗
0
2 +
Y ∗
P − Y ∗
0
2
.
(8.9 9 )
Finally, we we transfrom the relative placement vector {X P − X 0 , Y P − Y 0 , Z P − Z 0 } E to the relative
placement vector {X
∗
P − X
∗
0 , Y
∗
P − Y
∗
0 , Z
∗
P − Z
∗
0 } E ∗ :
⎡
⎢
⎢
⎣
X
∗
P − X
∗
0
Y
∗
P − Y
∗
0
Z
∗
P − Z
∗
0
⎤
⎥
⎥
⎦
E ∗
= R E (Λ 0 , Φ 0 , 0)
⎡
⎢
⎢
⎣
X P − X 0
Y P − Y 0
Z P − Z 0
⎤
⎥
⎥
⎦
E
,
(8.100)
tan α =
=
− sin Φ 0
X P − X 0
+ cos Λ 0
Y P − Y 0
sin Φ 0 cos Λ 0
X P − X 0
+ sin Φ 0 cos Λ 0
Y P − Y 0
− cos Φ 0
Z P − Z 0
,
tan β analogous .
(8.101)
The arctan leads to the orientation angle we need. B
ut we have to pay attention to the quadrant rule.
The mapping α ∈ [ 0 , 2π] → tan α is not injective. Therefore, we must apply the quadrant rule:
Y
∗
P − Y
∗
0 positive, X
∗
P − X
∗
0 positive: 1st quadrant 0 ≤ α < π/2 ,
Y
∗
P − Y
∗
0 positive, X
∗
P − X
∗
0 negative: 2 nd quadrant π/2 ≤ α < 0 ,
Y
∗
P − Y
∗
0 negative, X
∗
P − X
∗
0 negative: 3 rd quadrant π ≤ α < 3π/2 ,
Y
∗
P − Y
∗
0 negative, X
∗
P − X
∗
0 positive: 4th quadrant 3π/2 ≤ α < 2π .
(8.102 )
