-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.py
46 lines (32 loc) · 1.07 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import configparser
from sydr.enlightengui import EnlightenGUI
from sydr.receiver.receiver_gps_l1ca import ReceiverGPSL1CA
from sydr.io.visualisation import Visualisation
import sydr.logger as logger
def main():
"""
Main function
"""
# Configuration
receiverConfigFile = './config/receiver.ini'
receiverConfig = configparser.ConfigParser()
receiverConfig.read(receiverConfigFile)
# Create GUI
gui = EnlightenGUI()
gui.updateMainStatus(stage='Initialize', status='RUNNING')
# Create logger
logger.configureLogger(name=__name__, filepath='./config/logging.ini')
# Create receiver
receiver = ReceiverGPSL1CA(receiverConfig, overwrite=True, gui=gui)
# Run receiver
receiver.run()
# Closing receiver to free database and memory
receiver.close()
# Create report
gui.updateMainStatus(stage='Create report', status='RUNNING')
visual = Visualisation(receiverConfig)
visual.run()
gui.updateMainStatus(stage=f'PROCESSING COMPLETED', status='DONE')
return
if __name__ == "__main__":
main()