-
Notifications
You must be signed in to change notification settings - Fork 1
/
Spot.hs
27 lines (19 loc) · 1.03 KB
/
Spot.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Astro.Coords
import Astro.Place
import Astro.Place.ReferenceEllipsoid
import Numeric.Units.Dimensional.Prelude
import Numeric.Units.Dimensional.LinearAlgebra
import Numeric.Units.Dimensional.LinearAlgebra.Rotation (rotZ)
import Numeric.Units.Dimensional.LinearAlgebra.PosVel hiding (latitude, longitude)
import qualified Prelude
long = 47.5*~degree -- SK long of IS-601.
rot601 = C . matVec (rotZ $ negate $ long + pi) . c -- Rotate coord-sys so x-axis points from IS-601 to origo.
is601 = S $ fromTuple (42164*~kilo meter, 90*~degree, long)
is601' = rot601 is601
--eastSpotBeam = s2c $ fromTuple (6370*~kilo meter, 90*~degree - 35.73*~degree, 35.60*~degree)
eastSpotBeam = geodeticToECR $ GeodeticPlace wgs84 (35.73*~degree) (35.60*~degree) (0*~meter)
eastSpotBeam' = rot601 eastSpotBeam
x = (declination diff /~degree, -- elevation/latitude
rightAscension diff /~degree) -- longitude (perhaps azimuth for some definition...?)
diff = c2s $ elemSub (c eastSpotBeam') (c is601')
diff' = elemSub (c eastSpotBeam') (c is601')