50 [[nodiscard]] std::string
type()
const override;
89 [[nodiscard]] std::shared_ptr<const NodeData>
pollData();
209 std::array<float, 4>
q;
305 std::variant<SensorAccel, SensorGyro, SensorMag, VehicleGpsPosition, VehicleAttitude>
data;
317 std::array<std::multimap<uint64_t, NAV::UlogFile::MeasurementData>::iterator, 2>
findPosVelAttData();
Abstract File Reader class.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Abstract File Reader class.
Definition FileReader.hpp:31
FileType
File Type Enumeration.
Definition FileReader.hpp:35
Abstract IMU Class.
Definition Imu.hpp:24
The class is responsible for all time-related tasks.
Definition InsTime.hpp:668
File Reader for ULog files ('.ulg')
Definition UlogFile.hpp:31
UlogFile & operator=(const UlogFile &)=delete
Copy assignment operator.
void readInformationMessage(uint16_t msgSize, char msgType)
Read msg type 'I'.
bool initialize() override
Initialize the node.
InsTime gnssTime
Absolute timestamp.
Definition UlogFile.hpp:323
static std::string category()
String representation of the Class Category.
void readInformationMessageMulti(uint16_t msgSize, char msgType)
Read msg type 'M'.
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
uint64_t timeSinceStartup
Relative timestamp.
Definition UlogFile.hpp:322
json save() const override
Saves the node into a json object.
UlogFile(UlogFile &&)=delete
Move constructor.
void deinitialize() override
Deinitialize the node.
struct NAV::UlogFile::@2 lastGnssTime
Stores GNSS timestamp of one epoch before the current one (relative or absolute)
static constexpr size_t OUTPUT_PORT_INDEX_POSVELATT
Flow (PosVelAtt)
Definition UlogFile.hpp:79
UlogFile & operator=(UlogFile &&)=delete
Move assignment operator.
std::unordered_map< std::string, std::vector< DataField > > _messageFormats
Key: message_name, e.g. "sensor_accel".
Definition UlogFile.hpp:126
static constexpr size_t OUTPUT_PORT_INDEX_IMUOBS_1
Flow (ImuObs #1)
Definition UlogFile.hpp:77
std::multimap< uint64_t, MeasurementData > _epochData
Data message container. Key: [timestamp], Value: [0, "sensor_accel", SensorAccel{}...
Definition UlogFile.hpp:309
void restore(const json &j) override
Restores the node from a json object.
void guiConfig() override
ImGui config window which is shown on double click.
void readParameterMessage(uint16_t msgSize, char msgType)
Read msg type 'P'.
static std::string typeStatic()
String representation of the Class Type.
std::array< std::multimap< uint64_t, NAV::UlogFile::MeasurementData >::iterator, 2 > findPosVelAttData()
Checks '_epochData' whether there is enough data available to output one PosVelAtt.
std::unordered_map< uint16_t, SubscriptionData > _subscribedMessages
Key: msg_id.
Definition UlogFile.hpp:298
bool resetNode() override
Resets the node. Moves the read cursor to the start.
FileType determineFileType() override
Determines the type of the file.
~UlogFile() override
Destructor.
int8_t enoughImuDataAvailable()
Checks '_epochData' whether there is enough data available to output one ImuObs.
std::string type() const override
String representation of the Class Type.
static constexpr size_t OUTPUT_PORT_INDEX_IMUOBS_2
Flow (ImuObs #2)
Definition UlogFile.hpp:78
UlogFile()
Default constructor.
UlogFile(const UlogFile &)=delete
Copy constructor.
void readHeader() override
Read the Header of the file.
void readParameterMessageDefault(uint16_t msgSize, char msgType)
Read msg type 'Q'.
Px4 CPU status message.
Definition UlogFile.hpp:291
float load
Px4 CPU load.
Definition UlogFile.hpp:293
float ram_usage
Px4 RAM usage.
Definition UlogFile.hpp:294
uint64_t timestamp
Px4 CPU time since startup in [µs].
Definition UlogFile.hpp:292
Key-value pair of the message format.
Definition UlogFile.hpp:120
std::string type
e.g. "uint64_t"
Definition UlogFile.hpp:121
std::string name
e.g. "timestamp"
Definition UlogFile.hpp:122
Combined (sensor-)message name with unique ID and data.
Definition UlogFile.hpp:302
std::variant< SensorAccel, SensorGyro, SensorMag, VehicleGpsPosition, VehicleAttitude > data
measurement data
Definition UlogFile.hpp:305
std::string message_name
message name to subscribe to
Definition UlogFile.hpp:304
uint8_t multi_id
multiple instances of the same message format, for example if the system has two sensors of the same ...
Definition UlogFile.hpp:303
Px4 acceleration sensor message.
Definition UlogFile.hpp:130
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:141
uint64_t timestamp_sample
[µs]
Definition UlogFile.hpp:132
std::array< uint8_t, 3 > clip_counter
clip counter
Definition UlogFile.hpp:139
float temperature
Px4 temperature of accel sensor in [°C].
Definition UlogFile.hpp:137
uint64_t timestamp
Px4 accelerometer time since startup in [µs].
Definition UlogFile.hpp:131
float z
Px4 acceleration along z in p-frame [m/s^2].
Definition UlogFile.hpp:136
uint32_t device_id
unique device identifier
Definition UlogFile.hpp:133
uint32_t error_count
error count
Definition UlogFile.hpp:138
float y
Px4 acceleration along y in p-frame [m/s^2].
Definition UlogFile.hpp:135
float x
Px4 acceleration along x in p-frame [m/s^2].
Definition UlogFile.hpp:134
Px4 gyro sensor message.
Definition UlogFile.hpp:146
float temperature
Px4 temperature of gyro sensor in [°C].
Definition UlogFile.hpp:153
float z
Px4 rotation rate about z in p-frame [//TODO].
Definition UlogFile.hpp:152
uint64_t timestamp_sample
[µs]
Definition UlogFile.hpp:148
uint32_t device_id
unique device identifier
Definition UlogFile.hpp:149
uint64_t timestamp
Px4 gyroscope time since startup in [µs].
Definition UlogFile.hpp:147
float x
Px4 rotation rate about x in p-frame [//TODO].
Definition UlogFile.hpp:150
uint32_t error_count
error count
Definition UlogFile.hpp:154
float y
Px4 rotation rate about y in p-frame [//TODO].
Definition UlogFile.hpp:151
Px4 magnetometer sensor message.
Definition UlogFile.hpp:159
float y
Px4 magnetic flux density about y in p-frame [//TODO].
Definition UlogFile.hpp:164
uint32_t error_count
error count
Definition UlogFile.hpp:167
uint32_t device_id
unique device identifier
Definition UlogFile.hpp:162
bool is_external
Flag.
Definition UlogFile.hpp:168
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:170
uint64_t timestamp
Px4 magnetometer time since startup in [µs].
Definition UlogFile.hpp:160
float x
Px4 magnetic flux density about x in p-frame [//TODO].
Definition UlogFile.hpp:163
uint64_t timestamp_sample
[µs]
Definition UlogFile.hpp:161
float z
Px4 magnetic flux density about z in p-frame [//TODO].
Definition UlogFile.hpp:165
float temperature
Px4 temperature of gyro sensor in [°C].
Definition UlogFile.hpp:166
Combined (sensor-)message name with unique ID.
Definition UlogFile.hpp:71
uint8_t multi_id
the same message format can have multiple instances, for example if the system has two sensors of the...
Definition UlogFile.hpp:72
std::string message_name
message name to subscribe to
Definition UlogFile.hpp:73
Px4 air data sensor message.
Definition UlogFile.hpp:218
uint64_t timestamp_sample
[µs]
Definition UlogFile.hpp:220
uint64_t timestamp
Px4 air data sensor time since startup in [µs].
Definition UlogFile.hpp:219
float baro_temp_celcius
Px4 barometric temperature in [°C].
Definition UlogFile.hpp:223
uint32_t baro_device_id
unique device identifier
Definition UlogFile.hpp:221
float baro_alt_meter
Px4 barometric altitude in [m].
Definition UlogFile.hpp:222
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:227
float baro_pressure_pa
Px4 barometric pressure in [Pa].
Definition UlogFile.hpp:224
float rho
density?
Definition UlogFile.hpp:225
Px4 GPS attitude message.
Definition UlogFile.hpp:207
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:213
std::array< float, 4 > q
Px4 GPS attitude quaternion.
Definition UlogFile.hpp:209
std::array< float, 4 > delta_q_reset
delta q reset
Definition UlogFile.hpp:210
uint8_t quat_reset_counter
Quaternion reset counter.
Definition UlogFile.hpp:211
uint64_t timestamp
Px4 GPS sensor time since startup in [µs].
Definition UlogFile.hpp:208
Px4 control data message.
Definition UlogFile.hpp:232
bool flag_external_manual_override_ok
Flag: external manual override ok.
Definition UlogFile.hpp:235
bool flag_control_fixed_hdg_enabled
Flag: fixed heading enabled.
Definition UlogFile.hpp:250
bool flag_control_climb_rate_enabled
Flag: climb rate enabled.
Definition UlogFile.hpp:248
bool flag_control_auto_enabled
Flag: auto mode enabled.
Definition UlogFile.hpp:237
bool flag_control_force_enabled
Flag: force enabled.
Definition UlogFile.hpp:243
bool flag_control_attitude_enabled
Flag: attitude mode enabled.
Definition UlogFile.hpp:240
bool flag_control_manual_enabled
Flag: manual mode enabled.
Definition UlogFile.hpp:236
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:252
uint64_t timestamp
Px4 controller time since startup in [µs].
Definition UlogFile.hpp:233
bool flag_control_rattitude_enabled
Flag: rattitude enabled.
Definition UlogFile.hpp:242
bool flag_control_offboard_enabled
Flag: offboard enabled.
Definition UlogFile.hpp:238
bool flag_armed
Flag: Arm switch.
Definition UlogFile.hpp:234
bool flag_control_position_enabled
Flag: position enabled.
Definition UlogFile.hpp:246
bool flag_control_velocity_enabled
Flag: velocity enabled.
Definition UlogFile.hpp:245
bool flag_control_acceleration_enabled
Flag: acceleration enabled.
Definition UlogFile.hpp:244
bool flag_control_altitude_enabled
Flag: altitude enabled.
Definition UlogFile.hpp:247
bool flag_control_yawrate_override_enabled
Flag: yawrate override enabled.
Definition UlogFile.hpp:241
bool flag_control_rates_enabled
Flag: rates enabled.
Definition UlogFile.hpp:239
bool flag_control_termination_enabled
Flag: termination enabled.
Definition UlogFile.hpp:249
Px4 GPS sensor message.
Definition UlogFile.hpp:175
float heading_offset
heading offset
Definition UlogFile.hpp:197
float heading
heading
Definition UlogFile.hpp:196
int32_t alt_ellipsoid
Altitude above ellipsoid in [mm] (unit retains precision despite integer)
Definition UlogFile.hpp:181
float vdop
Vertical dilusion of precision.
Definition UlogFile.hpp:187
float c_variance_rad
Variance of angle [rad²].
Definition UlogFile.hpp:183
float vel_e_m_s
Velocity east component in [m/s].
Definition UlogFile.hpp:192
float s_variance_m_s
Variance of speed [m²/s²].
Definition UlogFile.hpp:182
int32_t timestamp_time_relative
Relative time stamp.
Definition UlogFile.hpp:195
float vel_m_s
Velocity in [m/s].
Definition UlogFile.hpp:190
int32_t jamming_indicator
Jamming indicator.
Definition UlogFile.hpp:189
float vel_d_m_s
Velocity down component in [m/s].
Definition UlogFile.hpp:193
uint64_t timestamp
Px4 GPS sensor time since startup in [µs].
Definition UlogFile.hpp:176
int32_t lat
Latitude in [deg * 1e7] (unit retains precision despite integer)
Definition UlogFile.hpp:178
int32_t noise_per_ms
Noise per millisecond.
Definition UlogFile.hpp:188
uint8_t fix_type
fix type
Definition UlogFile.hpp:198
bool vel_ned_valid
Flag for validation of velocity in NED.
Definition UlogFile.hpp:199
uint64_t time_utc_usec
Px4 GPS UTC time in [µs].
Definition UlogFile.hpp:177
float eph
Horizontal position error in [m].
Definition UlogFile.hpp:184
float hdop
Horizontal dilusion of precision.
Definition UlogFile.hpp:186
float vel_n_m_s
Velocity north component in [m/s].
Definition UlogFile.hpp:191
float cog_rad
Center of gravity.
Definition UlogFile.hpp:194
int32_t lon
Longitude in [deg * 1e7] (unit retains precision despite integer)
Definition UlogFile.hpp:179
int32_t alt
Altitude above ground in [mm] (unit retains precision despite integer)
Definition UlogFile.hpp:180
uint8_t satellites_used
Definition UlogFile.hpp:200
float epv
Vertical position error in [m].
Definition UlogFile.hpp:185
static constexpr uint8_t padding
padding
Definition UlogFile.hpp:202
Px4 vehicle status message.
Definition UlogFile.hpp:257
uint8_t component_id
component id
Definition UlogFile.hpp:269
uint8_t rc_input_mode
RC input mode.
Definition UlogFile.hpp:277
bool is_vtol_tailsitter
Flag: is vertical take-off and landing tailsitter.
Definition UlogFile.hpp:272
uint8_t vehicle_type
vehicle type
Definition UlogFile.hpp:270
uint8_t latest_arming_reason
latest arming reason
Definition UlogFile.hpp:284
bool data_link_lost
Flag: Data link lost.
Definition UlogFile.hpp:278
bool in_transition_mode
Flag: transition mode.
Definition UlogFile.hpp:274
uint8_t latest_disarming_reason
latest disarming reason
Definition UlogFile.hpp:285
bool high_latency_data_link_lost
Flag: high latency data link lost.
Definition UlogFile.hpp:280
bool mission_failure
Flag: mission failure.
Definition UlogFile.hpp:282
std::array< uint8_t, 5 > _padding0
padding
Definition UlogFile.hpp:286
bool is_vtol
Flag: is vertical take-off and landing.
Definition UlogFile.hpp:271
uint64_t timestamp
[µs]
Definition UlogFile.hpp:258
bool failsafe
Flag: failsafe.
Definition UlogFile.hpp:266
uint32_t onboard_control_sensors_health
onboard control sensors health
Definition UlogFile.hpp:262
uint8_t arming_state
arming state
Definition UlogFile.hpp:264
bool rc_signal_lost
Flag: RC signal lost.
Definition UlogFile.hpp:276
uint8_t hil_state
hil state
Definition UlogFile.hpp:265
uint8_t failure_detector_status
failure detector status
Definition UlogFile.hpp:283
uint8_t system_type
system type
Definition UlogFile.hpp:267
uint32_t onboard_control_sensors_enabled
onboard control sensors enabled
Definition UlogFile.hpp:261
uint8_t nav_state
nav state
Definition UlogFile.hpp:263
uint32_t onboard_control_sensors_present
onboard control sensors present
Definition UlogFile.hpp:260
uint64_t nav_state_timestamp
[µs]
Definition UlogFile.hpp:259
bool vtol_fw_permanent_stab
Flag: vertical take-off and landing fw permanent stability.
Definition UlogFile.hpp:273
bool in_transition_to_fw
Flag: transition to fw.
Definition UlogFile.hpp:275
uint8_t system_id
system id
Definition UlogFile.hpp:268
uint8_t data_link_lost_counter
Counter how often data link was lost.
Definition UlogFile.hpp:279
bool engine_failure
Flag: engine failure.
Definition UlogFile.hpp:281