GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

L0tx object initialisation from .sbd file #129

Open PennyHow opened 1 year ago

PennyHow commented 1 year ago

Currently the L0tx object initialises from a .msg file, which is a transmission message along with the .sbd file as an attachment. Ideally, we should also be able to initialise a L0tx object from just the attachment (i.e. initialise with a .msg file OR a .sbd file). This way, our back-up of transmissions could be reduced to just the attachments.

In order to do this, the L0tx object needs to be redesigned with flexible initialisation. Right now, L0tx inherits from the EmailMessage and SbdMessage objects, where an EmailMessage represents the contents of the transmission message and SbdMessage represents the contents of the .sbd attachment; like so:

pypromice.tx

So we need to build flexibility so that the L0tx object can initialise from the .sbd file, creating the SbdMessage object and a practically empty EmailMessage object.

The only thing to note is that by doing this, we lose the logger GPS information which is only included in the transmission message and NOT the attachment.