GPS sensor
Moderator: rainer
Re: GPS sensor
There is some discussion already here:
https://www.rcgroups.com/forums/showthr ... curate-GPS
https://www.rcgroups.com/forums/showthr ... curate-GPS
-
- Posts: 241
- Joined: Tue Jan 15, 2013 9:41 pm
- Country: -
Re: GPS sensor
The thing that attracted me was the fact that the RTK processing is done right on the GPS. Others have done it with raspberry pi talking to a receiver that can output carrier phase information and you can do it that way for less money but it gets a bit bulky for a model aircraft.
Re: GPS sensor
My onboard GPS needed often a long period of time until it had a GPS fix, yesterday it did not work for 35 min. After a hint from another user i tried to shield the GPS from RX. Indeed it fixed within 20s. The STM32F103 cpu frequency 72MHz shall be the culprit?
My final solution is a pcb connected to RX GND between RX and GPS. The GPS fix is now always reached within 30s.
My final solution is a pcb connected to RX GND between RX and GPS. The GPS fix is now always reached within 30s.
Re: GPS sensor
oXs GPS under MPX M-Link with FrSky converter on Taranis.
Tested today. Working fine.
oXs #1 with MS5611, ACS712 and voltage divider for Lipo voltage
oXs #2 for ublox Neo7M
See some pics here -> http://www.rc-network.de/forum/showthre ... ost4309441
COURSE and BEARING instead of NMEA coordinates is a thing, you have to get used to
br KH
Tested today. Working fine.
oXs #1 with MS5611, ACS712 and voltage divider for Lipo voltage
oXs #2 for ublox Neo7M
See some pics here -> http://www.rc-network.de/forum/showthre ... ost4309441
COURSE and BEARING instead of NMEA coordinates is a thing, you have to get used to
br KH
GPS as the only sensor
I'm waiting for the pressure sensor and trying to make GPS work with oXs as the only sensor.
I'm using version 8.02 and pretty much default config except a few changes:
1. In oXs_config.h Uncommented this line:
Set serial pin to 4 (it was 2 in original file)
2. in oXs_gps.cpp uncommented this line:
and
Protocol in config is set like this:
When I connect pin D4 to X8R smart port and try discovering new sensors - I'm only getting "Cels" besides standard RSSI and Rx Voltage.
W/o Pin D4 connected - I'm not getting "Cels" on sensor discovery.
So it looks like something is getting into the smart port, but not GPS data.
Here is what debug output looks like:
Is having baro sensor essential for making GPS work? Or am I doing something wrong?
As on pictures below - I'm powering the whole setup from Micro USB side of the Nano ( in order to read debug output )
Getting similar results powering it from X8R side with red wire connected to 'vin' with USB disconnected.
Thank you!
I'm using version 8.02 and pretty much default config except a few changes:
1. In oXs_config.h Uncommented this line:
Code: Select all
#define GPS_INSTALLED
Code: Select all
#define PIN_SERIALTX 4
Code: Select all
#define DEBUGPARSEGPS
Code: Select all
#define DEBUGSIMULATEGPS
Code: Select all
#define PROTOCOL FRSKY_SPORT
W/o Pin D4 connected - I'm not getting "Cels" on sensor discovery.
So it looks like something is getting into the smart port, but not GPS data.
Here is what debug output looks like:
Code: Select all
openXsensor starting..
milli=0
freeRam=681
Enter setup voltage
Reference voltage:1100
Voltage:1 , pin=2 , offset=0 , mVoltPerStep=20.77
Voltage:2 , pin=3 , offset=0 , mVoltPerStep=6.46
Voltage:3 , pin=1 , offset=0 , mVoltPerStep=8.24
Voltage:4 , pin=8 , offset=0 , mVoltPerStep=3.21
Voltage:5 , pin=8 , offset=0 , mVoltPerStep=11.83
Voltage:6 , pin=8 , offset=0 , mVoltPerStep=220.00
End of GPS setup
FRSky Output Module: TX Pin=4
Sport protocol= 1
ADS1115 sensor I2C Addr=48
Set up Ads1115 done. I2C Error code= 32
milli=2109
End of general set up
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
At 2610 Cnt = 216 mVolt 0 = 578
At 2611 Cnt = 216 mVolt 1 = 750
At 2614 Cnt = 216 mVolt 2 = 255
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
At 3120 Cnt = 216 mVolt 0 = 543
At 3121 Cnt = 216 mVolt 1 = 801
At 3122 Cnt = 216 mVolt 2 = 228
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
Gps spd 3d: 1788 2d: 1788 course: 0
Gps fix: 0 long: -811512400 lat: 488625580 alt: 300000
As on pictures below - I'm powering the whole setup from Micro USB side of the Nano ( in order to read debug output )
Getting similar results powering it from X8R side with red wire connected to 'vin' with USB disconnected.
Thank you!
Re: GPS sensor
oXs can send GPS data even if there is no baro sensor.
In your config, you should keep this line as comment (as you are not using an ADS1115.
#define ADS_MEASURE A0_TO_GND , A1_TO_GND , A2_TO_GND , ADS_OFF
I suggest that you also try keeping the debug line as comment (#define DEBUG).
Please note that oXs send GPS data only when the GPS has a fix. It can take several minutes (mainly if GPS is not outdoor.
On some GPS board, there is a led that will blink when GPS got a fix.
Did you wait long enough to get it?
In your config, you should keep this line as comment (as you are not using an ADS1115.
#define ADS_MEASURE A0_TO_GND , A1_TO_GND , A2_TO_GND , ADS_OFF
I suggest that you also try keeping the debug line as comment (#define DEBUG).
Please note that oXs send GPS data only when the GPS has a fix. It can take several minutes (mainly if GPS is not outdoor.
On some GPS board, there is a led that will blink when GPS got a fix.
Did you wait long enough to get it?
Re: GPS sensor
Thank you for the info! I'll try with ADS_MEASURE line commented
regarding GPS fix:
My GPS has LED indicator, so I can see when it gets 3D Fix. Even with 3D fix the GPS sensor was still not discoverable, although I was getting coordinates in debug output.
However, I did the most resent test in GPS simulation mode - without any GPS receiver connected.
I've uncommented this line to enable that:
According to debug output, It looks like it simulates a good fix.
Main question for now: For troubleshooting - Is that a good idea to use GPS simulation mode, or should I better try with Physical GPS sensor?
regarding GPS fix:
My GPS has LED indicator, so I can see when it gets 3D Fix. Even with 3D fix the GPS sensor was still not discoverable, although I was getting coordinates in debug output.
However, I did the most resent test in GPS simulation mode - without any GPS receiver connected.
I've uncommented this line to enable that:
Code: Select all
#define DEBUGSIMULATEGPS
Main question for now: For troubleshooting - Is that a good idea to use GPS simulation mode, or should I better try with Physical GPS sensor?
Re: GPS sensor
I had a short look at the code and I think that you have to try with a physical GPS sensor.
I expect that the buffer use in simulation does not contain the data that will simulate a fix.
I expect that the buffer use in simulation does not contain the data that will simulate a fix.
Re: GPS sensor
Thanks! I'll try and update as soon as possible. I'm away from home right now, so it might take a couple days.
I have one question regarding physical GPS:
I can configure it and save it's settings. I have disabled NMEA messages and only left Ublox. And also set baud rate to 38400. I was getting coordinates in debug output, but maybe something was still missing in gps packets.
I'll try with 9600 so that oXs will configure gps module per it's needs. I think not using 9600 at startup could cause my problem. Anyways - will report here when I get back to my device.
I have one question regarding physical GPS:
I can configure it and save it's settings. I have disabled NMEA messages and only left Ublox. And also set baud rate to 38400. I was getting coordinates in debug output, but maybe something was still missing in gps packets.
I'll try with 9600 so that oXs will configure gps module per it's needs. I think not using 9600 at startup could cause my problem. Anyways - will report here when I get back to my device.
Re: GPS sensor
At start up, oXs send a set of commands to GPS in order to force some wel defined configuration.
It assumes that after reset the GPS uses the default setup (in order to accept the commands beng sent by oXs).
I had to do it in this way because my first GPS board had a bad eeprom.
I would recomend to keep it this way.
I do not see an advantage of changing the default setup of GPS (except that it could save a few bytes in oXs code).
It assumes that after reset the GPS uses the default setup (in order to accept the commands beng sent by oXs).
I had to do it in this way because my first GPS board had a bad eeprom.
I would recomend to keep it this way.
I do not see an advantage of changing the default setup of GPS (except that it could save a few bytes in oXs code).
Re: GPS sensor
Thank You!
It now works with GPS receiver set in u-center to 9600/ublox+nmea.
Also disabled debug output and commented this line per your suggestion:
Can't wait for my baro sensor to arrive.
It now works with GPS receiver set in u-center to 9600/ublox+nmea.
Also disabled debug output and commented this line per your suggestion:
Code: Select all
#define ADS_MEASURE A0_TO_GND , A1_TO_GND , A2_TO_GND , ADS_OFF
- Attachments
-
- oXs_config.h
- (15.62 KiB) Downloaded 366 times
Re: GPS sensor
Hello,
Is it possible to write the config GNSS with OXS into the GPS module?
Problem:
I have an M8N that loses its config after a few hours.
Then missing with always about 10-12 satellites
Is it possible to write the config GNSS with OXS into the GPS module?
Problem:
I have an M8N that loses its config after a few hours.
Then missing with always about 10-12 satellites
Re: GPS sensor
oXs supposes that GPS module uses the default config and, at power on, oXs load always the config it needs.
It is possible to add some parameters to the config parameters that oXs load in the gps.
The current parameters are in the file oXs_gps.cpp at folowing lines
const static uint8_t initGps1[] PROGMEM = {
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x13,0xBE, // activate NAV-POSLLH message
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x06,0x00,0x01,0x00,0x00,0x00,0x00,0x17,0xDA, // NAV-SOL
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x12,0x00,0x01,0x00,0x00,0x00,0x00,0x23,0x2E, // NAV-VELNED
// 0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39, // NAV-RATE for 1 hz
0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A, // NAV-RATE for 5 hz
// 0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12, // NAV-RATE for 10 hz
0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0x96, // CFG-PRT : Set port to output only UBX (so deactivate NMEA msg) and set baud = 38400.
0x00,0x00,0x07,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x91,0x84 // rest of CFG_PRT command
I presume that the most difficult is to identify the set of values to be added.
If I remember wel, the current set of values have been found using the configurator provided by ublox and analysing the set of bytes being send on the Tx/Rx line while sending some configuration message.
It is possible to add some parameters to the config parameters that oXs load in the gps.
The current parameters are in the file oXs_gps.cpp at folowing lines
const static uint8_t initGps1[] PROGMEM = {
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x13,0xBE, // activate NAV-POSLLH message
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x06,0x00,0x01,0x00,0x00,0x00,0x00,0x17,0xDA, // NAV-SOL
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x12,0x00,0x01,0x00,0x00,0x00,0x00,0x23,0x2E, // NAV-VELNED
// 0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39, // NAV-RATE for 1 hz
0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A, // NAV-RATE for 5 hz
// 0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12, // NAV-RATE for 10 hz
0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0x96, // CFG-PRT : Set port to output only UBX (so deactivate NMEA msg) and set baud = 38400.
0x00,0x00,0x07,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x91,0x84 // rest of CFG_PRT command
I presume that the most difficult is to identify the set of values to be added.
If I remember wel, the current set of values have been found using the configurator provided by ublox and analysing the set of bytes being send on the Tx/Rx line while sending some configuration message.
Re: GPS sensor
The Gps works so far with OXS.
It forgets however after a couple hours that I have Galileo and IMES switched on.
What code do I have to add in the GPS.CPP?
This is the current code from me.
It forgets however after a couple hours that I have Galileo and IMES switched on.
What code do I have to add in the GPS.CPP?
This is the current code from me.
Code: Select all
// send config commands to GPS at 9600 bds (default baud rate)
void OXS_GPS::setupGps( ) {
const static uint8_t initGps1[] PROGMEM = {
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x13,0xBE, // activate NAV-POSLLH message
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x06,0x00,0x01,0x00,0x00,0x00,0x00,0x17,0xDA, // NAV-SOL
0xB5,0x62,0x06,0x01,0x08,0x00,0x01,0x12,0x00,0x01,0x00,0x00,0x00,0x00,0x23,0x2E, // NAV-VELNED
// 0xB5,0x62,0x06,0x08,0x06,0x00,0xE8,0x03,0x01,0x00,0x01,0x00,0x01,0x39, // NAV-RATE for 1 hz
0xB5,0x62,0x06,0x08,0x06,0x00,0xC8,0x00,0x01,0x00,0x01,0x00,0xDE,0x6A, // NAV-RATE for 5 hz
// 0xB5,0x62,0x06,0x08,0x06,0x00,0x64,0x00,0x01,0x00,0x01,0x00,0x7A,0x12, // NAV-RATE for 10 hz
0xB5,0x62,0x06,0x00,0x14,0x00,0x01,0x00,0x00,0x00,0xD0,0x08,0x00,0x00,0x00,0x96, // CFG-PRT : Set port to output only UBX (so deactivate NMEA msg) and set baud = 38400.
0x00,0x00,0x07,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x91,0x84 // rest of CFG_PRT command
} ;
uint8_t initGpsIdx = 0 ;
SOFT_TX_PORT |= (1<<SOFT_TX_BIT); // put 1 in output port
SOFT_TX_DDR |= (1<<SOFT_TX_BIT); // set port as output
delay(1000) ; // wait to be sure that GPS has started
while (initGpsIdx < sizeof( initGps1)) {
// Serial.println( pgm_read_byte_near(initGps1 + initGpsIdx ), HEX) ;
gps_putchar( pgm_read_byte_near(initGps1 + initGpsIdx++ ), MICROSECONDS_PER_BIT_9600) ; // Send initialisation command
delay(10) ;
}
delay(100) ;
#ifdef DEBUG
Serial.println(F("End of GPS setup")) ;
#endif
Re: GPS sensor
Hi,
I have built an openXsensor with N32+GPS sensor, It works perfectly.
Recently I build another for my friend use NZ GPS but it is not work as it should.
The blue led on GPS module flashes but no GPS data received.
I tried with OP GPS module but it is not work too.
The GPS i bought from Taobao (http://sea.taobao.com/item/en/521911....101.86.iJxCHL)
I am not sure the openXsensor only work with N32+GPS or work with all of GPS module?
Thank you for your help.
I have built an openXsensor with N32+GPS sensor, It works perfectly.
Recently I build another for my friend use NZ GPS but it is not work as it should.
The blue led on GPS module flashes but no GPS data received.
I tried with OP GPS module but it is not work too.
The GPS i bought from Taobao (http://sea.taobao.com/item/en/521911....101.86.iJxCHL)
I am not sure the openXsensor only work with N32+GPS or work with all of GPS module?
Thank you for your help.
Re: GPS sensor
I can't open the link.
oXs should work with gps module if the chip is a ublox neo6M (or neo7M, neo8M).
Still oXs expect that the chip is configure to start up with a standard configuration (e.g. UART 9600 bd,..).
At power up oXs sent some code to the gps chip in order to force the gps to use a specific oXs configuration.
It could be that your module has a preloaded configuration which avoid oXs start up config to be loaded at startup.
On the web site of ublox, you can find a program that allows to connect the gps to a PC via a USB/serial (FTDI).
Using this program, I expect it is possible to look and perhaps to change the start up config of the gps module.
You can look at the datasheet of the ublox neo7M chip to see what is the standard default config.
oXs should work with gps module if the chip is a ublox neo6M (or neo7M, neo8M).
Still oXs expect that the chip is configure to start up with a standard configuration (e.g. UART 9600 bd,..).
At power up oXs sent some code to the gps chip in order to force the gps to use a specific oXs configuration.
It could be that your module has a preloaded configuration which avoid oXs start up config to be loaded at startup.
On the web site of ublox, you can find a program that allows to connect the gps to a PC via a USB/serial (FTDI).
Using this program, I expect it is possible to look and perhaps to change the start up config of the gps module.
You can look at the datasheet of the ublox neo7M chip to see what is the standard default config.
Re: GPS sensor
Thank you, mstrens.
Attached picture is 3 type of GPS module that I have tested (only N32+ GPS worked)
The GPS is worked with U-center via FTDI adptor.
Attached picture is 3 type of GPS module that I have tested (only N32+ GPS worked)
The GPS is worked with U-center via FTDI adptor.
Re: GPS sensor
Can you also change the settings with u-center? I have a ublox7 too which does not work with oXs. It seems that this gps only send the coordinates but changing the settings (e.g. baudrate) is not possible. That's why it does not work with oXs.
Re: GPS sensor
I can not change the setting with U-center, so i think this is a problem.
Re: GPS sensor
Here is a picture of my two GPS.
The left one works well and the right one has the declared problem. Both are the NZ-GPS Version.
The left one works well and the right one has the declared problem. Both are the NZ-GPS Version.
Re: GPS sensor
It looks like the rigth one has a battery that keep the config.
Perhaps you can try to remove the battery. Perhpas that without battery it will go back to default confix of a ublox neo7m
Perhaps you can try to remove the battery. Perhpas that without battery it will go back to default confix of a ublox neo7m
Re: GPS sensor
Now I tried it without the battery but it does not change anything. The gps send the coordinates at 9600baud and send commands to the gps it not possible. These ublox7 are likely to be sold with a broken RX line.
Re: GPS sensor
If Rx line is broken on those modules, then oXs will not work except if it is possible to save a specific config into the GPS module (using U-center) and if this config can be reused by the GPS at statup.
If you can't change the setup of the gps with U-center, it will not work.
If you can't change the setup of the gps with U-center, it will not work.
Re: GPS sensor
I think it is a module in which nothing can be written in the Eprom.
there are several of them I also have a M8N where the config is fixed.
But also some where you can write normally in the config, even firmware updates.
there are several of them I also have a M8N where the config is fixed.
But also some where you can write normally in the config, even firmware updates.
Re: GPS sensor
Hi McFly2000,
I have tried to open shield cover on GPS module and discovered that one resistor on Rx line was not connected.
After added this resistor (33ohm, same with the resistor on Tx line), the GPS module work now.
Pls see attached picture, the resistor that I added in red rectangle.
Re: GPS sensor
Good catch!
Re: GPS sensor
Thanks great job
I have also opened the cover and there is no resistor on the rx-line. Unfortunately I do not have this tiny resistor, but I will get one.
I have also opened the cover and there is no resistor on the rx-line. Unfortunately I do not have this tiny resistor, but I will get one.
Re: GPS sensor
A few photos of my GPS & vario at the end of an article (web is in Slovak). I use Beitian BN-880 from BG, and works fine. Great thanks.