-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 Kalman Filter #698
Add Kalman Filter #698
Conversation
WalkthroughThe changes across multiple files involve refactoring the way the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BfgsMultilateralizer
participant Scenario
User->>BfgsMultilateralizer: Call Locate(scenario)
BfgsMultilateralizer->>Scenario: UpdateLocation(newLocation)
Scenario-->>BfgsMultilateralizer: Location updated
BfgsMultilateralizer-->>User: Locate complete
Poem
Tip Early access features: disabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- src/Locators/BfgsMultilateralizer.cs (3 hunks)
- src/Locators/GaussNewtonMultilateralizer.cs (3 hunks)
- src/Locators/IterativeCentroidMultilateralizer.cs (2 hunks)
- src/Locators/MLEMultilateralizer.cs (3 hunks)
- src/Locators/MultiFloorMultilateralizer.cs (2 hunks)
- src/Locators/NelderMeadMultilateralizer.cs (3 hunks)
- src/Models/Scenario.cs (3 hunks)
Additional comments not posted (24)
src/Locators/MultiFloorMultilateralizer.cs (3)
64-64
: LGTM! The change enhances encapsulation.Replacing the direct assignment of
scenario.Location
with a call toscenario.UpdateLocation
is a good practice. It encapsulates the logic for updating the location, allowing for additional logic or validation to be included in theUpdateLocation
method.
76-76
: LGTM! The change is consistent with the previous one.This change is similar to the one at line 64 and further reinforces the encapsulation of the location update logic.
83-83
: LGTM! The change is consistent with the previous ones.This change is similar to the ones at lines 64 and 76. It ensures that the encapsulated location update logic is used even in the exception handling block.
src/Models/Scenario.cs (5)
5-5
: LGTM!The code change is approved.
18-18
: LGTM!The code change is approved. The private setter enhances encapsulation.
30-39
: LGTM!The code changes are approved. The private fields and constants are necessary for the Kalman filter implementation.
45-78
: LGTM!The code changes are approved. The
UpdateLocation
method correctly implements the Kalman filter algorithm for location tracking. The method is well-structured, readable, and well-commented.
80-96
: LGTM!The code changes are approved. The private methods
InitializeKalmanFilter
andUpdateStateTransitionMatrix
are necessary for the Kalman filter implementation. They correctly initialize the required matrices and update the state transition matrix based on the elapsed time. The code is readable and well-structured.Also applies to: 98-108
src/Locators/BfgsMultilateralizer.cs (3)
52-52
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the scenario's location.
80-80
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the scenario's location.
97-97
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the scenario's location.src/Locators/NelderMeadMultilateralizer.cs (4)
44-44
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the location of theScenario
object.
76-76
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the location of theScenario
object.
95-95
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the location of theScenario
object.
100-100
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the location of theScenario
object.src/Locators/IterativeCentroidMultilateralizer.cs (2)
52-52
: LGTM!The code change is approved. Using the
UpdateLocation
method to update theLocation
property of theScenario
class instead of direct assignment is a good practice to enhance encapsulation and maintainability.
68-68
: LGTM!The code change is approved. It is consistent with the previous change and enhances encapsulation and maintainability by using the
UpdateLocation
method to update theLocation
property of theScenario
class.src/Locators/MLEMultilateralizer.cs (4)
55-55
: LGTM!The code change is approved. It enhances encapsulation by utilizing the
UpdateLocation
method instead of directly assigning toscenario.Location
.
87-87
: LGTM!The code change is approved. It enhances encapsulation by utilizing the
UpdateLocation
method instead of directly assigning toscenario.Location
.
106-106
: LGTM!The code change is approved. It enhances encapsulation by utilizing the
UpdateLocation
method instead of directly assigning toscenario.Location
.
111-111
: LGTM!The code change is approved. It enhances encapsulation by utilizing the
UpdateLocation
method instead of directly assigning toscenario.Location
.src/Locators/GaussNewtonMultilateralizer.cs (3)
56-56
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the scenario's location, which is consistent with the overall refactoring approach.
70-70
: LGTM!The code change is approved. It enhances encapsulation by using the
UpdateLocation
method to update the scenario's location based on the Gauss-Newton optimization result, which is consistent with the overall refactoring approach.
84-84
: LGTM!The code changes are approved. They enhance encapsulation by using the
UpdateLocation
method to update the scenario's location within the error handling sections, which is consistent with the overall refactoring approach. The error handling logic remains the same, only the method of updating the location has changed.Also applies to: 89-89
Summary by CodeRabbit
New Features
Bug Fixes
Refactor