waterlinked / blueos-ugps-extension

BlueOS Extension for Water Linked Underwater GPS
1 stars 2 forks source link

GPS_INPUT.satellites_visible is < 6 (minimum for ArduSub) with static (or external) GPS #3

Closed clydemcqueen closed 8 months ago

clydemcqueen commented 9 months ago

When a static GPS position is used, or an external GPS position is provided, and the G2 box does not have a clear view of sky, the published GPS_INPUT messages may have satellites_visible < 6.

ArduSub requires a minimum of 6 satellites to decide that the GPS is good and can be used to set the EKF origin.

We are using an external GNSS satellite compass to provide an external vessel position and heading, but we frequently run into the situation where the G2 box doesn't have a clear view of the sky, and so the resulting GPS_INPUT messages fail to convince ArduSub to set the origin.

The --ignore_gps setting current sets fix_type = 3; perhaps it could be extended to also set satellites_visible = 6?

Thanks.

wlseb commented 9 months ago

Your request makes sense to me. What is the reason for 10 instead of 6 in the pull request?

When I read this, I am wondering why the UGPS topside would not forward the number of satellites (>6) from the external source in the first place.

clydemcqueen commented 9 months ago

What is the reason for 10 instead of 6 in the pull request?

I thought that 10 would reduce gpsNoiseScaler in the EKF, but I was wrong... anything >= 6 sets gpsNoiseScaler to 1.0. So, 6 is fine. I'll fix that.