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_GPS: UBlox: configure and log TIM-TM2 #20335

Merged
merged 2 commits into from
Apr 6, 2022
Merged

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Mar 19, 2022

This adds logging of TIM TM2 message useful for precise sync of signals to GPS time, via ext int pin on GPS.

See: #15428, #10369, #7892

Tested on m8p, I have verified the logged message is the same as that reported in u-center.

image

I have not checked if this message is supported by all UBlox variants, or what happens if it is not supported, I presume the GPS will not respond to the request for message rate in that case. So this new message will not be added to _unconfigured_messages and will not cause a arming failure.

@tridge tridge added the WikiNeeded needs wiki update label Mar 22, 2022
tridge
tridge previously requested changes Mar 22, 2022
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

move to optional config, and only on >1M boards? also would be good to move RXM logging to be optional
better to use inline logging method so we don't consume a log slot for a rare msg

@IamPete1
Copy link
Member Author

IamPete1 commented Apr 2, 2022

image

I left this logging for 9 and a half hours. A ~0.3Hz trigger signal connected to the ExtInt pin of the GPS and the CAM feedback pin.

Firstly its clear that the CAM.GPSTime is useless. It is just the last received GPS time, there is no projection based on time since that message was received. Unsurprisingly when the GPS rate is 5hz this results in a 0.2 second error range. I'm not sure why we also see a 17 second offset, could be some difference between timebase's used?

The final graph shows the CAM log time vs TM2 GPS time (offset to start at 0). This shows good agreement, although a linear drift. Works out to 2.533 ms per minute.

@IamPete1 IamPete1 dismissed tridge’s stale review April 2, 2022 17:44

added #define and moved to inline logging.

tridge
tridge previously requested changes Apr 4, 2022
libraries/AP_GPS/AP_GPS_UBLOX.cpp Outdated Show resolved Hide resolved
libraries/AP_GPS/AP_GPS_UBLOX.cpp Show resolved Hide resolved
@tridge tridge merged commit 2589fa1 into ArduPilot:master Apr 6, 2022
@IamPete1 IamPete1 removed the DevCallEU label Apr 6, 2022
@Hwurzburg Hwurzburg removed the WikiNeeded needs wiki update label Jun 6, 2022
This pull request was closed.
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.

5 participants