> For the complete documentation index, see [llms.txt](https://docs.flightwatching.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flightwatching.com/user-manual/designer-user-manual/edit-ifts/ift-v2/fw.setloc.md).

# FW\.setLoc

FW\.setLoc(locOrReg, d, reg)

Sets the location of a the current event's Fwot.

If `locOrReg` is a string, then it should be the registration of any other fwot. If it is an array, it should be `[lat, lon, alt]` or `[lat, lon]`

`d` is the date of the position (moment, date, long or UTC string in the ISO format)

`reg` is the registration of the fwot we want to put the location on. If not set, then the event's fwot is updated.

```javascript
await FW.setLoc('VHHH') // would put the current fwot to the location of the airport of HongKong
await FW.setLoc([21, 31, 40000], null, "FW-FAN") // would put the fwot named FW-FAN to the location [21, 31, 41] 
```
