#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/data_utils/read_gps_w_vel_data.h>
◆ ReadGpsWithVelData()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW mars::ReadGpsWithVelData::ReadGpsWithVelData |
( |
std::vector< BufferEntryType > * |
data_out, |
|
|
std::shared_ptr< SensorAbsClass > |
sensor, |
|
|
const std::string & |
file_path, |
|
|
const double & |
time_offset = 0 |
|
) |
| |
|
inline |
32 std::vector<std::string> expect_entry = {
"t",
"lat",
"long",
"alt",
"v_x",
"v_y",
"v_z" };
35 ReadCsv(&csv_data, file_path);
37 unsigned long number_of_datapoints = csv_data[
"t"].size();
38 data_out->resize(number_of_datapoints);
40 for (
size_t k = 0; k < number_of_datapoints; k++)
42 Time time = csv_data[
"t"][k] + time_offset;
45 data.set_measurement(std::make_shared<GpsVelMeasurementType>(csv_data[
"lat"][k], csv_data[
"long"][k],
46 csv_data[
"alt"][k], csv_data[
"v_x"][k],
47 csv_data[
"v_y"][k], csv_data[
"v_z"][k]));
49 BufferEntryType current_entry(time, data, sensor);
50 data_out->at(k) = current_entry;
std::map< std::string, std::vector< double > > CsvDataType
Definition: read_csv.h:26
The documentation for this class was generated from the following file: