-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add energy computation to RadarPostProcessNode #255
Conversation
include/rgl/api/core.h
Outdated
@@ -295,6 +295,11 @@ typedef enum : int32_t | |||
*/ | |||
RGL_FIELD_INCIDENT_ANGLE_F32, | |||
|
|||
/** | |||
* 3x4 matrix describing pose of the ray in the TODO coordinate system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO -> world?
src/RGLFields.hpp
Outdated
NORMAL_VEC3_F32, | ||
INCIDENT_ANGLE_F32, | ||
}; | ||
static std::set<rgl_field_t> allRealFields = {XYZ_VEC3_F32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is formatting here fine? Previous one seems correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are the result of our clang-format. The new one misses the colon at the end of list, which causes different formatting. Fixed that.
src/gpu/nodeKernels.cu
Outdated
const Vec3f dirZ = {0, 0, 1}; | ||
|
||
Vec3f rayDirCts = rayPose[tid] * Vec3f{0, 0, 1}; | ||
Vec3f rayDirSph = {rayDirCts.length(), rayDirCts[0] == 0 && rayDirCts[1] == 0 ? 0 : atan2(rayDirCts.y(), rayDirCts.x()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (cts to sph) may be useful as some general math function.
src/gpu/nodeKernels.cu
Outdated
Vec3f rayDirCts = rayPose[tid] * Vec3f{0, 0, 1}; | ||
Vec3f rayDirSph = {rayDirCts.length(), rayDirCts[0] == 0 && rayDirCts[1] == 0 ? 0 : atan2(rayDirCts.y(), rayDirCts.x()), | ||
std::acos(rayDirCts.z() / rayDirCts.length())}; | ||
float phi = rayDirSph[1]; // azimuth, 0 = X-axis, positive = CCW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and some variables below may be made const.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added const where possible.
src/gpu/nodeKernels.cu
Outdated
LIMIT(count); | ||
|
||
constexpr float c0 = 299792458.0f; | ||
constexpr float freq = 79E9f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should become a parameter in general, because this exact value may be specific for SmartMicro radar.
src/gpu/nodeKernels.cu
Outdated
Vec3f vecK = waveNum * ((dirX * cp + dirY * sp) * st + dirZ * ct); | ||
|
||
float rayArea = hitDist[tid] * hitDist[tid] * std::sin(rayElevationStepRad) * rayAzimuthStepRad; | ||
Vector<3, thrust::complex<float>> outBUBRFactor = {0, 0, 0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that this not match this function signature, where you have three separate complex numbers for values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
return -polCompR * refPolR + polCompU * refPolU; | ||
} | ||
|
||
float getRayArea(float R) { return R * R * std::sin(elevationRad) * azimuthRad; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float getRayArea(float R) { return R * R * std::sin(elevationRad) * azimuthRad; } | |
float getRayArea(float R) { return R * R * std::sin(elevationStep) * azimuthStep; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed manually
Signed-off-by: Paweł Liberadzki <[email protected]>
2bc97cb
to
9221bd8
Compare
* Fix bugs * Add ray area computation * Fix calculating ray polarization. Update ray directions calculation. Signed-off-by: Paweł Liberadzki <[email protected]> * Add RAY_POSE field * Implement BU, BR computation on GPU * Call energy computation in RadarPostprocessPointsNode * Review fixes --------- Signed-off-by: Paweł Liberadzki <[email protected]> Co-authored-by: Paweł Liberadzki <[email protected]>
No description provided.