Skip to content

_examples/macro.tl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
mission macroExample {
  arguments {
    Lat[1..3] = NaN degree
      """ Latitude {$} """

    Lon[1..3] = NaN degree
      """ Longitude {$} """
  }

  macro $i = 1..3 {
    aggregate Wpt$i {
      run in sequence

      behavior Guidance:Waypoint {
        run in sequence
        set latitude = Lat[$i]
        set longitude = Lon[$i]
      }
    }
  }
}