trafficgen.write_traffic_situation_to_file module

Functions to clean traffic situations data before writing it to a json file.

trafficgen.write_traffic_situation_to_file.convert_ship_data_from_si_units_to_maritime(ship: T_ship) T_ship[source]

Convert ship data which is given in SI units to maritime units.

Params:
  • ship: Ship data

Returns:

* ship

Return type:

Converted ship data

trafficgen.write_traffic_situation_to_file.convert_situation_data_from_si_units_to__maritime(situation: TrafficSituation) TrafficSituation[source]

Convert situation data which is given in SI units to maritime units.

Params:
  • situation: Traffic situation data

Returns:

* situation

Return type:

Converted traffic situation data

trafficgen.write_traffic_situation_to_file.write_traffic_situations_to_json_file(situations: List[TrafficSituation], write_folder: Path)[source]

Write traffic situations to json file.

Params:
  • traffic_situations: Traffic situations to be written to file

  • write_folder: Folder where the json files is to be written