Show Posts
Pages: [1] 2 3 ... 13
1  General Category / General Discussion / Re: NavSpark: 32-bit Arduino-style device with built-in GPS for $19 on: July 30, 2014, 07:37:47 am
Thanks... I re-posted this on NavSpark forum...

2  General Category / General Discussion / Re: NavSpark: 32-bit Arduino-style device with built-in GPS for $19 on: July 30, 2014, 06:09:27 am
I'm interested to get this NavSpark for the following usage.. pls advise if this board is suitable ?

Used as an APRS Tracker ( http://en.wikipedia.org/wiki/Automatic_Packet_Reporting_System )

- Connect to an APRS modem ( also running a atmega328 with BeRTOS to encode/decode APRS packet )
- Connect to LCD/TFT for displaying  GPS loc / decoded APRS packets
- Do some algorithm based on the GPS speed/headings/distance travel

This will saved me from buying a GPS module and used up 2 more pins for running Software Serial...

The details of my projects are in the URL below
http://9w2svt.blogspot.com/2014/07/building-open-source-arduino-aprs.html


Is the external GPS antenna good as it looks rather fragile  ??

Thanks

Stanley
3  Community / Exhibition / Gallery / Building an Arduino APRS Tracker (ham radio) on: July 21, 2014, 01:08:52 pm
Here are my blog entries on building an APRS Tracker using Arduino ( on-going project )

http://9w2svt.blogspot.com/2014/07/building-open-source-arduino-aprs.html


I welcome anyone to test out my codes and contribute to the codes by forking my repo

Thanks

Stanley
4  Using Arduino / Displays / Re: Serial SPI - 2.2" TFT LCD - ILI9341 on: July 20, 2014, 02:09:41 am
I captured another video (UTFT fonts demo), as well as I published the source code files of modified examples and libraries.
Adafruit
MultiLCD
UTFT
schematic


Thanks, this info is great... I got my TFT working...!!!



5  Using Arduino / Networking, Protocols, and Devices / Problem with 3 Serial Ports on UNO on: July 14, 2014, 08:06:47 pm
Hi all,

I wrote a wrapper for this APRS Modem/BeRTOS firmware ( http://unsigned.io/microaprs/ ) ...
The Arduino wrapper are located at https://github.com/stanleyseow/ArduinoTracker-MicroAPRS

I wanted to write something similar to Radio Shield 2  https://www.argentdata.com/catalog/product_info.php?products_id=136 but completely open source ...

I needed 3 Serial port for the following functions :-

Pin 0,1 ( 9600) - connect to the APRS Modem to send commands and received decoded APRS packets from the radio
Pin 2,3 (9600) - connect to GPS module for GPS coordinates ( SoftwareSerial )
Pin 8,9 (57600) - connect to a FTDI Serial USB module for Debugging and send in commands purposes...

- pin 8,9 are using AltSoftSerial http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html

Things that are not working (yet) are :-

- I could not copied the entire decoded APRS packet into a String or char array

I want to display the CALLSIGN ( the string after the SRC: )  and DATA: on the 20x4 LCD but I could not grab the entire row or only partial of the sample string below..

I suspect there are too many calls to other serial port ( e.g. GPS on Software Serial or Debug ) and therefore blocking this..

How shall I solve this Serial port issue with 3 Serial ports running at the same time...

Thanks

Stanley



The output of decoded messages from the APRS modem are as below :-

Code:
SRC: [9W2BBB-12] PATH: [9M2KKK-3] [WIDE1-1] [WIDE2-2] DATA: !/Lq@Yh1usP?DG/A=000273 13.6V 32CAPRS
SRC: [9M2CCC-3] PATH: [WIDE2-1] DATA: !/Lqluh1'q# st 11.8V  33C MAAAS VHF 144.3900MHz
SRC: [9W2AAA-0] PATH: [9M4RRR-3] [9M2TTT-1] [9M2KKK-3] [WIDE1-0] DATA: @050418z0300.35N/000004.61Ez
SRC: [9M2KKK-3] PATH: [WIDE2-1] DATA: !/Lqluh1'q# st 11.8V  33C MAAAS VHF 144.3900MHz

The decodeAPRS functions, the entire source codes are at the github URL stated above ...
Code:
void decodeAPRS() {
      char c;
      char endChar = '\n';
      char endChar2 = '\r';
      boolean storeString = true;
      char callsign[12];
      char path[60];
      char data[100];

      debug.println();
      debug.print("Entering decodeAPRS (");
      debug.print(millis());
      debug.println(")");
      while ( Serial.available() > 0 ) {
         c = Serial.read();
         // For debugging only
         debug.print(c);
         
         // If MAXBUFFER is reach, NULL terminate the string
         if ( bufferIndex > maxBuffer ) {
               charBuffer[maxBuffer] = 0;
               storeString = false;         
         }
         
         // Check for endChar and NULL terminate the string
         if ( c == endChar || c == endChar2 ) {
             charBuffer[bufferIndex] = 0;
             storeString = false;   
         }
         
         if ( storeString ) {
              charBuffer[bufferIndex++] = c;
         }
      }
     
      // Save buffers into Strings if charBuffer is not blank
      if ( !storeString  && (!charBuffer[0] == 0) ) {
            inBuffer = charBuffer;
      }
     
      if ( inBuffer != "" && !storeString ) {
        debug.println();
        debug.print("RF(");
        debug.print(inBuffer.length());
        debug.print("):");
        debug.println(inBuffer);
       
        // Check for first 3 char is SRC
        if ( inBuffer.substring(0,3) == "SRC" ) {
     
        int firstBracket = inBuffer.indexOf('[');  // Anything in between [ and ] is the callsign & ssid
        int secondBracket = inBuffer.indexOf(']');

        //int secondColon = inBuffer.indexOf(':',secondBracket+1); 
        int secondColon = secondBracket+6;
        // Do not use lastindexOf as the messaging uses : too
        int thirdColon = inBuffer.indexOf(':',secondColon+1);
       
        // Get the callsign
        String decoded2 = inBuffer.substring(firstBracket+1,secondBracket); // Substring the callsign
        decoded2.toCharArray(callsign,secondBracket+1-firstBracket-1);      // Convert to char array
       
        // Get the path
        String decoded3 = inBuffer.substring(secondColon+2,thirdColon-5);
        decoded3.toCharArray(path,decoded3.length()+1);
       
        // Get the data
        String decoded4 = inBuffer.substring(thirdColon+2,inBuffer.length());
        decoded4.toCharArray(data,decoded4.length()+1);

        debug.print("Callsign (");
        debug.print(strlen(callsign));
        debug.print("):");
        debug.println(callsign);   
             
        debug.print("Path (");
        debug.print(strlen(path));
        debug.print("):");
        debug.println(path);   

        debug.print("Data (");
        debug.print(strlen(data));
        debug.print("):");
        debug.println(data);   
       
        lcd.clear();
        lcd.setCursor(0,0);
        lcd.print(callsign);
       
        lcd.setCursor(0,1);
        lcd.print("                    ");       
        lcd.setCursor(0,1);
        for ( int i=0;i<20;i++ ) { lcd.print(data[i]); }

        // Print on Line 2
        lcd.setCursor(0,2);
        lcd.print("                    ");       
        lcd.setCursor(0,2);       
        if ( strlen(data) < 40 ) {
            for ( int i=20;i<strlen(data);i++ ) { lcd.print(data[i]); }
        } else {
            for ( int i=20;i<40;i++ ) { lcd.print(data[i]); } // Truncate data till 40 bytes
        }
                 
        firstBracket, secondBracket, secondColon, thirdColon = 0;
       
       } // endif SRC check
       
        // clear the buffers after saving out all the variables like callsign, path and data
        inBuffer = "";      // Clear the buffers
        charBuffer[0] = 0;  // Clear the buffers
        bufferIndex = 0;    // Reset the index
        callsign[0] = 0;
        path[0] = 0;
        data[0] = 0;
       
      } // end storeString
}

6  Using Arduino / Project Guidance / Re: Calculating turning degree in tinyGPS++ on: July 14, 2014, 03:18:18 pm
Code:
int headingDelta = ((previousHeading - currentHeading) + 360) % 360;
if (headingDelta < -25 || headingDelta > 25) {
     // report position
    previousHeading = currentHeading
}

Dear John, for your formula, when I debug it.. it seems the calculation is wrong..  ( very obvious )

previousHead = 54
currentHead = 72
headDelta = 342

previousHead = 78
currentHead = 91
headDelta = 347

previousHead = 192
currentHead = 195
headDelta = 358

Here are my suggested codes to fix it , will the below formula work ?

Code:

    if ( gps.course.isUpdated() ) {   
      // Get headings and heading delta
      currentHeading = (int) gps.course.deg();
      if ( currentHeading >= 180 ) { currentHeading = currentHeading-180; }
      headingDelta = (int) ( previousHeading - currentHeading ) % 360;
    } // endof gps.course.isUpdated()


    if ( lastTx > 5000 && (gps.satellites.value() > 3) ) {
      if ( headingDelta < -25 || headingDelta >  25 ) {
          debug.println();       
          debug.print("Heading, current:");     
          debug.print(currentHeading);
          debug.print(" previous:");     
          debug.print(previousHeading);
          debug.print(" delta:");     
          debug.println(headingDelta);
       
          debug.println("*** Trigger by Heading Change");
          TxtoRadio();
          previousHeading = currentHeading;
       }
    }

7  Using Arduino / Project Guidance / Re: Calculating turning degree in tinyGPS++ on: July 13, 2014, 11:47:31 pm

Thank you all for the replies and assistance.. I knew a new topic about float precision :-)

Gosh...I finally found the issue... the human error...

The APRS/aprs.fi needed deg MIN ( DD MM.MM ) only whereas I converted everything to Deg MIN.SEC ( DDMM.SS )

This is my first time doing lat/long conversion to deg min & sec ... and totally no idea what are they ... and in the process , found this nice little Arduino compatible MCU with GPS/GLONASS called NavSpark
https://www.indiegogo.com/projects/navspark-arduino-compatible-with-gps-gnss-receiver

8  Using Arduino / Project Guidance / Re: Calculating turning degree in tinyGPS++ on: July 13, 2014, 02:42:14 am
Oh.. I wasn't aware of such floating point precision issues...  smiley

Here are my codes below getting raw in billionths from tinyGPS++ ..

Can you suggest a formula to calculate the MIN and SEC in a precision way before adding it back to the Degree ...

Code:
    latDMS = gps.location.rawLat().deg + ( (float) gps.location.rawLat().billionths / 1000000000 );
    lngDMS = gps.location.rawLng().deg + ( (float) gps.location.rawLng().billionths / 1000000000 );

    latDeg = convertDegMinSec(latDMS);
    lngDeg = convertDegMinSec(lngDMS);

From the tinyGPS++ libs, the billionths are in uint32

Thanks
9  Using Arduino / Project Guidance / Re: Calculating turning degree in tinyGPS++ on: July 12, 2014, 08:10:42 am
I've a formula Lat/Long GPS coordinates to convert Decimal to DegMinSec

Actual was E0310.06 N10138.96 but the plotted was E0310.07 N10138.61, out by almost 600meters..

Can someone check if my conversion formula is correct ?

Thanks


Code:
float convertDegMinSec(float decDeg) {
 
  float DegMinSec;
 
  int intDeg = decDeg;
  decDeg -= intDeg;
  decDeg *= 60;
  int minDeg = decDeg;
  decDeg -= minDeg;
  decDeg *= 60;
  int secDeg = decDeg;
 
  DegMinSec = ( intDeg*100 ) + minDeg + ( (float)secDeg / 100 );
 
 return DegMinSec;
}
10  Using Arduino / Project Guidance / Re: Calculating turning degree in tinyGPS++ on: July 11, 2014, 11:17:06 pm
Quote
Code:
int headingDelta = ((previousHeading - currentHeading) + 360) % 360;
if (headingDelta < -25 || headingDelta > 25) {
     // report position
    previousHeading = currentHeading
}

Thanks a lot!!! It works...
11  Using Arduino / Project Guidance / Calculating turning degree in tinyGPS++ on: July 11, 2014, 08:47:06 am
Hi,

I hv a programming questions on how to check for course change in degree..

I am getting the course/headings from tinyGPS++ libs and would like to check for a turn of more than 25 degree.

This is for a ham radio APRS tracker to transmit a GPS position when the turning is more than 25degree..

As the degree runs from 0 to 359 degree,  i would like to get an absolute value of heading change more than 25 deg..

Can someone give me some sample coding on this ...

I''m trying to implement the SmartBeaconing from the links below ...

http://www.hamhud.net/hh2/smartbeacon.html

Thanks
12  Using Arduino / Project Guidance / Re: HAMduino on: June 24, 2014, 05:55:30 am
This is a working APRS implementation done on Arduino/atmega328 or Microduino

http://unsigned.io/microaprs/

13  Using Arduino / Networking, Protocols, and Devices / Re: nRF24L01+ multiple transmitters on: June 13, 2014, 11:32:52 am

C:\Program Files (x86)\Arduino\libraries\RF24/bcm2835.h:898: error: previous declaration 'void bcm2835_delay(unsigned int)' here
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:134: error: declaration of C function 'void bcm2835_delayMicroseconds(unsigned int)' conflicts with

May I know which forks are you currently using ???

The bcm2835 errors seems to be from the Raspberry Pi libs got mixed up with the Arduino libs..

I'm using the latest forks from jscrane with support for both Arduino and Attiny 8x
https://github.com/jscrane/RF24

14  Using Arduino / Project Guidance / Re: HAMduino on: June 06, 2014, 02:20:16 am
I found this Friendcom radio 5W ( http://friendcom.en.alibaba.com/product/576030542-209713635/RF_Transceiver_Wireless_Data_Radio_FC_301_D.html)  ,

They cost like US$135 per piece .. excluding shipping ... so they are definitely not cheap ..

 
15  Using Arduino / Project Guidance / Re: HAMduino on: June 03, 2014, 11:11:05 am
Here are some Arduino / AVR links related to Ham radio / APRS / TNC / AX.25 stuff :-

Some projects are not updated or seems dated ...

BeRTOS examples with APRS :-
http://www.bertos.org/use/examples-projects/arduino-aprs

The below three are based on the codes from BeRTOS ...
AFSK 1200 modem
http://unsigned.io/?p=77

AX.25 Packet Modem
http://slepp.ca/projects/ax25-modem/

Arduino KISS TNC
https://sites.google.com/site/ki4mcw/Home/arduino-tnc

extdigi, an APRS Digipeater for Arduino
http://extradio.sourceforge.net/extdigi.html

I'm getting the parts to build the AFSK 1200 modem mentioned above..

Stanley ( 9W2SVT )

Pages: [1] 2 3 ... 13