Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::SensorLogWriter Class Reference

Definition of SensorLogWriter. More...

Inheritance diagram for gem::SensorLogWriter:
Collaboration diagram for gem::SensorLogWriter:

Classes

struct  __allow_private_constructor

Public Member Functions

bool saveLog (const String &outputDir, const String &logName, const CameraCharacteristics &cameraCharacteristics, LargeUnsignedInteger videoStartTimestamp)
 Save sensor log.
void pushGPSPosition (LargeUnsignedInteger acquisitionTimestamp, LargeUnsignedInteger satteliteTime, double latitude, double longitude, double altitude, double course, double speed, double horizontalAccuracy, double verticalAccuracy, double speedAccuracy, double courseAccuracy)
 Push GPS position.
void pushAcceleration (LargeUnsignedInteger acquisitionTimestamp, double x, double y, double z)
 Push acceleration data.
void pushRotation (LargeUnsignedInteger acquisitionTimestamp, double x, double y, double z)
 Push rotation data.
void pushCameraFrameInfo (LargeUnsignedInteger acquisitionTimestamp, double exposureTime, double iso)
 Push camera frame info.

Static Public Member Functions

static StrongPointer< SensorLogWriterproduce (int keepLastSeconds)
 Create a SensorLogWriter object.

Protected Types

using Base = ApiObject<ISensorLogWriter, false>
 Alias for the base class.

Detailed Description

Definition of SensorLogWriter.

Member Function Documentation

◆ produce()

StrongPointer< SensorLogWriter > gem::SensorLogWriter::produce ( int keepLastSeconds)
inlinestatic

Create a SensorLogWriter object.

Parameters
[in]keepLastSecondsThe number of seconds saved in the log.
Returns
A shared pointer to the SensorLogWriter object.

◆ pushAcceleration()

void gem::SensorLogWriter::pushAcceleration ( LargeUnsignedInteger acquisitionTimestamp,
double x,
double y,
double z )
inline

Push acceleration data.

Parameters
[in]acquisitionTimestampAcquisition timestamp in milliseconds since 1970.
[in]xAcceleration on the x axis of the device, G-units.
[in]yAcceleration on the y axis of the device, G-units.
[in]zAcceleration on the z axis of the device, G-units.

◆ pushCameraFrameInfo()

void gem::SensorLogWriter::pushCameraFrameInfo ( LargeUnsignedInteger acquisitionTimestamp,
double exposureTime,
double iso )
inline

Push camera frame info.

Parameters
[in]acquisitionTimestampAcquisition timestamp in milliseconds since 1970.
[in]exposureTimeDuration each pixel is exposed to light in nanoseconds.
[in]isoThe actual iso value in ISO arithmetic units.

◆ pushGPSPosition()

void gem::SensorLogWriter::pushGPSPosition ( LargeUnsignedInteger acquisitionTimestamp,
LargeUnsignedInteger satteliteTime,
double latitude,
double longitude,
double altitude,
double course,
double speed,
double horizontalAccuracy,
double verticalAccuracy,
double speedAccuracy,
double courseAccuracy )
inline

Push GPS position.

Parameters
[in]acquisitionTimestampAcquisition timestamp in milliseconds since 1970.
[in]satteliteTimeSatellite timestamp in milliseconds since 1970.
[in]latitudeGeographical latitude in degrees.
[in]longitudeGeographical longitude in degrees.
[in]altitudeAltitude above main sea level in meters.
[in]courseThe course of the movement in degrees.
[in]speedTravel speed in meter per second.
[in]horizontalAccuracyHorizontal accuracy of position in meters.
[in]verticalAccuracyVertical accuracy of position in meters.
[in]speedAccuracyTravel speed accuracy in meter per second.
[in]courseAccuracyCourse accuracy in degrees.

◆ pushRotation()

void gem::SensorLogWriter::pushRotation ( LargeUnsignedInteger acquisitionTimestamp,
double x,
double y,
double z )
inline

Push rotation data.

Parameters
[in]acquisitionTimestampAcquisition timestamp in milliseconds since 1970.
[in]xRotation rate around the x axis of the device in radian per second.
[in]yRotation rate around the y axis of the device in radian per second.
[in]zRotation rate around the z axis of the device in radian per second.

◆ saveLog()

bool gem::SensorLogWriter::saveLog ( const String & outputDir,
const String & logName,
const CameraCharacteristics & cameraCharacteristics,
LargeUnsignedInteger videoStartTimestamp )
inline

Save sensor log.

In the outputDir will be created 2 files "logName.meta" and "logName.sensors"

Parameters
[in]outputDirThe directory that contains the log.
[in]logNameThe name of the log that will be used for the metadata file and the sensor file.
[in]cameraCharacteristicsThe characteristics of the camera with which the video was recorded.
[in]videoStartTimestampThe video start timestamp in milliseconds since 1970.
Returns
False if the input parameters are invalid(output directory does not exist or cannot be created; missing camera characteristics; video start timestamp not in sync with sensors timestamp).