-
Notifications
You must be signed in to change notification settings - Fork 148
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
Inertia navigation and landmarks tracking #907
base: main
Are you sure you want to change the base?
Conversation
…asing how does it work. Added tests and checks to the functions, measurements models.
…en UKF, EKF and Particle filters. Updated the measurement model to work with EKF and PF. Fixed a string that was causing the test to fail.
…en UKF, EKF and Particle filters. Updated the measurement model to work with EKF and PF. Fixed a string that was causing the test to fail.
…cuto/Stone-Soup into inertia_navigation_landmarks
In the comparison example I was not able to use the metric manager (in particular the SIAP metric) because the track associator was trying to iterate the Here is a gist that shows the problem: |
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.
Had an initial look at the code. Main points: being consistent with radians, rather than degrees; and to double check if a different angle convention is being used; a few places where functions could be vectorised (included some suggestions but may not be best approach).
@sdhiscocks thanks for the comments and suggestions, I'll apply them and double check the degree-radians transformations to keep the code uniform. As well, I'll check if PyMap3D does contain functions needed. |
…niformed the angles to radians, removed functions already present in the code, grammar checks and documentation
In the last commits I answered the comments provided, in details:
The only point I am not sure about, but as presented works fine, is the use of function Build_rotation_matrix which assumes angles being 1-dimensional, which should be fine when dealing with Kalman filter tracking but not for Particle filter. However allowing it to be multi-dimensional (arrays of (3, N) dimension) is messing up the tracking with the particle filter. |
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.
I've left some comments generally on the wording in the examples and some PEP styling on function names. All functions and function variables in init.py and navigation.py should be named in snake_case.
----------- | ||
target_speed: float | ||
Speed of the sensor; | ||
target_tadius: float |
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.
target_tadius: float | |
target_radius: float |
start_time: datetime, | ||
start of the simulation; | ||
number_of_timesteps: np.array | ||
simulation lenght |
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.
simulation lenght | |
simulation length |
docs/examples/example_navigation.py
Outdated
# accelerometer and gyroscope, with fixed target locations, also refereed as landmarks. | ||
# In this example, we simulate a three dimensional sensor, moving in 3D cartesian space, | ||
# we have the measurements from on-board instruments that evaluates the Euler angles, whose describe the | ||
# sensor rotations and orientation during the flight, as well as the the 3D forces acting on the sensor. |
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.
# sensor rotations and orientation during the flight, as well as the the 3D forces acting on the sensor. | |
# sensor rotations and orientation during the flight, as well as the 3D forces acting on the sensor. |
docs/examples/example_navigation.py
Outdated
# In this example, we present how to perform the tracking task using an inertia | ||
# navigation measurement model making use of instruments mounted on the sensor. | ||
# This example is relevant for tracking sensors in environments where GPS tracking is not | ||
# available and we integrate the information obtained from instruments on board, as the |
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.
# available and we integrate the information obtained from instruments on board, as the | |
# available and we integrate the information obtained from instruments on board, the |
docs/examples/example_navigation.py
Outdated
# model for the z-coordinate, since the sensor is moving on a fixed plane at 1 km above the surface. | ||
# At this stage we can start collecting both the groundtruths and # the measurement using a composite | ||
# measurement model merging the measurements from the :class:`~.AccelerometerMeasurementModel`, | ||
# the :class:`~.GyroscopeMeasurementModel` and the landmarks, using an |
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.
# the :class:`~.GyroscopeMeasurementModel` and the landmarks, using an | |
# the :class:`~.GyroscopeMeasurementModel` and the landmarks, using a |
docs/examples/example_navigation.py
Outdated
# the :class:`~.GyroscopeMeasurementModel` and the landmarks, using an | ||
# :class:`~.CartesianAzimuthElevationMeasurementModel`. | ||
# This measurement model combines the specific forces measured by the accelerometer instrument | ||
# and the angular rotation from the inertia movements of the target. The landmarks helps reducing the |
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.
# and the angular rotation from the inertia movements of the target. The landmarks helps reducing the | |
# and the angular rotation from the inertia movements of the target. The landmarks help to reduce the |
stonesoup/functions/__init__.py
Outdated
return (latitude, longitude, altitude) | ||
|
||
|
||
def localSphere2GCS(xEast, yNorth, zUp, origin): |
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.
def localSphere2GCS(xEast, yNorth, zUp, origin): | |
def local_sphere2GCS(x_east, y_north, z_up, origin): |
According to PEP-8 function and function variables should be in snake case.
stonesoup/functions/navigation.py
Outdated
from . import localSphere2GCS, build_rotation_matrix | ||
|
||
|
||
def earthSpeedFlatSq(dx, dy): |
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.
def earthSpeedFlatSq(dx, dy): | |
def earth_speed_flat_sq(dx, dy): |
Snake case should be used for function names. This is the case for all functions in this file.
stonesoup/functions/navigation.py
Outdated
""" | ||
|
||
# mapping | ||
position_mapping = (0, 3, 6) |
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.
Should these mappings be arguments for generality?
…ngs for functions, fixed visualisation of examples
In this PR we present a set of measurement models regarding inertia navigation, in particular the measurement models from accelerometer and gyroscope on board of sensors. To use these measurement models a set of navigation functions have been added (including tests).
Summarising this PR consists in: