[Positioning] InputCSV: use read_point3d()
Use CSVFileReader::read_point3d() to read the coordinates, instead of reading 3 floats.
This commit is contained in:
parent
3fe1f1be6e
commit
3c29379821
|
@ -54,14 +54,13 @@ const Request& InputCSV::get_next_request()
|
|||
current_request->set_time_sent(timestamp) ;
|
||||
|
||||
// Read position fields
|
||||
float pos[3] ;
|
||||
for (int i = 0 ; i < 3 ; ++i)
|
||||
if (! file.read_field(pos[i]))
|
||||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
return *current_request ;
|
||||
}
|
||||
Point3D pos ;
|
||||
if (! file.read_point3d(pos))
|
||||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
return *current_request ;
|
||||
}
|
||||
|
||||
// Read direction field
|
||||
Direction direction ;
|
||||
|
|
Loading…
Reference in New Issue