-
Notifications
You must be signed in to change notification settings - Fork 121
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
base: main
Are you sure you want to change the base?
Conversation
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.
out_vector[self.mapping, 0] = x, y | ||
out_vector[self.velocity_mapping, 0] = x_rate, y_rate |
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.
From test failures, these mappings are 3D, but this is only assigning 2D 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.
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?
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.
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.