ALM

  • *
  • 45
Naza clone GPS support
« on: December 19, 2015, 11:51:15 am »
Hi,
Since Naza GPS clone has advanced M8N gps and it's widely available and cheap, and also needs only 4 connection wires, can you please  implement it's support? All info is available from Pawelsky at RCG.
It would be the easiest way to connect gps+mag combo.

Alex.
« Last Edit: December 20, 2015, 12:04:20 am by ALM »

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #1 on: December 19, 2015, 03:57:52 pm »
I went over to rcgroups and took a look at Pawelsky's work.  He took the same two wire gps/mag combos we've all been looking at on eBay and Banggood, added an Arduino mini pro, built another board to go on the Arduino with the connectors, and wrote free but closed source firmware for it to output the proprietary NAZE gps protocol.

Even if we wanted to add support for the NAZE protocol to LP it would only run on the revo class fc boards, not the cc3d ones.  If we had the memory available on the cc3d to support another protocol the standard NMEA protocol would be enabled on it.

ALM

  • *
  • 45
Re: Naza clone GPS support
« Reply #2 on: December 19, 2015, 04:06:34 pm »
Great!
You are right about his adapter. But now it's possible to buy combos with everything at one board. No adapter needed.

http://www.banggood.com/Ublox-M8N-GPS-Compatible-with-DJI-NAZA-Lite-V1-V2-Flight-Controller-Phantom-1-2-Vision-p-991718.html

And of course it's for Revo in the first place.

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #3 on: December 19, 2015, 04:28:15 pm »
That is an interesting gps.  It seems to be the same one as http://www.ebay.com/itm/351480000985 .  I can't find a really good picture of the board in it.  The write-up says it has a 32 bit processor, I wonder if it's an STM32?   If it is it might be possible to replace the firmware with a version of the gps V9 firmware.  For me that would be a better solution for us since it would support the cc3d boards as well.

I've ordered one on eBay to look at but the delivery estimates are sometime in early January.

ALM

  • *
  • 45
Re: Naza clone GPS support
« Reply #4 on: December 19, 2015, 04:38:14 pm »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Naza clone GPS support
« Reply #5 on: December 19, 2015, 05:06:19 pm »
That is an interesting gps.  It seems to be the same one as http://www.ebay.com/itm/351480000985 .  I can't find a really good picture of the board in it.  The write-up says it has a 32 bit processor, I wonder if it's an STM32?   If it is it might be possible to replace the firmware with a version of the gps V9 firmware.  For me that would be a better solution for us since it would support the cc3d boards as well.



ATMEL Mega328P
CC3D do not have any Mag code on it.

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #6 on: December 19, 2015, 05:17:02 pm »
Much better pictures.  It's an Atmel chip, not a STM32.   I'd bet the Chinese took Pawelsky's adapter code and just put the Atmel chip on the gps.

It's still possible it could be reprogrammed easily to emulate a V9 gps.  If they did just use Pawelsky's code then it should have the Arduino bootloader available on the serial port.

The V9 gps firmware doesn't do much, mostly it just passes whatever the gps module says on to the fc.  When it reads the mag it just injects a packet with the mag reading into the stream.

I'll have to wait until the one I ordered gets here in January.

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #7 on: December 19, 2015, 05:24:33 pm »
@f5soh An even better picture, Thanks.

I know the cc3d doesn't have mag support but it does have and require ublox protocol. The problem with some (most? all?) of the cheap gps units is they default to NMEA and the cc3d firmware doesn't know how to tell them to switch to ublox protocol.  If it emulated a V9 then it would send ublox protocol always and could still be used with the cc3d boards, they'd just ignore the mag data packet.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Naza clone GPS support
« Reply #8 on: December 19, 2015, 05:39:36 pm »
CC3D do not understand the ubx stream from GPSv9, not the same messages.
CC3D has only a minimal ubx support to save ram.

See wiki page how to configure:
https://librepilot.atlassian.net/wiki/display/LPDOC/Configure+a+GPS+for+CC3D

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #9 on: December 19, 2015, 06:17:59 pm »
Thank-you for pointing the limitations out.

I'm aware of the effect of PIOS_GPS_MINIMAL on the gps parser.  In the course of looking at building an adapter to combine the gps and mag cables on the inexpensive gps units I've read every line of code in the source related to gps, the ublox manuals, and everything else I could find.

I was thinking of listening for a simple configuration command from the fc side that the user could connect to the gps with vcp and send a single command to tell the gps to do all the config in that wiki page. Maybe even something simple and easy to remember as typing "cc3d9600" or "cc3d19200" and pressing enter.  Normal ublox commands would be passed to the gps module but this would trigger the firmware to do the whole minimal config and save it.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Naza clone GPS support
« Reply #10 on: December 19, 2015, 06:52:01 pm »
From the same Naza clone i posted above:

Code: [Select]

--------------------------------------------
 APM 2.6 to Naza GPS adapter v20150611_0000
--------------------------------------------
 
GPS Initialization
------------------
Checking module version...
Trying at 57600 baudrate: UBX message Class = 0x0A, Id = 0x04) sent, waiting for response... timeout!
RETRY: UBX message Class = 0x0A, Id = 0x04) sent, waiting for response... timeout!
RETRY: UBX message Class = 0x0A, Id = 0x04) sent, waiting for response... timeout!
Trying at 9600 baudrate: UBX message Class = 0x0A, Id = 0x04) sent, waiting for response... MON-VER received!
2.01 (75331)
NEO-M8 series module found
 
Restoring defaults...
UBX message Class = 0x06, Id = 0x09) sent
UBX message Class = 0x06, Id = 0x09) sent
UBX message Class = 0x06, Id = 0x09) sent
 
Configuring...
UBX message Class = 0x06, Id = 0x00) sent
UBX message Class = 0x06, Id = 0x00) sent
UBX message Class = 0x06, Id = 0x00) sent
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x01) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x08) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x23) sent, waiting for response... ACK received!
UBX message Class = 0x06, Id = 0x16) sent, waiting for response... ACK received!
 
Compass initialization
----------------------
Orientation: XY rotation = 0 degrees, HMC5883L facing down
I2C message (Addr = 0x00, Data = 0x14) sent, waiting for ACK... ACK received!
I2C message (Addr = 0x01, Data = 0x40) sent, waiting for ACK... ACK received!
I2C message (Addr = 0x02, Data = 0x00) sent, waiting for ACK... ACK received!
 
Starting data transmission...
U\AA:\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00JU\AA \E7\FD\ED\

http://www.rcgroups.com/forums/showpost.php?p=30011989&postcount=1

Re: Naza clone GPS support
« Reply #11 on: December 19, 2015, 09:06:38 pm »
Very interesting.  Good price.  I will order one and see what is required to get it working with LP firmware.

(If someone doesn't beat me to it.)  :)

Looks to be entirely serial like the V9.

Links for my reference at least...
https://oshpark.com/shared_projects/Ehm2RZPY
http://www.rcgroups.com/forums/showthread.php?p=30011989&postcount=1
« Last Edit: December 19, 2015, 09:34:47 pm by TheOtherCliff »

Re: Naza clone GPS support
« Reply #12 on: December 19, 2015, 09:16:22 pm »
OP V9 GPS can be made to work with CC3D, but mag data is ignored.

Just use "GPS Only" port and configure it like you would any GPS for CC3D.  Then you can use either port (GPS Only or GPS+MCU) for flying.  Best to use GPS Only.
« Last Edit: December 19, 2015, 09:35:23 pm by TheOtherCliff »

Re: Naza clone GPS support
« Reply #13 on: December 19, 2015, 09:47:39 pm »
Here is one for $26 shipped.  Probably without a stand/pole.  20 calendar days shipping.  I just bought it.  :)
http://www.ebay.com/itm/Ublox-M8N-GPS-Compatible-with-DJI-NAZA-Lite-V1-V2-Flight-Controller-ge-/252119739450
« Last Edit: December 19, 2015, 09:51:08 pm by TheOtherCliff »

hwh

  • *
  • 1018
Re: Naza clone GPS support
« Reply #14 on: December 19, 2015, 10:42:10 pm »
I beat you to ordering, I ordered about 8 messages back.  :)  I've just spent an hour or so reading all the messages in several rcgroups threads about this subject.  Including the high res pics of the units.

There are two varieties of the Naza clone gps, one based on the Atmel chip and one based on a STM32F030F4.  16k flash, 4k ram.

The ones we both ordered (in different auctions) say 32 bit in the description and the Atmel 328p is an 8 bit chip so they are probably the ones that have the STM32 in them.