virtualargofleet.FloatConfiguration#
- class FloatConfiguration(name: str | list = 'default', *args, **kwargs)[source]#
Float mission configuration manager
Create a default configuration and then possibly update parameter values
Can be used to create a virtual fleet, to save or load float configurations
Examples
>>> cfg = FloatConfiguration('default') # Internally defined >>> cfg = FloatConfiguration('local-change') # Internally defined >>> cfg = FloatConfiguration('cfg_file.json') # From any json file >>> cfg = FloatConfiguration([6902919, 132]) # From Euro-Argo Fleet API >>> cfg.update('parking_depth', 500) # Update one parameter value >>> cfg.params # Return the list of parameters >>> cfg.mission # Return the configuration as a dictionary >>> cfg.tech # Return the configuration as a dictionary using Argo technical keys >>> cfg.to_json("cfg_file.json") # Save to file for later re-use >>> cfg
- __init__(name: str | list = 'default', *args, **kwargs)[source]#
- Parameters:
name (str) – Name of the configuration to load
Methods
__init__
([name])- param name:
Name of the configuration to load
to_json
(*args, **kwargs)Return a dictionary serialisable in json or write to file
update
(key, new_value)Update value to an existing parameter
Attributes
json_schema
Return the float configuration as a dictionary to be used by a
VirtualFleet
List of parameter keys
Float configuration as a dictionary using Argo technical keys