Skip to content

Commit

Permalink
1.5.10 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
naman108 committed Feb 1, 2021
1 parent 842a79f commit ba64ba4
Show file tree
Hide file tree
Showing 441 changed files with 20,983 additions and 1,918 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions FreeTAKServer/.idea/misc.xml → .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FreeTAKServer/.idea/modules.xml → .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FreeTAKServer/.idea/vcs.xml → .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions FreeTAKServer/.idea/.gitignore

This file was deleted.

Binary file removed FreeTAKServer/.vs/FreeTAKServer/v16/.suo
Binary file not shown.
3 changes: 0 additions & 3 deletions FreeTAKServer/.vs/ProjectSettings.json

This file was deleted.

3 changes: 0 additions & 3 deletions FreeTAKServer/.vs/PythonSettings.json

This file was deleted.

8 changes: 0 additions & 8 deletions FreeTAKServer/.vs/VSWorkspaceState.json

This file was deleted.

24 changes: 0 additions & 24 deletions FreeTAKServer/.vscode/launch.json

This file was deleted.

3 changes: 0 additions & 3 deletions FreeTAKServer/.vscode/settings.json

This file was deleted.

119 changes: 119 additions & 0 deletions FreeTAKServer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# FreeTAKServer

![the Parrot is not dead](https://github.com/Tapawingo/FreeTakServer/blob/master/docs/FreeTakServer%20specs/FreeTakServerLogo.png?raw=true)

Welcome to the FreeTakServer (FTS) git repository.

FTS is a Python3 implementation of the TAK Server for devices like CivTAK , WinTAK and ITAK, it is cross-platform. We use the Flask framework for web services.
it's free and open source (released under the Eclipse Public License).

## User Documentation
For documentation on installation and usage visit https://freetakteam.github.io/FreeTAKServer-User-Docs/

## Supported Use cases
FTS allows you to connect ATAK clients to share geo information, to chat with all the connected clients, exchange files and more.
It intends to support all the major use cases of the original TAK server.
![the domain model with all the know objects used by CIVTAK/ wintak](https://github.com/Tapawingo/TAKlib/blob/master/docs/FreeTakServer%20specs/FreeTak%20Use%20Case%20model.png?raw=true)
[Live version](http://pldemo.sparxsystems.us/TVHOG)

## Community
This code is currently in *Early Production Stage*.
Check out our roadmap [@FreeTakServer#25](https://github.com/FreeTAKTeam/FreeTakServer/issues/25) to see what is planned
If you have any issues don't hesitate to [bring it up](https://github.com/Tapawingo/FreeTakServer/issues), as TAKFreeServer is in contionous development.

### Donate back
the FTS team is working daily on the development of a open and free solution. We plan to do more that simply replicate the functionalities of the legacy TAK server, our road map includes integration with open source systems like LORA's Meshtastic, porting it to Android, having an open API and much more.

We are doing it for free because we believe that donating personal time to a cause its a endeavour that is worthy per-se, However, a part time, we are also spending our own money to:
- Maintain a Public server and a test server
- Investing in different technologies for R&D

if you feel that FTS is useful to you and you can donate in those challenging times please consider to send you contribution here:
[DONATE](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=brothercorvo%40gmail.com&item_name=FreeTAKServer+R%26D&currency_code=CAD&source=url)

You can also support the project by buying one of our [t-shirts](http://tee.pub/lic/elARpZYCmaw)

NOTE:
not a big fan of Paypal, but that is the easier way I found for an initial attempt. We may go to some more ethical system in future.

### Public instance
we support a [public instance](https://www.reddit.com/r/ATAK/wiki/index/freetakserver) of FTS.
- download the configuration [here](https://drive.google.com/file/d/1IK1LfPN13EWikHaMyOuDDwIerNGz-Wli/view?usp=sharing)
- use the Import manager in ATAK to import the configuration

### Tell us what you think!
to discuss with the developer team
Use the reddit server
https://www.reddit.com/r/ATAK/
and the Discord chat
https://discordapp.com/invite/XEPyhHA

## Architecture
TAKFreeServer uses a MVC pattern, the concept of a COT is described in a set of Domain classes, generated from the UML model using a Model Driven Architecture approach.
![the domain model with all the know objects used by CIVTAK/ wintak](https://github.com/FreeTAKTeam/FreeTakServer/blob/master/docs/FreeTAKServer%20Model.png) [Live version](http://pldemo.sparxsystems.us/Ldsd4T)
[generated documentation of the COT description](https://github.com/FreeTAKTeam/FreeTakServer/blob/master/docs/FreeTakServer%20specs/COTDomainModel.pdf)

## Documentation
under /docs, you can find various documents including an UML model of the Domain classes involved in a COT event.

## Requirements
- Python 3.6 (or better)
following Python libraries are required and will be installed automatically by Pip: flask, lxml, pathlib, tabulate, sqlalchemy, setuptools, Flask-SQLAlchemy

## Installing and using FreeTakServer
For documentation on installation and usage visit https://freetakteam.github.io/FreeTAKServer-User-Docs/Installation/PyPi/Linux/Install/

### Windows
go to the start menu and type ```cmd``` to start a command prompt

open a console with admin rights
Powershell has issues so do not use it
```
python3 -m FreeTAKServer.controllers.services.FTS -DataPackageIP [YourIP]
```

### Troubleshooting
#### package not found'
if, trying to start FTS you get an error 'package not found'
```
'package not found'
```
navigate to the physical location where the controllers are installed and start the server from there.

You may also check for missing libraries and install then using Pip

#### issue connecting in WinTAK
if you have issues connecting winTAK to FTS, try to deactivate the TAKChat plugin, under the plugin section

## Update FreeTakServer
if you already installed FTS with pip you can use
```
pip install FreeTAKServer --upgrade
```
subscribe to this feed to be automatically informed about new versions:
https://pypi.org/rss/project/freetakserver/releases.xml

### client2client datapackages

If you have issues sending datapackages directly to clients via FTS, make sure -IP you specified can be reached from your device.
A quick way to test if it works is to take a picture with Quick Pic in ATAK and send it to another client. Please also note that for that test ATAK clients needs to be on different network (ie one on mobile and one on wifi), because if you run them in same network (wifi, vpn, etc) they will just use same multicast group, bypassing FTS completely.
When you post package to specific contact in ATAK, following happens:

1) Datapackage is uploaded to server, recorded in database and stored in FTS directory
2) Client receives payload with URL pointing to datapackage so ATAK can download it

Assuming you want to run open-to-everyone FTS instance, and you have server hosted somewhere, you need to specify _public_ IP address in -IP argument. And just in case, -IP also accepts domain names.
If you run it at home and port forward on router doesn't work, check if you receive actual IP address and not being NATed and ports 8080 and 8087 are not filtered - you can ask your ISP about that.

## Additional Documentation
* Since version 1.2 FTS supports a[REST API](https://github.com/FreeTAKTeam/FreeTakServer/blob/master/REST_APIDoc.md)

## Project Structure
- TakFreeServer
- **Controllers**: Contains all the business Logic
- **Models**: Contains all the COT object model
- **TAKLinuxService**: a demon for linux OS
- **TakWinService**: a service for the windows OS
- Docs: Usefull documentation regarding COTS and different logs to understand how those are implemented
- Model: a UML model in Sparx EnterpriseArchitect format (see https://sparxsystems.com/products/ea/trial/request.html).
- Old: Legacy versions
File renamed without changes.
Empty file.
Empty file added FreeTAKServer/certs/__init__.py
Empty file.
2 changes: 0 additions & 2 deletions FreeTAKServer/controllers/-- SQLite.sql

This file was deleted.

3 changes: 0 additions & 3 deletions FreeTAKServer/controllers/.vs/ProjectSettings.json

This file was deleted.

6 changes: 0 additions & 6 deletions FreeTAKServer/controllers/.vs/VSWorkspaceState.json

This file was deleted.

Binary file removed FreeTAKServer/controllers/.vs/controllers/v16/.suo
Binary file not shown.
3 changes: 0 additions & 3 deletions FreeTAKServer/controllers/.vscode/settings.json

This file was deleted.

16 changes: 8 additions & 8 deletions FreeTAKServer/controllers/ActiveThreadsController.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
# Original author: Natha Paquette
#
#######################################################
from model.ActiveThreads import ActiveThreads
from FreeTAKServer.model.ActiveThreads import ActiveThreads

class ActiveThreadsController:
def __init__(self):
self.m_ActiveThreads = ActiveThreads()
self.ActiveThreads = ActiveThreads()

def addClientThread(self, clientInformation, process):
processObject = (clientInformation, process)
self.m_ActiveThreads.ThreadArray.append(processObject)
self.ActiveThreads.ThreadArray.append(processObject)

def addReceiveConnectionsThread(self, ReceiveConnectionsProcess, process):
processObject = (ReceiveConnectionsProcess, process)
self.m_ActiveThreads.ThreadArray.append(processObject)
self.ActiveThreads.ThreadArray.append(processObject)

def removeClientThread(self, clientInformation):
for x in self.m_ActiveThreads.ThreadArray:
for x in self.ActiveThreads.ThreadArray:
if x[0] == clientInformation:
self.m_ActiveThreads.ThreadArray.remove(x)
self.ActiveThreads.ThreadArray.remove(x)

def removeReceiveConnectionProcess(self, ReceiveConnectionsProcess):
for x in self.m_ActiveThreads.ThreadArray:
for x in self.ActiveThreads.ThreadArray:
if x[0] == ReceiveConnectionsProcess:
self.m_ActiveThreads.ThreadArray.remove(x)
self.ActiveThreads.ThreadArray.remove(x)
27 changes: 27 additions & 0 deletions FreeTAKServer/controllers/AddDataToCoTList.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import multiprocessing

class AddDataToCoTList:
def __init__(self):
pass

#this function sends specified data to all pipes within a provided array
def send(self, pipes, data):
for pipe in pipes:
try:
pipe.send(data)
except Exception as e:
print(e)
pass
return 1

#this function attempts to receive data from a specified pipe and then return the data
def recv(self, pipe):
try:
out = pipe.poll(timeout=0.1)
if out:
data = pipe.recv()
return data
else:
return 0
except Exception as e:
print(e)
Loading

0 comments on commit ba64ba4

Please sign in to comment.