-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAnalysis.h
More file actions
73 lines (60 loc) · 2.59 KB
/
Copy pathAnalysis.h
File metadata and controls
73 lines (60 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Copyright (C) 2025-2026: Arizona Board of Regents on Behalf of the University of Arizona
*/
/**
* @file Analysis.h
* @brief Apache Strap-Down Pilotage Render header file for analysis objects.
*
* @author ReliaSolve.
* @date December 2, 2025.
*/
#pragma once
#include <memory>
#include <vector>
#include <array>
#include <string>
#include <cstdint>
#include <list>
#include <ASDP_Core_API.h>
#include <Composite.h>
namespace asdp {
namespace analysis {
/// @brief Holds the required and optional entries described in Appendix C of TR-006v29_Software_Architecture.docx
class AnalysisReport {
public:
/// @brief Constructor
/// @param jsonString JSON string to be parsed to initialize member variables.
/// @throws std::invalid_argument if the JSON string is malformed or required entries are missing.
AnalysisReport(std::string jsonString);
/// @brief Converts the AnalysisReport into an annotation for rendering.
/// @param chanceThreshold Minimum chance value for including a classification in the annotation (range 0-1).
/// @param alpha Transparency level for the annotation (range 0-1).
/// @return An annotation. Its label field will be empty if no classifications meet the chance threshold.
asdp::render::CompositeCameras::Annotation ConvertToAnnotation(float chanceThreshold = 0.0f, float alpha = 1.0f) const;
/// @brief Test function for the analysis module.
/// @return An empty string on success, or an error message on failure.
static std::string Test();
//=========================================================================================
// Member variables holding the data.
/// Required entries
uint32_t CamID = 0;
asdp::Time Timestamp = {};
std::string Name;
/// Optional entries. Shared pointer value of nullptr indicates absence of the entry.
std::shared_ptr< std::array<float, 2> > Loc;
std::shared_ptr< std::array<float, 2> > Rect;
std::shared_ptr< std::array<float, 2> > Vel;
/// Possibly empty vector of detected classes
class Classification {
public:
std::shared_ptr<std::string> Type;
std::shared_ptr<float> Chance;
std::shared_ptr<std::string> IFF;
};
std::vector<Classification> Class;
};
/// Keeps track of a particular named object over time, including its most recent report and a history of past reports.
/// The oldest is at the front and the most recent at the back.
typedef std::list<AnalysisReport> AnalysisObjectOverTime;
} // namespace analysis
} // namespace asdp