diff --git a/src/little_r/record.py b/src/little_r/record.py index b6bc639..eafc435 100644 --- a/src/little_r/record.py +++ b/src/little_r/record.py @@ -141,8 +141,10 @@ class Record: Currently, only one measurement per record is supported ''' - def __init__(self, station_name, lat, lon, height, time, **kwargs): - self.station_name = station_name + def __init__(self, id, name, plateform, lat, lon, height, time, **kwargs): + self.id = "%-40s"%id + self.name = "%-40s"%name + self.plateform = "%-40s"%plateform self.lat = lat self.lon = lon self.time = time @@ -239,10 +241,10 @@ def message_header(self): data = [ self.lat, # station latitude (north positive) self.lon, # station longitude (east positive) - self.station_name, # string1 ID of station - 'Station name', # string2 Name of station - 'FM-12 SYNOP', # string3 Description of the measurement device - 'String 4', # string4 GTS, NCAR/ADP, BOGUS, etc. + self.id, # string1 ID of station + self.name, # string2 Name of station + self.plateform, # string3 Description of the measurement device + ' ', # string4 GTS, NCAR/ADP, BOGUS, etc. self.height, # terrain elevation (m) --> 1f20.5 6, # Number of valid fields in the report (kx*6) 0, # Number of errors encountered during the decoding of this observation (0)