> For the complete documentation index, see [llms.txt](https://gtae.gitbook.io/ifl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gtae.gitbook.io/ifl/ifl-codebase/vicon-local-file-write-python.md).

# Vicon Local File Write \[Python]

Code author: Original author unknown but this version was developed by [Lee Whitcher](mailto:leewhitcher@gatech.edu).

Direct repo link: <https://github.gatech.edu/GT-AE-Indoor-Flight-Laboratory/Python-Vicon-Local-File-Write>

Access the Vicon output stream on a local machine (or any other Windows machine on the IFL network) and save to a file.

This code, of unknown origin, uses a Python wrapper to use a C library written for what is believed to be the Vicon DataStream SDK. This is a really useful tool for running on the IFL PC to shorten the workflow of logging a tracking mission offboard and saving it directly to the format you want. Otherwise, you would have to log a mission in Tracker, load it, then export to CSV.

Download all files locally to the machine where you want to make a log file. You will need to edit ViconFileWrite.py to contain the name of the Vicon object you care about, spelled as it is in Vicon Tracker (case sensitive). You will also need to make sure the connection settings are correct for the Tracker settings.

As long as Tracker is Live and your object is being actively tracked, running ViconFileWrite.py from the command line will log the stream into the file, f. This code uses a unique time string as a filename that is a useful technique for keeping track of which file was logged when. To stop logging, ctrl-C out of the terminal.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gtae.gitbook.io/ifl/ifl-codebase/vicon-local-file-write-python.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
