GPS - MSP_SET_RAW_GPS

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
adamtpetrus
Posts: 2
Joined: Thu Dec 03, 2015 2:26 pm

GPS - MSP_SET_RAW_GPS

Post by adamtpetrus »

I am trying to use the serial port to set the GPS position using an homebrew (well kind off) GPS receiver using the MSP Protocol set.
When I send the command MSP_SET_RAW_GPS 201.
I get back '$M! 0 201 ' Is this because the GPS has to be enabled within the Config.h? In which case what options should I use?
What is the GPS_SIMULATOR mode? Can I use this?
AS I am not using a GPS serial module. I don't think I need to define GPS_SERIAL 2 GPS_BAUD, I2C_GPS, I2C_GPS_SONAR
Not sure on NMEA, UBLOX, MTK_BINARY16, MTK_BINARY19, INIT_MTK_GPS, VENUS8

Yours aye

Adam

User avatar
stronnag
Posts: 114
Joined: Thu Oct 24, 2013 9:32 pm
Location: New Forest, England
Contact:

Re: GPS - MSP_SET_RAW_GPS

Post by stronnag »

If you were to look at the source code, you might note that MSP_SET_RAW_GPS is compiled conditionally on

Code: Select all

#if GPS
...

If in doubt, the fine source is the place to look.

adamtpetrus
Posts: 2
Joined: Thu Dec 03, 2015 2:26 pm

Re: GPS - MSP_SET_RAW_GPS

Post by adamtpetrus »

Thanks for the reply. Yes I noticed that. However I dont think it is simple as:

Code: Select all

#define GPS 1


If one looks at the code at the end of def.h one finds:

Code: Select all

#if GPS && !defined(NMEA) && !defined(UBLOX) && !defined(MTK_BINARY16) && !defined(MTK_BINARY19) && !defined(INIT_MTK_GPS) && !defined(I2C_GPS)
  #error "when using GPS you must specify the protocol NMEA, UBLOX..."
#endif


I interpret this to mean that one of the following token strings must be defined NMEA UBLOX MTK_BINARY16 MTK_BINARY19 INIT_MTK_GPS I2C_GPS.

What I am trying to ask: is can one enable the features of GPS without a specific GPS module board and pass the GPS info using the MSP Protocol. If so what options need to be enabled?

Yours aye

Post Reply