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

AP_ExternalAHRS_AdvancedNavigation #23267

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

AN-DanielCook
Copy link

This PR Adds External AHRS support to Advanced Navigation Devices using the Advanced Navigation Packet Protocol.

when EAHRS_TYPE = 3 (AdNav) the new module will load and run. A SITL Emulator of a ANPP Device has also been added for easier testing in the absence of hardware.

@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from 6988e35 to 09edfeb Compare March 21, 2023 06:14
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Light review only.

I'm concerned with the complexity of assembling messages to send - and all of the runtime allocations/deallocations in general. Others may not be as concerned, so don't feel you need to jump straight to doing something better.

I'm happy to discuss the other parsers/message assemblers I've pointed to. There might be something I've missed in your wire format which makes that solution unworkable.

libraries/SITL/SIM_AdNav.cpp Show resolved Hide resolved
libraries/SITL/SIM_AdNav.cpp Show resolved Hide resolved
libraries/SITL/SIM_AdNav.cpp Show resolved Hide resolved
@tridge
Copy link
Contributor

tridge commented Mar 22, 2023

@AN-DanielCook great to see this driver, thanks. As @peterbarker says, this needs some substantial re-work. That re-work will be made much easier because you've done a simulator, which is great!
If you need help with the re-work please reach out (though would need to be after the conference)

@tridge tridge removed the DevCallEU label Mar 22, 2023
@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch 4 times, most recently from 21046c7 to 36da5f1 Compare April 24, 2023 04:51
@AN-DanielCook
Copy link
Author

Sorry I've only recently had some time to come back and apply changes to this. If you are happy with the structural changes in the driver i will apply them to the simulator also.

@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch 2 times, most recently from 1d6651b to d75bf5e Compare April 24, 2023 07:01
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Wow, this is looking much nicer!

Again, sorry, partial review only - out of time for today. I'm definitely coming back to that parser :-)

Also note I've pushed up #23588 to make our defines in here conform a bit better to our current norms in terms of backend defines.

@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from d75bf5e to c5879b4 Compare May 2, 2023 06:04
@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from c5879b4 to 71f7bf0 Compare September 21, 2023 07:59
@tridge
Copy link
Contributor

tridge commented Sep 21, 2023

@AN-DanielCook @peterbarker I've rebased, fixing conflicts and fixed a few other bugs. sim_vehicle.py now works like this:
sim_vehicle.py -D -G --console --map -A --serial2=sim:AdNav
Some key changes:

  • lat/lon was ordered opposite in driver and simulator. I've changed the simulator, but it could be the driver that is wrong
  • the simulator was sending 50Hz GPS, which is much too high. If the real device sends 50Hz GPS we will need to downsample in the driver
  • time handling was broken

@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from 71f7bf0 to f613a2f Compare November 10, 2023 04:12
@tridge tridge added the Driver label Nov 29, 2023
@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from f613a2f to 373cd93 Compare December 2, 2023 01:13
@tridge
Copy link
Contributor

tridge commented Dec 2, 2023

@AN-DanielCook I pushed a few fixes to this PR today

@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch 2 times, most recently from d76f703 to b3c2271 Compare February 15, 2024 23:39
@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from 11996da to 18a812c Compare February 26, 2024 02:21
@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from e2e9003 to e4e29e5 Compare March 11, 2024 03:38
@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from 7c83b9e to 856cf12 Compare April 17, 2024 06:28
@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from ed53197 to 41423cd Compare May 20, 2024 04:55
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

These may be out of date

@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch 2 times, most recently from 2bb0a98 to fc9529c Compare May 29, 2024 04:02
@AN-DanielCook AN-DanielCook force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from fc9529c to d28306b Compare August 7, 2024 02:20
AN-DanielCook and others added 14 commits August 15, 2024 14:34
Adds ability for SITL Simulation of an AdNav device to be used by making a simulated serial port.
Changes create a SITL::AdNav class when requested on the command line
Added a SITL::AdNav class to emulate a ANPP Device communicating with the Advanced Navigation External AHRS module
EAHRS_TYPE: 3 (AdNav) has been added to the AP_External_AHRS.h/.cpp files.
New Class AP_ExternalAHRS_AdvancedNavigation added in new .cpp/.h files.
Supports any Advanced Navigation Packet Protocol (ANPP) device with different devices having slight behaviour changes.
When running EAHRS update it will now check for flight mode and gnss enable and request the appropriate changes in the device filter.
@tridge tridge force-pushed the AP_ExternalAHRS_AdvancedNavigation branch from d28306b to 720f8a4 Compare August 15, 2024 04:43
@tridge
Copy link
Contributor

tridge commented Aug 15, 2024

@AN-DanielCook I've rebased this PR and fixed the conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants