Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/little_r/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down