File: heightamb

package info (click to toggle)
doris 4.06~beta2%2Bdfsg-3
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,132 kB
  • ctags: 1,923
  • sloc: cpp: 42,573; csh: 3,636; sh: 2,869; python: 1,180; ansic: 650; makefile: 246
file content (64 lines) | stat: -rwxr-xr-x 1,784 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/csh -f
#%// BK 25-May-2000
#%// $Revision: 1.1 $  $Date: 2005/07/28 09:27:00 $


### Initialize center pixel #########################
set lambda = 0.0565646
set R      = 850000.0
set theta  = 23.0



### Info ############################################
set PRG    = `basename "$0"`
set VER    = "v1.1, BK software"
set AUT    = "Bert Kampes, (c)1999-2000"
echo "$PRG $VER, $AUT"
echo " "
echo "  Computes indicative height ambiguity for flat terrain"
echo "  as function of perpendicular baseline.  A larger Bperp"
echo "  yields more sensitivity to height, i.e., a decreasing"
echo "  height ambiguity (the height difference corresponding"
echo "  to a 2pi phase difference (a fringe))."
echo " "
echo "Program parameters (ERS):"
echo "-------------------------"
echo "  lambda:         $lambda [m]"
echo "  R1:             $R [m]"
echo "  theta:          $theta [deg]"
set theta = `echo "(a(1.0)/45.0)*$theta" | bc -l`
echo "  theta:          $theta [rad]"
echo "  terrain slope:  0.0 [rad]"
echo " "
echo "EXAMPLES:"
echo "  $PRG"
echo "  $PRG 100"
echo "  $PRG 25 50 100 200 400 800"



### Check interactive or batch ######################
if ( $#argv == 0 ) then
  echo " "
  echo "Input perp. Baseline [m]: "
  #sin is not known in standard awk
  #  awk '{ \
  #    ha=('$lambda' * '$R' * sin( '$theta' )/(-2.0 * $1 ) ) \
  #    print "Height ambiguity  = " ha "\n"\
  #    }'
  set b = $<
  set ha = `echo "$lambda * $R * s ( $theta ) / ( -2.0 * $b )" | bc -l`
  echo " "
  echo "Bperp = $b [m] --->  Height ambiguity = $ha [m/2pi]"
### Handle input arguments.
else
  foreach b ( $* )
    set ha = `echo "$lambda * $R * s ( $theta ) / ( -2.0 * $b )" | bc -l`
    echo " "
    echo "Bperp = $b [m] --->  Height ambiguity = $ha [m/2pi]"
  end
  echo " "
endif

### EOF