Skip to main content

Marine mammal observation logging and GPS tracking with python

This python script (or compiled windows exe) generates a PyQt5 user interface for marine mammal observation logging and GPS tracking. It was developed for visual surveys of marine mammal abundance using a windows touchscreen PC or tablet. But it can also be used without a touchpad. Entries can be corrected or removed during the logging.

The GPS data is accessed as NMEA stream from a serial COM port. I am using this (15 Euro) USB GPS unit:

https://no.rs-online.com/web/p/gnss-gps-modules/2473251

https://wiki.dfrobot.com/USB_GPS_Receiver_SKU_TEL0137

Observation and GPS track tables are stored as csv tables.

Happy sightings!

Instructions

Start-up

Connect the external GPS unit to your computer or tablet.

Start the program by running mmobs_logger.exe or the mmobs_logger.py script (if you have python installed). If python packages are missing install the using pip.

At first the program will ask you for a list of species you expect to observe. By clicking onto fields in the table you can change the text. This list will only be editable here, restart the program if you want to add more species or write the species name in the comment line.

Press Ok and then edit the list of observers by clicking into the table fields, again this list will only be editable here, restart the program if you want to add more observers.

Press Ok, now the program will scan all available serial ports and list them in a dropdown menu. Choose the serial port that the GPS unit is attached to and press OK.

Now this user interface becomes available, make it fullsize for faster access to the right lists and buttons:

Start an observation period

Press the Start button and select the observer, observed quadrant, visibility status and wave height. The program will start logging the GPS position every 5 seconds. To add sightings select the correct group size, species, distance and bearing from the lists by clicking onto the desired columns. The currently marked columns is highlighted in gray . Than submit you observation using the yellow submit button. It will now show up in the table at the bottom. You can edit the fields in the table by clicking onto them. The table is sorted in descending order by date, showing the latest observations at the top. To remove the latest observation click the remove button.

Stop an observation period and save the data

Simply press the red stop button, the observations and GPS track will automatically be saved in the working folder using the start time of the observation period as filename.

The GPS track will be as csv file named for example "mmobs_2023_11_20_14_26_28_track.csv" and contain these fields:

,time,lat,lon
0,2023-11-20 13:26:36,60.39748133333333,5.314325166666666
1,2023-11-20 13:26:42,60.39748166666666,5.314322
2,2023-11-20 13:26:48,60.3974755,5.3143155
3,2023-11-20 13:26:54,60.39746733333333,5.314312

The observations will be stored as csv file named for example "mmobs_2023_11_30_10_24_44_obs.csv" and contain these fields:

,timestamp,species,groupsize,distance,bearing,visibility,comment,lat,lon,gpstime,observer,observation_period_starttime,observation_period_stoptime,forward_quarter_side,vis_status,waveheight
0,2023-11-20 14:09:30.612932,Fin whale,1,3500,35,5000,Comment,60.397537166666666,5.3143525,2023-11-20 13:09:30,Sebastian,2023-11-20 14:08:36.908438,2023-11-20 14:24:20.172174,Starbord,clear,0
1,2023-11-20 14:09:17.684105,Fin whale,5,3500,60,5000,Comment,60.39752766666667,5.314345666666667,2023-11-20 13:09:12,Sebastian,2023-11-20 14:08:36.908438,2023-11-20 14:24:20.172174,Starbord,clear,0

To start a new observation period simply press start again, the last observation and GPS data will automatically be cleared and a new track started.

Metadata

Release files for mmobs-logger 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mmobs-logger 0.2
File Size Uploaded
mmobs_logger-0.2.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mmobs-logger 0.2
File Interpreter ABI Platform
mmobs_logger-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.9 kB

Release files / mmobs_logger-0.2.tar.gz

Download URL mmobs_logger-0.2.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
daf273334d0f5899c92430a525e5419bf9f1840f427b7e1a3880f156adfe5c87
BLAKE2b-256 checksum
How to use checksums
9b23c34d65cd9331e0e149700315fc077229137f5d8b13d82bce37b76d2720cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / mmobs_logger-0.2-py3-none-any.whl

Download URL mmobs_logger-0.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
406f16e8fc80bbf129d690205e72104bab5ee55c7950f4d8c0984ea234f24f43
BLAKE2b-256 checksum
How to use checksums
507f5b1a8c5b48a6b76c57615327c6285af938080824f22d24c3ef97b021583b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page