Hello all, I posted once a long time ago about my HAB project for my degree dissertation and now I'm a little further down the road now in terms of understanding.
After looking through the tutorials and guides available on the UKHAS.org site I have successfully configured my NTX2 434.075 and have had it sending test messages to dl-fldigi (See image below).
I have also managed to test my uBlox max6 breakout board and make it only send out $GPGGA data onto the Arduino IDE serial monitor (See image below).
To broaden my understanding of Arduino code (since I have little to no background knowledge) I have completed most of the learning tasks in Beginning Arduino by Micheal McRoberts as well as looking through the past project pages you have all provided on the wiki.
My problem lies in developing the code that can take my uBlox data and echo it through the NTX2 via the Arduino so that it is ready for a basic prototype style launch, I understand the RTTY function that many use and also most of the setup elements. The section I don't understand is the actual GPS section and what sort of code I need to get the two linked together.
This is my first draft of my "final" code that will be used. I have annotated it quite heavily partly for my understanding and partly for my tutor's, I hope that you can point me in the right direction.
In addition, the uBlox 6 guide suggests it is unwise to use the software serial for final flights, Why is this and what are the alternatives?
Thank you for any help you can offer.
Hi JT,
Thank you for that link, your code is very readable which is great! As far as I can tell, based on yours and others I have stumbled across, I need the sendUBX and getUBX elements. Which are used for constructing the packet? And then I need to develop my loop function which sends the packet through a superbuffer to the RTTY?
I'll have a more detailed read through of what you have shown me and see if I can figure it all out. Thank you!
I think I'm starting to get it now which feels pretty damn good after a week of stressing over it.
One thing I have noticed when compiling was that I get an error with tinyGPS, now I notice that the ublox 6 guide suggests that users should have the TinyGPS_UBX version so that it can handle the $$PUBX aspects but everyone I have seen is using the standard TinyGPS as far as I can tell. Which is most suitable?
The error in question is: FINALCODEV5.cpp:94:23: error: ‘class TinyGPS’ has no member named ‘get_datetime’
I have both versions of TinyGPS but I've only put the UBX version in my Arduino library.--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Removed: get_datetime()
No I wasn't, I was using the https://github.com/x-f/TinyGPS_UBX version that is at the bottom of the ublox6 guide on ukhas.org.
I'll swap out the library in the morning, try again and post results. Thank for the link.
Ok Thanks JT, I've made the changes now.
Change log:As of now, what I would class as my "final code" that just handles co-ordinate down-linking compiles fine. 0 errors that it can detect.
- Adjusted the buffer size in SoftwareSerial.h to 128. as recommended
- Swapped out to the other TinyGPS.h (not _UBX anymore).
- Changed some of the names due to compiling issues or so that I can read them more easily.
- Added the success, fail element from the tutorial to GPS to see whats going on there.
However after hooking it up I noticed that my GPS was changing settings fine and receiving the packets in order (All seems great on this end)
RTTY on the other hand seems totally busted. While I am getting some activity from it, its very noisy and there is no data its able to decode at all.
I've included my hardware set up in case I am being a total noob somehow in that aspect.
And my 'final' draft of code is available here. (Haven't applied credit where its due just yet, still trying to get everything working before I start commenting again!)
Thank you for any help you can give.
--
You received this message because you are subscribed to the Google Groups "UKHAS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhas+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<IDE serial monitor.png>
<20130310_165712.jpg>
Hey Chris,
My sprintf functions are very similar to a lot of people who have let me have a read through of their code, JT above being a prime example. My first sprintf is the main packet, followed by the checksum.
Having had a further route around in my hardware I found that when I disconnected my power (5v was being shared) that for a few seconds my RTTY was coming through fine.
The guys on IRC (I'm Sierra004 by the way) suggested that some serious decoupling was in order between my 5v and GND lines.
So I'm going to try and eliminate the noise issue on that end before I change my code.
Thank you, and I'm glad at least you got your code working!
I did have a talk on the IRC after I read this, and was told explicitly not to use software serial at all which made my heart sink a little since that would mean scrapping everything I'd been debugging and basically starting again.
I've made this Image of my hardware layout so its a little easier to see although I'm unsure how much that helps.
I am very much lost in the woods at the minute. My code as it stands running software serial I can say with 99% certainty works fine, as soon as I disconnect the GPS from the 5v supply RTTY comes through my Yaesu nicely. You seemed to suggest that there was no issue with using Software serial as it had worked for you and I'd like to stick to it if it's not beyond possibility. However I see a hardware UART setup using the UM232R which doesn't appear to require me to change anything as I'm confused by the act of using the Arduino's own UART. Not sure on the practicality or success of this method though.
Newbies gonna noob
Hi Costyn,
I've managed to get all of the test code examples on the wiki working its just trying to combine them together at the minute that's causing the headache. I've had some great help from JT, DaveAkerman and loads of the other guys on IRC (Who suggested I replace my software serial prompts with Serial. prompts so SofwareSerial.println -> Serial.println. And connect my GPS to pins 0 and 1, But I can't seem to get that to do anything at all, it just plays a tone through the radio the whole time.
I've uploaded a video so everyone can see and hear just what its doing.
This is my code for trying to get anything working with Softwareserial
Here is my Hardware serial attempt but that doesn't work either unless I'm just connecting it up wrong.
Thanks
My code as it stands running software serial I can say with 99% certainty works fine, as soon as I disconnect the GPS from the 5v supply RTTY comes through my Yaesu nicely. You seemed to suggest that there was no issue with using Software serial as it had worked for you and I'd like to stick to it if it's not beyond possibility
Hi everyone thank you for the replies!
With thanks to detailed help from Mark of the STRATODEAN project I eventually got everything working (He basically read through my code and offered up a load of advice)
Essentially I was Serial.print-ing the shutdown commands for the gps packets instead of Softwareserial.print-ing and therefore my GPS was trying to send every type of data at once, jamming my transmitter.
I tested it out and it works perfectly now after making those changes.
So thanks to Mark, Hix, JT, Dave A and everyone else on here and IRC for helping me out!
I'll update my progress soon when I have some decent updates!
I've said before that the existing wiki code examples (despite strenuous bold/italic disclaimers) can do more harm than good in that people think it will let them copy and paste and stay a level of abstraction above nitty-gritty software architecture.
Personally I can always understand what PICAXE BASIC says whereas I
have never got anywhere with C. Did I put all the { }s in the right
place? Am I missing a ; ??
Wearily, although I personally may be too far gone, I think people
should still try to learn C because it basically underpins Unix and
Linux, and therefore Macs as well, and all of these have the GCC
compiler built in.
Even if you want to program in something else
(FORTRAN say) it is basically made up of a bunch of C libraries.
So
why not program in C and cut out the potential unreliability of the
middlemen? It compiles crisply, which is why it came to dominate in
the first place.
I personally like breaking things down into pieces by having very
small C applications, passing things back to the BASH shell of Linux,
and then using BASH basically as a simple programming language in
turn. This is no help of course in ArduinoLand but would work for
people flying Raspberry PIs or (in my case) a EuroTech Titan PC104
board.
PICAXE BASIC is compiled too by the way
- the only difference between
a PICAXE and any other PIC microcontroller is a bit of proprietary
code that starts up the chip with a serial port on some of the pins to
talk to the PICAXE application for PC, MAC, Linux etc. - so you don't
need a PIC programmer gadget.
Please don't all have a go at me,