Skip to content

Commit

Permalink
Added base/ephemeris paths and metadata to LogManifest. (#17)
Browse files Browse the repository at this point in the history
# Changes
- Added optional auxiliary base/ephemeris file paths to log manifest file

# Fixes
- Fixed incorrect argument parser name in `config_tool` for `gnss_aux` lever arm config
  • Loading branch information
adamshapiro0 authored Feb 25, 2025
2 parents d30dc09 + df609a5 commit cc9bafd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/config_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ def main():

help = 'The secondary (auxiliary) GNSS antenna lever arm (in meters).'
param_parser.add_parser('gnss_aux', help=help, description=help)
gnss_parser = apply_param_parser.add_parser('gnss', help=help, description=help)
gnss_parser = apply_param_parser.add_parser('gnss_aux', help=help, description=help)
gnss_parser.add_argument('x', type=float, help='The X offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('y', type=float, help='The Y offset with respect to the vehicle body (in meters).')
gnss_parser.add_argument('z', type=float, help='The Z offset with respect to the vehicle body (in meters).')
Expand Down
14 changes: 11 additions & 3 deletions p1_runner/log_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ def __init__(self):
self.device_id = None
self.device_type = None
self.device_version = None
self.system_config_path = None
self.sw_version = None

self.system_config_path = None
self.base_path = None
self.ephemeris_path = None

self.channels = []

self.metadata = {}

def to_json(self, pretty=True):
data = copy.deepcopy(self.__dict__)

Expand Down Expand Up @@ -76,12 +81,15 @@ def from_json(cls, contents):

result.device_id = data.get('device_id', None)
result.device_type = DeviceType.from_string(data.get('device_type', None))

result.device_version = data.get('device_version', None)
result.system_config_path = data.get('system_config_path', None)
result.sw_version = data.get('sw_version', None)

result.system_config_path = data.get('system_config_path', None)
result.base_path = data.get('base_path', None)
result.ephemeris_path = data.get('ephemeris_path', None)

result.channels = data.get('channels', [])
result.metadata = data.get('metadata', {})

return result

Expand Down

0 comments on commit cc9bafd

Please sign in to comment.