Preprocessing Script Documentation¶
process_ais_data Module¶
Preprocesses AIS data.
To obtain the needed AIS data, see (and run) get_raw.sh
.
Uses information specified in the config_file
to chew through available AIS csv data to generate an output csv file
with the discretized states, inferred actions, and records metadata for further processing in the meta_file
.
Functions¶
|
Traverses the directory containing the decompressed AIS data to get the csv names for further processing. |
|
Wrapper function for other |
|
Calculates an arbitrary action from the previous state to current state relative to the previous state. |
|
Calculates the actions taken from the previous state to reach the current state, interpolating if necessary. |
|
Calculates the actions taken from the previous state to reach the current state, interpolating if necessary. |
|
Helper function to get longitude boundaries corresponding to zone. |
|
Helper function to get dictionary of script parameters. |
|
Helper function to retrieve a given file name’s year, month, and zone. |
|
Discretizes a coordinate pair into its state space representation in a Euclidean grid. |
|
Driver code to run the big steps of pre-processing the data. |
|
Iterate through each csv file to segregate each trajectory by its mmsi id. |
|
Inverse function for |
|
Writes all trajectories to an output csv file using a discretized state and action grid. |