50 [[nodiscard]] std::string
type()
const override;
53 [[nodiscard]]
static std::string
category();
60 [[nodiscard]]
json save()
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
FileType
File Type Enumeration.
FileReader(const FileReader &)=delete
Copy constructor.
Imu(const Imu &)=delete
Copy constructor.
The class is responsible for all time-related tasks.
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.
void readInformationMessageMulti(uint16_t msgSize, char msgType)
Read msg type 'M'.
uint64_t timeSinceStartup
Relative timestamp.
static std::string typeStatic()
String representation of the Class Type.
json save() const override
Saves the node into a json object.
UlogFile(UlogFile &&)=delete
Move constructor.
void deinitialize() override
Deinitialize the node.
static constexpr size_t OUTPUT_PORT_INDEX_POSVELATT
Flow (PosVelAtt)
UlogFile & operator=(UlogFile &&)=delete
Move assignment operator.
std::unordered_map< std::string, std::vector< DataField > > _messageFormats
Key: message_name, e.g. "sensor_accel".
static constexpr size_t OUTPUT_PORT_INDEX_IMUOBS_1
Flow (ImuObs #1)
std::multimap< uint64_t, MeasurementData > _epochData
Data message container. Key: [timestamp], Value: [0, "sensor_accel", SensorAccel{}...
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'.
struct NAV::UlogFile::@006001242362324316321330200126144024365050007132 lastGnssTime
Stores GNSS timestamp of one epoch before the current one (relative or absolute)
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.
bool resetNode() override
Resets the node. Moves the read cursor to the start.
~UlogFile() override
Destructor.
FileType determineFileType() override
Determines the type of the file.
std::shared_ptr< const NodeData > pollData()
Polls data from the file.
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)
UlogFile()
Default constructor.
UlogFile(const UlogFile &)=delete
Copy constructor.
static std::string category()
String representation of the Class Category.
void readHeader() override
Read the Header of the file.
void readParameterMessageDefault(uint16_t msgSize, char msgType)
Read msg type 'Q'.
float ram_usage
Px4 RAM usage.
uint64_t timestamp
Px4 CPU time since startup in [µs].
Key-value pair of the message format.
std::string type
e.g. "uint64_t"
std::string name
e.g. "timestamp"
Combined (sensor-)message name with unique ID and data.
std::variant< SensorAccel, SensorGyro, SensorMag, VehicleGpsPosition, VehicleAttitude > data
measurement data
std::string message_name
message name to subscribe to
uint8_t multi_id
multiple instances of the same message format, for example if the system has two sensors of the same ...
Px4 acceleration sensor message.
static constexpr uint8_t padding
padding
uint64_t timestamp_sample
[µs]
std::array< uint8_t, 3 > clip_counter
clip counter
float temperature
Px4 temperature of accel sensor in [°C].
uint64_t timestamp
Px4 accelerometer time since startup in [µs].
float z
Px4 acceleration along z in p-frame [m/s^2].
uint32_t device_id
unique device identifier
uint32_t error_count
error count
float y
Px4 acceleration along y in p-frame [m/s^2].
float x
Px4 acceleration along x in p-frame [m/s^2].
float temperature
Px4 temperature of gyro sensor in [°C].
float z
Px4 rotation rate about z in p-frame [//TODO].
uint64_t timestamp_sample
[µs]
uint32_t device_id
unique device identifier
uint64_t timestamp
Px4 gyroscope time since startup in [µs].
float x
Px4 rotation rate about x in p-frame [//TODO].
uint32_t error_count
error count
float y
Px4 rotation rate about y in p-frame [//TODO].
Px4 magnetometer sensor message.
float y
Px4 magnetic flux density about y in p-frame [//TODO].
uint32_t error_count
error count
uint32_t device_id
unique device identifier
static constexpr uint8_t padding
padding
uint64_t timestamp
Px4 magnetometer time since startup in [µs].
float x
Px4 magnetic flux density about x in p-frame [//TODO].
uint64_t timestamp_sample
[µs]
float z
Px4 magnetic flux density about z in p-frame [//TODO].
float temperature
Px4 temperature of gyro sensor in [°C].
Combined (sensor-)message name with unique ID.
uint8_t multi_id
the same message format can have multiple instances, for example if the system has two sensors of the...
std::string message_name
message name to subscribe to
Px4 air data sensor message.
uint64_t timestamp_sample
[µs]
uint64_t timestamp
Px4 air data sensor time since startup in [µs].
float baro_temp_celcius
Px4 barometric temperature in [°C].
uint32_t baro_device_id
unique device identifier
float baro_alt_meter
Px4 barometric altitude in [m].
static constexpr uint8_t padding
padding
float baro_pressure_pa
Px4 barometric pressure in [Pa].
Px4 GPS attitude message.
static constexpr uint8_t padding
padding
std::array< float, 4 > q
Px4 GPS attitude quaternion.
std::array< float, 4 > delta_q_reset
delta q reset
uint8_t quat_reset_counter
Quaternion reset counter.
uint64_t timestamp
Px4 GPS sensor time since startup in [µs].
Px4 control data message.
bool flag_external_manual_override_ok
Flag: external manual override ok.
bool flag_control_fixed_hdg_enabled
Flag: fixed heading enabled.
bool flag_control_climb_rate_enabled
Flag: climb rate enabled.
bool flag_control_auto_enabled
Flag: auto mode enabled.
bool flag_control_force_enabled
Flag: force enabled.
bool flag_control_attitude_enabled
Flag: attitude mode enabled.
bool flag_control_manual_enabled
Flag: manual mode enabled.
static constexpr uint8_t padding
padding
uint64_t timestamp
Px4 controller time since startup in [µs].
bool flag_control_rattitude_enabled
Flag: rattitude enabled.
bool flag_control_offboard_enabled
Flag: offboard enabled.
bool flag_armed
Flag: Arm switch.
bool flag_control_position_enabled
Flag: position enabled.
bool flag_control_velocity_enabled
Flag: velocity enabled.
bool flag_control_acceleration_enabled
Flag: acceleration enabled.
bool flag_control_altitude_enabled
Flag: altitude enabled.
bool flag_control_yawrate_override_enabled
Flag: yawrate override enabled.
bool flag_control_rates_enabled
Flag: rates enabled.
bool flag_control_termination_enabled
Flag: termination enabled.
float heading_offset
heading offset
int32_t alt_ellipsoid
Altitude above ellipsoid in [mm] (unit retains precision despite integer)
float vdop
Vertical dilusion of precision.
float c_variance_rad
Variance of angle [rad²].
float vel_e_m_s
Velocity east component in [m/s].
float s_variance_m_s
Variance of speed [m²/s²].
int32_t timestamp_time_relative
Relative time stamp.
float vel_m_s
Velocity in [m/s].
int32_t jamming_indicator
Jamming indicator.
float vel_d_m_s
Velocity down component in [m/s].
uint64_t timestamp
Px4 GPS sensor time since startup in [µs].
int32_t lat
Latitude in [deg * 1e7] (unit retains precision despite integer)
int32_t noise_per_ms
Noise per millisecond.
bool vel_ned_valid
Flag for validation of velocity in NED.
uint64_t time_utc_usec
Px4 GPS UTC time in [µs].
float eph
Horizontal position error in [m].
float hdop
Horizontal dilusion of precision.
float vel_n_m_s
Velocity north component in [m/s].
float cog_rad
Center of gravity.
int32_t lon
Longitude in [deg * 1e7] (unit retains precision despite integer)
int32_t alt
Altitude above ground in [mm] (unit retains precision despite integer)
float epv
Vertical position error in [m].
static constexpr uint8_t padding
padding
Px4 vehicle status message.
uint8_t component_id
component id
uint8_t rc_input_mode
RC input mode.
bool is_vtol_tailsitter
Flag: is vertical take-off and landing tailsitter.
uint8_t vehicle_type
vehicle type
uint8_t latest_arming_reason
latest arming reason
bool data_link_lost
Flag: Data link lost.
bool in_transition_mode
Flag: transition mode.
uint8_t latest_disarming_reason
latest disarming reason
bool high_latency_data_link_lost
Flag: high latency data link lost.
bool mission_failure
Flag: mission failure.
std::array< uint8_t, 5 > _padding0
padding
bool is_vtol
Flag: is vertical take-off and landing.
bool failsafe
Flag: failsafe.
uint32_t onboard_control_sensors_health
onboard control sensors health
uint8_t arming_state
arming state
bool rc_signal_lost
Flag: RC signal lost.
uint8_t hil_state
hil state
uint8_t failure_detector_status
failure detector status
uint8_t system_type
system type
uint32_t onboard_control_sensors_enabled
onboard control sensors enabled
uint8_t nav_state
nav state
uint32_t onboard_control_sensors_present
onboard control sensors present
uint64_t nav_state_timestamp
[µs]
bool vtol_fw_permanent_stab
Flag: vertical take-off and landing fw permanent stability.
bool in_transition_to_fw
Flag: transition to fw.
uint8_t system_id
system id
uint8_t data_link_lost_counter
Counter how often data link was lost.
bool engine_failure
Flag: engine failure.