(form "10122" (size 80 23)
  (heading "SURFACE STATION TRAVERSING")

  (label (position  12  2) (text "Name"))
  (label (position  26  2) (text "Axis Height"))
  (label (position  38  2) (text "Y"))
  (label (position  50  2) (text "X"))
  (label (position  62  2) (text "Z"))


  (label (position  2  3) (text "Backsight"))
  (field "backsight" (position 12  3) (display_length 12) (input allowed)
    (translate upper) (null disallowed) (max_length 16) (value_in non_exclusive))
  (field "yb" (position 38  3) (display_length 10) 
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "xb" (position 50  3) (display_length 10) 
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "zb" (position 62  3) (display_length 10) 
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  
  (label (position  2  4) (text "SURVEY_SETUP_STATION_TXT"))
  (field "setup" (position 12  4) (display_length 12) (input allowed)
    (translate upper) (null disallowed) (max_length 16) (value_in non_exclusive)
    )
  (field "hi" (position 26  4) (display_length 10) (input allowed)
    (format real_8) (null disallowed) (max_length 16)
    (decimals 3) (default "0"))
  (field "ys" (position 38  4) (display_length 10)
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "xs" (position 50  4) (display_length 10) 
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "zs" (position 62  4) (display_length 10) 
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))

  (label (position  2  5) (text "Foresight"))
  (field "foresight" (position 12  5) (display_length 12) (input allowed)
    (translate upper) (null disallowed) (max_length 16)
    )
  (field "ht" (position 26  5) (display_length 10) 
    (input allowed) (format real_8) (null disallowed) (max_length 16)
    (decimals 3) (default "0"))
  (field "yf" (position 38  5) (display_length 10)
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "xf" (position 50  5) (display_length 10)
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))
  (field "zf" (position 62  5) (display_length 10)
    (foreground)
    (background (user_option "form_background"))
    (translate upper) (null disallowed) (max_length 16)
    (decimals 3))

  (field "level_area" (position 12  6) (display_length 16) (input allowed)
    (translate upper) (null disallowed) (max_length 16)
    (help "FORM_10120_LEVEL_AREA_TIP"))

  (field "instrument_label" 
    (position 2  7) 
    (display_length  25) 
    (foreground (user_option "form_foreground"))
    (background (user_option "form_background"))
    (input disallowed)
    (value_in "Instrument used")
    (browser none)
    (default "Instrument used")
  )

  (field "instrument" (position 10 7) (display_length 10) (input allowed)
    (max_length 128)
    (null disallowed) 
    (help "SRV_INSTRUMENT_USED_TIP")
   )

  (scroll_block "main" (position  1 9) (size 77  12) (extra  0  0)
    (scroll_size 76 26) 
    (main
      (label (position  9  0) (text "Horizontal angle observations"))
      (field "horiz_method" (position 33  0) (display_length 12) 
        (input allowed) (translate lower) (null disallowed) (max_length 16)
        (default "reiteration")
        (value_in "reiteration" "repetition")
         )

      (label (position  2  2) (text "Face"))
      (label (position  9  1) (text "Reiteration angles"))
      (scroll_block "reiteration" (position  9 3) (size 31  6) (extra  8  1)
        (scroll_size 31 8)
        (repeat interactive (grow  0  1) (instances  1 (min  1) (max 8)))
        (top
          (field "reit_backsight_stn" (position 1  0) (display_length 7) 
            (background) (translate upper) (input disallowed)
            (dependency (value "horiz_method") == "reiteration")
          )
          (field "reit_foresight_stn" (position 12  0) (display_length 7) 
            (background) (translate upper) (input disallowed)
            (dependency (value "horiz_method") == "reiteration")
          )
          (label (position  23  0) (text "Angle"))
        )
        (left
          (label (position  1  0) (text "1. Left"))
          (label (position  1  1) (text "1. Right"))
          (label (position  1  2) (text "2. Left"))
          (label (position  1  3) (text "2. Right"))
          (label (position  1  4) (text "3. Left"))
          (label (position  1  5) (text "3. Right"))
          (label (position  1  6) (text "4. Left"))
          (label (position  1  7) (text "4. Right"))
        )
        (main
          (field "reit_backsight" (position 1  0) (display_length 7) 
            (input allowed) (translate lower) (null disallowed)
            (format dms_angle) (max_length 8) (default "0")
            (low_bound 0) (high_bound 6.28318530717960044)
            (dependency (value "horiz_method") == "reiteration")
            )
          (field "reit_foresight" (position 11  0) (display_length 7) 
            (input allowed) (translate lower) (null disallowed)
            (format dms_angle) (max_length 8) (default "0")
            (low_bound 0) (high_bound 6.28318530717960044)
            (dependency (value "horiz_method") == "reiteration")
            )
          (field "reit_angle" (position 21  0) (display_length 7) 
            (background) (translate lower) (input disallowed)
            (max_length 8)
            (format dms_angle)
            (dependency (value "horiz_method") == "reiteration"))
        )
      )
      (field "mean_reit_angle" (position 30  9) (display_length 7) 
        (input disallowed) (translate lower) (max_length 8)
        (format dms_angle)
        (dependency (value "horiz_method") == "reiteration")
      )


      (label (position  44  1) (text "Repetition angles"))
      (scroll_block "repetition" (position 44 3) (size 31  6) (extra  0  1)
        (scroll_size 31 9)
        (repeat interactive (grow  0  1) (instances  2 (min  2) (max 9)))
        (top
          (label (position  1  0) (text "Station"))
          (label (position  11  0) (text "Observed"))
          (label (position  21  0) (text "Turned"))
        )

        (main
          (field "repeat_station" (position 1  0) (display_length 7) 
            (background) (translate upper) (input disallowed)
            (initialise (value "repeat_station(-1)"))
            (dependency (value "horiz_method") == "repetition"))
          (field "repeat_observed_angle" (position 11  0) (display_length 7) 
            (input allowed) (translate lower) (null disallowed)
            (format dms_angle) (default "0")
            (max_length 8)
            (low_bound 0) (high_bound 6.28318530717960044)
            (dependency (value "horiz_method") == "repetition")
            )
          (field "repeat_turned_angle" (position 21  0) (display_length 7) 
            (background) (translate lower) (input disallowed)
            (max_length 8)
            (format dms_angle)
            (dependency (value "horiz_method") == "repetition"))

        )
      )
      (field "mean_repetition_angle" (position 65  9) (display_length 7) 
        (input disallowed) (translate lower) (max_length 8)
        (format dms_angle)
        (dependency (value "horiz_method") == "repetition")
      )
      (label (position 1 11) (foreground (user_option "form_text_highlight"))
       (text "Use the outer scroll bar to enter the vertical angles and slope distance"))


      (label (position  9  14) (text "Vertical angle observations"))
      (field "vert_angle_method" (position 35  14) (display_length 15) 
        (input allowed) (translate lower) 
        (value_in "forward" "forward & reverse")
        (default "forward")
        )

      (label (position  2  16) (text "Face"))
      (label (position  9  15) (text "Forward vertical angles"))
      (scroll_block "fwd_vert_angles" (position 9 17) (size 24  6) 
        (extra  8  1) (scroll_size 24 8)
        (repeat interactive (grow  0  1) (instances  1 (min  1) (max 8)))
        (top
          (label (position  1  0) (text "Observed"))
          (label (position  14  0) (text "Angle"))
        )
        (left
          (label (position  1  0) (text "1. Left"))
          (label (position  1  1) (text "1. Right"))
          (label (position  1  2) (text "2. Left"))
          (label (position  1  3) (text "2. Right"))
          (label (position  1  4) (text "3. Left"))
          (label (position  1  5) (text "3. Right"))
          (label (position  1  6) (text "4. Left"))
          (label (position  1  7) (text "4. Right"))
        )
        (main
          (field "fwd_vert_observed" (position 1  0) (display_length 7) 
            (input allowed) (translate lower) (null disallowed)
            (format dms_angle) (max_length 8) (default "0")
            (low_bound 0) (high_bound 6.28318530717960044)
            )
          (field "fwd_vert_angle" (position 14  0) (display_length 7) 
            (background) (translate lower) (input disallowed)
            (format dms_angle)
            (max_length 8))
        )
      )

      (field "fwd_vert_mean_angle" (position 22  23) (display_length 7) 
        (format dms_angle)
        (input disallowed) (translate lower) (max_length 8)
      )

      (label (position  47  15) (text "Reverse vertical angles"))
      (label (position  41  16) (text "Face"))
      (scroll_block "rev_vertical_angles" (position 47 17) (size 24  6) 
        (extra  8  1) (scroll_size 24 8)
        (repeat interactive (grow  0  1) (instances  1 (min  1) (max 8)))
        (top
          (label (position  1  0) (text "Observed"))
          (label (position  14  0) (text "Angle"))
        )
        (left
          (label (position  1  0) (text "1. Left"))
          (label (position  1  1) (text "1. Right"))
          (label (position  1  2) (text "2. Left"))
          (label (position  1  3) (text "2. Right"))
          (label (position  1  4) (text "3. Left"))
          (label (position  1  5) (text "3. Right"))
          (label (position  1  6) (text "4. Left"))
          (label (position  1  7) (text "4. Right"))
        )
        (main
          (field "rev_vert_observed" (position 1  0) (display_length 7) 
            (input allowed) (translate lower) (null disallowed)
            (format dms_angle) (default "0") (max_length 8)
            (dependency (value "vert_angle_method") == "forward & reverse")
            (low_bound -6.283185307) (high_bound 6.283185307)
            )
          (field "rev_vert_angle" (position 14  0) (display_length 7) 
            (background) (input allowed) (translate lower) (input disallowed)
            (dependency (value "vert_angle_method") == "forward & reverse")
            (format dms_angle) (low_bound 0) (high_bound 6.283185307)
            (max_length 8))
        )
      )

      (field "mean_rev_vert_angle" (position 60  23) (display_length 7) 
        (input disallowed) (translate lower) (max_length 8)
        (format dms_angle)
        (dependency (value "vert_angle_method") == "forward & reverse")
      )

      (field "use_reverse_heights" (position 16  25) (display_length 1) 
        (input allowed) (translate upper) (max_length 1) (default "N"))
      (field "reverse_slope_distance" (position 16  25) (display_length 8) 
        (input allowed) (translate lower) (max_length 16) (decimals 3)
        (default "0") (low_bound 0.0) 
        (dependency (value "use_reverse_heights") == "Y"))
      (field "reverse_hi" (position 16  25) (display_length 8) 
        (input allowed) (translate lower) (max_length 16) (decimals 3)
        (default "0")
        (dependency (value "use_reverse_heights") == "Y"))
      (field "reverse_ht" (position 16  25) (display_length 8) 
        (input allowed) (translate lower) (max_length 16) (decimals 3)
        (default "0")
        (dependency (value "use_reverse_heights") == "Y"))



      (label (position  1  25) (text "Slope distance"))
      (field "slope_distance" (position 16  25) (display_length 8) 
        (input allowed) (translate lower) (max_length 16) (decimals 3)
        (default "0")
      )
    )
  )

  (field "check_back_distance" (position 36  0) (display_length 1) 
    (input allowed) (translate upper) 
    (value_in "Y" "N")
    (default "N")
  )

  (scroll_block "rev_check_vertical_angles" (position 9 3) 
    (size 24  6) (extra  8  1) (scroll_size 24 8)
    (repeat interactive (grow  0  1) (instances  1 (min  1) (max 8)))
    (main
      (field "rev_check_vert_observed" (position 1  0) (display_length 7) 
        (input allowed) (translate lower) (null disallowed)
        (format dms_angle) (max_length 8) (default "0")
        (dependency (value "check_back_distance") == "Y")
        (low_bound 0) (high_bound 6.28318530717960044)
      )
      (field "rev_check_vert_angle" (position 14  0) (display_length 7) 
        (background) (translate lower) (input disallowed)
        (format dms_angle)
        (dependency (value "check_back_distance") == "Y")
        (max_length 8))
    )
  )

  (field "mean_rev_check_vert_angle" (position 22  9) (display_length 7) 
    (input disallowed) (translate lower) (max_length 8)
    (format dms_angle)
    (dependency (value "check_back_distance") == "Y")
  )


 (field "check_back_height" (position 36  0) (display_length 1) 
    (input allowed) (translate upper) 
    (value_in "Y" "N")
    (default "N")
  )
  (field "rev_obs_distance" (position 62  3) (display_length 7) 
    (input allowed) (max_length 8) (decimals 3) (null disallowed)
    (format real_8)
    (dependency (value "check_back_distance") == "Y")
  )
  (field "rev_distance" (position 62  7) (display_length 7)
    (foreground)
    (background (user_option "form_background")) 
    (translate lower) (max_length 8) (decimals 3)
  )

  (field "check_distance" (position 62  8) (display_length 7)
    (foreground)
    (background (user_option "form_background")) 
    (translate lower) (max_length 8) (decimals 3)
  )

  (field "distance_error" (position 62  9) (display_length 7) 
    (foreground)
    (background (user_option "form_background"))
    (translate lower) (max_length 8) (decimals 3)
  )

  (field "rev_bs_height" (position 62  3) (display_length 7) 
    (input allowed) (max_length 8) (decimals 3) (null disallowed)
    (format real_8)
    (dependency (value "check_back_height") == "Y")
  )
  (field "rev_known_setup_elevation" (position 62  7) (display_length 7)
    (foreground)
    (background (user_option "form_background")) 
    (translate lower) (max_length 8) (decimals 3)
  )
  (field "rev_check_setup_elevation" (position 62  8) (display_length 7)
    (foreground)
    (background (user_option "form_background")) 
    (translate lower) (max_length 8) (decimals 3)
  )
  (field "rev_setup_elevation_error" (position 62  9) (display_length 7)
    (foreground)
    (background (user_option "form_background")) 
    (translate lower) (max_length 8) (decimals 3)
  )

  (default_buttons)
)
