Skip to content
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

Added support for a 4D state vector when using a range, bearing, range rate radar model #809

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

PACarniglia
Copy link
Collaborator

The RadarBearingRangeRate2D sensor and associated CartesianToBearingRangeRate2D measurement model were created to support tracking from measurements of bearing, range, and range rate to a 4D state space [x, vx, y, vy]. The current RadarBearingRangeRate/CartesianToBearingRangeRate class only supports a 6D state vector [x, vx, y, vy, z, vz] as a requirement for the creation of the rotation matrix.

Additionally, both measurement models were given inverse functions to support plotting measurements to a Cartesian plot space.

If position_mapping and velocity_mapping are length 2, automatically fill the z components as 0.
…ent model

TODO: test this! Also the plotter still seems to be having issues with these measurements
Added ReversibleModel type to CartesianToBearingRangeRate as inverse_function() now allows the xyz coordinates to be extracted from a measurement type. Rotation matrix is now sized correctly for 2D & 3D
Added both models to radar and measurement model
Returns CartesianToBearingRangeRate to how it was prior to modification - the 2D state space implementation is now captured in a new function, CartesianToBearingRangeRate2D, to maintain code seperation.
@PACarniglia PACarniglia requested a review from a team as a code owner May 30, 2023 14:47
@PACarniglia PACarniglia requested review from sdhiscocks and orosoman-dstl and removed request for a team May 30, 2023 14:47
@PACarniglia PACarniglia changed the title Added RadarBearingRangeRate2D model to the list of nonlinear measurement models Added support for a 4D state vector when using a range, bearing, range rate radar model May 30, 2023
Comment on lines 797 to 798
out_vector[self.mapping, 0] = x, y
out_vector[self.velocity_mapping, 0] = x_rate, y_rate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From test failures, these mappings are 3D, but this is only assigning 2D values.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be fixed by setting z and z_rate to 0 when mapping out_vector - is this supported by the theory, or is there a way to calculate the z parameters from measurements of range/bearing/range rate?

@gawebb-dstl
Copy link
Contributor

Some conversation about this on PR #285

The mapping of the position and velocity required the z component, though this cannot be calculated directly from the measurements. To represent this fact, the z components of out_vector were set to NaN. This should be handled by any function that calls the inverse_function() method (ex. plotting)
inverse_function() of CartesianToBearingRangeRate should be implemented in another, separate PR. Commenting out for now to address the other more relevant addition of CartesianToBearingRangeRate2D.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants