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

support for multiple GPS #1532

Merged
merged 47 commits into from
Feb 12, 2016
Merged

support for multiple GPS #1532

merged 47 commits into from
Feb 12, 2016

Conversation

flixr
Copy link
Member

@flixr flixr commented Feb 7, 2016

This is a cleaned up and finished version of #1511

To e.g. use piksi as a secondary GPS:

<subsystem name="gps" type="ubx">
  <configure name="UBX_GPS_PORT" value="UART2"/>
</subsystem>
<subsystem name="gps" type="piksi">
  <configure name="PIKSI_GPS_PORT" value="UART3"/>
  <configure name="SECONDARY_GPS" value="piksi"/>
</subsystem>

Each GPS implementation has their own GpsState struct now.
We still have the global gps struct for now (which gets set to the currently best GPS), but the goal is to get rid of that global struct later as well...

masierra and others added 13 commits February 5, 2016 15:23
instead of a gps_multi_id subsystem, do it like for AHRS, e.g.
```
<subsystem name="gps" type="ubx"/>
<subsystem name="gps" type="piksi>
  <configure name="GPS_SECONDARY" value="piksi"/>
</subsystem>
```
so that by default you get the currently "best" GPS if you have multiple ones
and you don't get the GPS callback called twice if you only have one (once from the original and once from gps.c with GPS_MULTI_ID)
@flixr flixr added the Enhancement Improve upon exiting functionality label Feb 7, 2016
@flixr
Copy link
Member Author

flixr commented Feb 7, 2016

Ok, the LisaMX example using UART5 for piksi is kind of bad, since TX of that uart isn't exposed...

@podhrmic
Copy link
Member

podhrmic commented Feb 8, 2016

You can use the pin labelled as PC12 for UART5 TX and then change accordingly in the board file.

@masierra
Copy link
Contributor

masierra commented Feb 8, 2016

Yeah I had to the mod to get UART1 on my LisaMX

@gautierhattenberger
Copy link
Member

really nice feature, especially because it starts to get rid of the global gps struct

@flixr flixr mentioned this pull request Feb 8, 2016
@gautierhattenberger
Copy link
Member

@flixr do you want to add something ? or are we just waiting for more tests ?

@flixr
Copy link
Member Author

flixr commented Feb 10, 2016

I started refactoring the xsens INS, but that shouldn't be part of this PR.
So IMHO it's good to merge as soon as it's tested...

@gautierhattenberger
Copy link
Member

Tested and working with a UBX+PIKSI on Apogee. Manual and automatic switch seems to work as expected.
I just changed a protection flag name to be consistent, see multigps_ms branch in paparazzi.
@flixr I think you can update and merge.

flixr added a commit that referenced this pull request Feb 12, 2016
support for multiple GPS

To e.g. use piksi as a secondary GPS:
```
<subsystem name="gps" type="ubx">
  <configure name="UBX_GPS_PORT" value="UART2"/>
</subsystem>
<subsystem name="gps" type="piksi">
  <configure name="PIKSI_GPS_PORT" value="UART3"/>
  <configure name="SECONDARY_GPS" value="piksi"/>
</subsystem>
 ```
@flixr flixr merged commit 2d2349f into paparazzi:master Feb 12, 2016
@flixr flixr deleted the multigps_ms branch February 12, 2016 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve upon exiting functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants