|
1 | 1 | # README for nmeaSIMULATOR.py |
2 | 2 | ## Sonar simulator NMEA-0183 |
3 | 3 |
|
4 | | -*implementation of PyPi : nmeasim https://pypi.org/project/nmeasim/#description* |
| 4 | + |
5 | 5 |
|
6 | 6 | ### foncitonnalities : |
7 | 7 |
|
8 | 8 | Generate nmea-0183 string of types : |
9 | | -- Geospatial (GGA, GLL, RMC, VTG, ZDA) - simulated using a consistent location/velocity model, time using machine time (not NTP, unless the machine happens to be NTP synchronised). |
10 | | -- Satellites (GSA, GSV) - faked with random azimuth/elevation. |
11 | 9 | - Depth of water (SDDPT) |
12 | 10 |
|
13 | 11 | ### HOW TO MAKE IT WORK: |
14 | 12 |
|
15 | 13 | On a Raspberry pi : |
16 | | -First, setting the baud rate at 4800 : stty -F /dev/ttyUSB0 4800 |
17 | | -Then, in /SonarSimulator/src python3 nmeaSIMULATOR.py 1 |
18 | 14 |
|
| 15 | +1. Install ubuntu server on as sdcard with the user ubuntu |
| 16 | + |
| 17 | +2. Connect the usb serial adapter on the Raspberry |
| 18 | + |
| 19 | +3. apply the power on the raspberry |
| 20 | + |
| 21 | +4. validate if the serial adapter is detected by the OS |
| 22 | + ls /dev/ttyU* |
| 23 | + you should see ttyUSB0 |
| 24 | + |
| 25 | +5. clone the repository in /home/ubuntu |
| 26 | + |
| 27 | +6. Validate and modify the setting for the serial port and baudrate in the autolaunch.sh |
| 28 | + nano /home/ubuntu/SonarSimulator/autolaunch.sh |
| 29 | + python /home/ubuntu/SonarSimulator/Script/sonar_simulator_DPT.py /dev/ttyUSB0 9600 |
| 30 | + the 2 last argument are the serial port and the baudrate |
| 31 | + ex: |
| 32 | + python /home/ubuntu/SonarSimulator/Script/sonar_simulator_DPT.py /dev/ttyUSB1 9600 |
| 33 | + python /home/ubuntu/SonarSimulator/Script/sonar_simulator_DPT.py /dev/ttyAMA0 115200 |
| 34 | + |
| 35 | +7. go in the install directory and run the installation script |
| 36 | + cd /home/ubuntu/SonarSimulator/Install |
| 37 | + ./install.sh |
19 | 38 |
|
20 | | -### install requirements for nmeaSim |
21 | | -install_requires = |
| 39 | +The script is installed as a service. |
| 40 | +If you do some modification in the autolaunch.sh file you have to relaunch the service. |
| 41 | +sudo systemctl restart nmea |
22 | 42 |
|
23 | | - pyserial |
| 43 | +to show the status of the service : sudo systemctl status nmea |
| 44 | +to start the service : sudo systemctl start nmea |
| 45 | +to stop the service : sudo systemctl stop nmea |
24 | 46 |
|
25 | | - geographiclib |
26 | 47 |
|
27 | | - importlib.metadata; python_version<'3.8' |
28 | 48 |
|
0 commit comments