Problem with transmitting IMU/GPS/Ultrasonic data over Nrf24L01

i think i would need to convert from char to byte befor Mirf will eat it and crap it out the other end yes/no?.

No. char and byte are the same size. You just tell Mirf that the char array is really a byte array.

Mirf.send((byte *)gps_data, strlen(gps_data));

Assuming, of course, that gps_data is a char array and contains the data from the GPS.

so i make a char array for incoming GPS data stuff the array and refer to it as a byte array?
(byte *)gps_data, [gps_data]that is realy a char array and (byte *) says hey hop in there and pull the value because we are the same size anyhow?
strlen(gps_data) is something like sizeof() but it's get the string gps_data that is size of gps_data? or is the lack of sleep catching up now? lol

so i make a char array for incoming GPS data stuff the array and refer to it as a byte array?

Not "refer to it as", but "tell Mirf that it is".

(byte *)gps_data, [gps_data]that is realy a char array and (byte *) says hey hop in there and pull the value because we are the same size anyhow?

Something like that.

strlen(gps_data) is something like sizeof() but it's get the string gps_data that is size of gps_data?

It gets the number of characters in the array, up to the terminating NULL. It does not "get the string".

great so step one char array of size to fit a gps.sentance in fill it call it with a (byte *) call, get it's count with strln() "string length?" transmit refill the array and repeat till all the NEMA is sent.
sound like i missed anything?

great so step one char array of size to fit a gps.sentance in

Yes.

fill it

Yes.

call it with a (byte *) call,

No. You don't call an array. You call a function, like Mirf.send().

get it's count with strln()

Well, strlen() will produce fewer errors...

sound like i missed anything?

Capital letters, punctuation, sleep, and probably some other stuff. :slight_smile:

Welp can check "some" sleep of the list :). anyhow im feeling a bit dorky more than usual i cant seem to grasp how to stuff gps.sentence into an array or some buffer.
gps.sentence returns a string with \0 terminate as a char * ( char ptr?).
so i keep getting invalid conversions from char* to char errors. so am i to understand i am dealing with output from gps.sentence that is in the form of a char ptr and need to (read) it some how into some string then convert the string into regular char array?. as im typing this i can hear your groan as you ask "does this guy like over complicating things a little?".
because i know your going to go NO you just need to reference some ptr and read the individual chars and put them into your array. or not LOL.
i just know i am gonna love your reply i just know it!

BTW thank you so much for all the help i have been learning so much from your guidance.

gps.sentence returns a string with \0 terminate as a char * ( char ptr?).

So:

char *gps_data = gps.sentence();
Mirf.send((byte *)gps_data, strlen(gps_data));

gps_data IS a string. No need to copy it anywhere else or try to "read it to a string".

"does this guy like over complicating things a little?".

I wasn't think that at all. I was thinking "a lot". 8)

PaulS:

gps.sentence returns a string with \0 terminate as a char * ( char ptr?).

So:

char *gps_data = gps.sentence();

Mirf.send((byte *)gps_data, strlen(gps_data));




gps_data IS a string. No need to copy it anywhere else or try to "read it to a string".



> "does this guy like over complicating things a little?".


I wasn't think that at all. I was thinking "a lot". 8)
LOL. hard to believe.

anyhow thanks for the help so far. but since i went and mucked around anyhow can you tell my why the output of this is always this
output 


gpsS Array contains: ««««



code


#include <nmea.h>
NMEA gps(ALL);    // GPS data connection to all sentence types
char* gpsS[76];

void setup() {
  Serial.begin(57600);
  Serial2.begin(57600);
}

void loop() {
  if (Serial2.available() > 0 ) {

if (gps.decode(Serial2.read())) {
      for (int i = 0; i < 76; i++){
        gpsS[i] = gps.sentence();
        delay(500);
      }
    }
  }
  Serial.print("gpsS Array contains: ");
  Serial.print(gpsS[0]);
  Serial.print(gpsS[1]);
  Serial.print(gpsS[2]);
  Serial.print(gpsS[3]);
  Serial.println();
  // serial monitor spits out....  gpsS Array contains: ««««
}

TX

void loop() {
  char *gps_data = gps.sentence();
  if (Serial2.available() > 0 ) {
    // read incoming character from GPS and feed it to NMEA type object
    if (gps.decode(Serial2.read())) {
      Mirf.setTADDR((byte *)"base1"); // set name of Reciever
      char *gps_data = gps.sentence();
      Mirf.send((byte *)gps_data);
      while(Mirf.isSending()){
      Serial.println("send GPS DAta");
      Serial.println(gps_data);
      }
      delay(10);
    }

  }
}

Serial.print output on TX side

$GPGLL,4328.5356,N,07625.7447,W,015842.800,A,D*42
send GPS DAta
$GPGSV,3,2,11,46,38,210,32,06,26,159,,20,25,242,19,13,24,313,*70
send GPS DAta
$GPGSV,3,3,11,32,23,216,,29,17,043,20,03,15,178,*4D
send GPS DAta
$GPGGA,015843.000,4328.5356,N,07625.7447,W,2,5,3.72,124.2,M,-34.2,M,0000,0000*66
send GPS DAta
$GPGLL,4328.5356,N,07625.7447,W,015843.000,A,D*4B
send GPS DAta
$GPGSV,3,2,11,46,38,210,32,06,26,159,,20,25,242,19,13,24,313,*70
send GPS DAta
$GPGSV,3,3,11,32,23,216,,29,17,043,20,03,15,178,*4D

seems to be working fine.

on the RX side however
RX

void loop(){
   byte inData[Mirf.payload];
    if(Mirf.dataReady()){
    do{
      Mirf.getData(inData);
      byte* gps_data = inData;
     
      Serial.println(*gps_data);
      delay(10);	
    }
    while(!Mirf.rxFifoEmpty());
  }
}

Serial output is.

im assuming that it's coming in fine but my method of extracting chars from data ( is byte at this time)
36
36
36
36
36

im guessing it's this byte* gps_data = inData; i though sense inData is coming in as bytes that i needed to reference gps_data as pointer to bytes and print it anyhow as a char?

if into Mirf like this

char *gps_data = gps.sentence();
      Mirf.send((byte *)gps_data);

then should not out of Mirf like this

 Mirf.getData(inData);
      char gps_data = *inData;
       Serial.println(gps_data);

it does print the first char a $ to the serial but that's it. or is it some kind of an array in inData like inData[sizeof(payload)] kind of deal and i need to scan the with of inData the size of payload and pull each char?

well got the first 6 anyhow

char inGPS[27];
byte inData[Mirf.payload];
    if(Mirf.dataReady()){
    do{
      Mirf.getData(inData);
      inGPS[0] =  inData[0];
      inGPS[1] =  inData[1];     
      inGPS[2] =  inData[2];
      inGPS[3] =  inData[3];
      inGPS[4] =  inData[4];
      inGPS[6] =  inData[5];
      inGPS[7] =  inData[6];
      inGPS[8] =  inData[7];
      inGPS[9] =  inData[8];
      inGPS[10] = inData[9];
      inGPS[11] = inData[10];
      inGPS[12] = inData[11];
      inGPS[12] = inData[12];
      inGPS[13] = inData[13];     
      inGPS[14] = inData[14];
      inGPS[15] = inData[15];
      inGPS[16] = inData[16];
      inGPS[17] = inData[17];
      inGPS[18] = inData[18];
      inGPS[19] = inData[19];
      inGPS[10] = inData[20];
      inGPS[21] = inData[21];
      inGPS[22] = inData[22];
      inGPS[23] = inData[23];
      inGPS[24] = inData[24];
      inGPS[25] = inData[25];
      inGPS[26] = inData[26];
      //char gps_data = *inData;
     for (int i = 0; i < 27; i++) {
      Serial.print(inGPS[i]);

spits out $GPVT amd $GPRMC etc and some other junk i cant even copy LOL much lest paste.
so inData is an array of incoming bytes = to playload size?

would switching to RF24 lib be better for all the stuff i am trying to do?
http://maniacbug.github.com/RF24/
maniacbug has also documented this quite well it seems.

it's becoming more and more clear to me i need to make some kind of structured data function to pool all my data types in and transmit them and pool them back into some structured function or database.

i get a lot more RF control with with RF24 so i think ill port over to that now while i wait for your reply.

so i guess what im asking is with all the IMU GPS Ultrasonic and other sensor data is it best to make some data collection thing on the bot and transmit it and pull it apart on the RX side? this is becoming a lot of data now especially with the GPS stuff that alot of NMEA data lol.

how would YOU oh sage master programer PaulS collect and store all this data for local bot use as well as send for base station use?

im enjoying this challenge tho i cant say a lot but it is rewarding and very helpful in learning programing that is for sure.

what am i doing wrong here.

void loop() {
  char Sr = Serial2.read(); 
  char GpsStr[100];
    int i;
    for (i = 0; i < sizeof(GpsStr); i = i + 1) {
    GpsStr[i] = Sr;    
    Serial.print(GpsStr[i]);
    }
  Serial.println();  
}

output is.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
...
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

looks like the NMEA data im looking for but vertical and incomplete lol.

Each time you read a character, you create a new array to store it in. Then, you store the character in all 100 elements in the array. Then, you print each element in the array.

Looks like it is working just fine.

hmmmm. ok not what i was hoping to do. i would like to do is read in the first 100 chars form serial2 and out that in 1 array and print to to serial so not $$$$$$$ then next line GGGGGG etc i should be $GPRMC*** etc.

can you comment my code and show where elements are being created because i have 1 array named GpsStr[100] already i just want to stuff that one with the first 100 chars print it(for now, hopefully send ti to some struct or union and convert it and send it.)

From what you said it seems like i am making a new array and fulling it with 1 char x 100 printing it and filling it with the next char and printing that x 100 for as long as loop runs.
i figure if im going to learn arrays and pointers and structs and unions and type casting i need to start at the beginning.

So making 1 array and stuffing it with serial data i figured would be the simple start lol.

  char GpsStr[100];                                        // Start an array of 100 empty char sized elements

void loop() {                                                  // Start of loop

    char Sr = Serial2.read();                           //Initialize Sr and give it a value = to Serial2.read int i; create  i and make it size of int
    for (i = 0; i < sizeof(GpsStr); i = i + 1) {    // Start a conditional loop count up from 0 to size of GpsStr wich is 100 and preform an action contained in {}.
    GpsStr[i] = Sr;                                         // Take the contence of Sr 'Serial2.Read()' and stuff it in GpsStr at 'i' pos 'i' is equal to the current number the loop has counted form 0 to 100  
    }                                                             // Ok made it form 0 -100 and stuffed Sr into each continue with main loop
   
    int x;                                                     // Init x
    for (x = 0; x < 99; x = x + 1) {                 // Count x from 0 - 100
    Serial.print(GpsStr[x]);                         // Print to serial GpsStr at X pos
    }                                                           // Stop printing
    Serial.println();                                    // Make a new line
   }                                                           // Go back to start of loop

Output i get this.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
***************************************************************************************************
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

What i should get is.

$GPRMC,140053.00,A,4454.1740,N,09325.0143,W,000.0,128.7,300508,001.1,E,A*2E
$GPGGA,140053.00,4454.1740,N,09325.0143,W,1,09,01.1,00289.8,M,-030.7,M,,*5E
$GPGSA,A,3,21,15,18,24,26,29,06,22,,03,,,02.0,01.1,01.7*04
$GPGSV,3,1,12,21,75,306,40,15,59,075,46,18,57,269,49,24,56,115,46*79
$GPGSV,3,2,12,26,48,059,43,29,27,188,48,06,25,308,41,22,18,257,33*7D
$GPGSV,3,3,12,08,14,060,,03,11,320,32,09,06,144,,16,04,311,*7C
$GPRMC,140054.00,A,4454.1740,N,09325.0143,W,000.0,128.7,300508,001.1,E,A*29
$GPGGA,140054.00,4454.1740,N,09325.0143,W,1,09,01.1,00289.8,M,-030.7,M,,*59
$GPGSA,A,3,21,15,18,24,26,29,06,22,,03,,,02.0,01.1,01.7*04
$GPGSV,3,1,12,21,75,306,40,15,59,075,46,18,57,269,49,24,56,115,46*79
$GPGSV,3,2,12,26,48,059,43,29,27,188,48,06,25,308,41,22,18,257,33*7D
$GPGSV,3,3,12,08,14,060,,03,11,320,32,09,06,144,,16,04,311,*7C

So what when wrong?

There are much simpler methods to change the length of a string than copying it... into a shorter array..
Set the Nth+1 byte to '/0' and you have shortened it's length. Co-incidentally it uses less ram
and fewer instructions and that can only mean that the program will run faster so you have more time for other tasks, W/O copying that array an extra time. You Might try to 'single' step that array manipulation in your head, I think you'll find the required modification to make it perform (print) as you so desire.

Bob

Set the Nth+1 byte to '/0'

That's two bytes.
Try '\0' instead.

You need a global array to hold the GPS data in, not a local array.
You need a global index into that array.

Each time you read a character from the GPS, there are three possibilities. The character could be the start of a packet - a $. If it is, set index to 0 and store the character.

The character could be the end of a packet - a carriage return, most likely, but the data after the * is just a checksum, so you could ignore that data and treat the * as the end of the packet. Whichever option you choose, the arrival of the end of the packet means that it is time to broadcast some data, after you store the character.

The third option is that the character is neither a start marker or an end marker, so it needs to be stored in the array. Store the character in the index position, increment index, and store a NULL in the index position.

I read JHaskell's blog on arduino comm and it' sone of the best beginner guides i have seen for it.
link here JHaskell's Blog: Serial Comm Fundamentals on Arduino

so now this is what it looks like.

#include <nmea.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
#include <nRF24L01.h>
#include <SPI.h>
NMEA gps(ALL);    // GPS data connection to all sentence types
RF24 radio(48,49);
void setup() {
  Serial.begin(57600);
  Serial2.begin(57600);
  //**************Start Transiever (NRF24L01) config**************
  printf_begin();
  printf("\n\rRadio Setup\n\r");
  radio.begin();
  radio.setDataRate(RF24_2MBPS);
  radio.setCRCLength(RF24_CRC_16);
  radio.setPayloadSize(4 * sizeof(byte));
  radio.setChannel(2);
  radio.setAutoAck(true);
  radio.openReadingPipe(1,0xF0F0F0F0E1LL);
  radio.openWritingPipe(0xF0F0F0F0D2LL);
  radio.startListening();
  radio.printDetails();
  //**************End Transiever (NRF24L01) config**************
}
#define DBUFFSIZE      100
char gpsBuff[DBUFFSIZE+1]; //Add 1 for NULL terminator
byte gpsBuffIndex = 0;

 union inGps2byte_t {
 byte  inGpsout[100];
 char inGpsin;
 }
 inGps2byte;

void loop() {                                    // start of loop


    getSerialString();
    radio.startListening();
    Tchar2byte12();
}                                             // go back to start of loop

boolean getSerialString(){

  char startChar = '

now the gpsBuff works fine i can scan it and print the bits in the array out. now im just having probs geting them stuffed into the union to convert to bytes for the radio to send.

scanning inGps2byte.inGpsout shows 36 on [0] and 0 on the other [1]-[99].

i am guessing it's due to the fact im using a pointer (to my understanding pointers hold addresses to mem of the item your trying to actually access) therefor it's understandable the array is empty.

so now i just need to learn pointers and how to reference them properly i guess. and if i do that then i can forgo all this and just use the NMEA lib and point it into a union for byte conversion or not even, have not got that far yet.; // or '!', or whatever your start character is
  char endChar = '\10';
  boolean storeString = false; //This will be our flag to put the data in our buffer

static byte gpsBuffIndex = 0;
  while(Serial2.available()>0){
    char incomingbyte = Serial2.read();
    if(incomingbyte==startChar){
      gpsBuffIndex = 0;  //Initialize our dataBufferIndex variable
      storeString = true;
    }
    if(storeString){
      //Let's check our index here, and abort if we're outside our buffer size
      //We use our define here so our buffer size can be easily modified
      if(gpsBuffIndex==DBUFFSIZE){
        //Oops, our index is pointing to an array element outside our buffer.
        gpsBuffIndex = 0;
        break;
      }
      if(incomingbyte==endChar){
        gpsBuff[gpsBuffIndex] = 0; //null terminate the C string
        //Our data string is complete.  return true
        return true;
      }
      else{
        gpsBuff[gpsBuffIndex++] = incomingbyte;
        gpsBuff[gpsBuffIndex] = 0; //null terminate the C string
      }
    }
    else{
    }
  }
  return false;
}

void Tchar2byte12(){
inGps2byte.inGpsin = gpsBuff;
  byte output[100];
output[0] = inGps2byte.inGpsout[0]; 
output[1] = inGps2byte.inGpsout[1]; 
output[2] = inGps2byte.inGpsout[2]; 
output[3] = inGps2byte.inGpsout[3]; 
output[4] = inGps2byte.inGpsout[4]; 
output[5] = inGps2byte.inGpsout[5]; 
output[6] = inGps2byte.inGpsout[6]; 
output[7] = inGps2byte.inGpsout[7]; 
output[8] = inGps2byte.inGpsout[8]; 
output[9] = inGps2byte.inGpsout[9]; 
output[10] = inGps2byte.inGpsout[10]; 
output[11] = inGps2byte.inGpsout[11]; 
output[12] = inGps2byte.inGpsout[12]; 
output[13] = inGps2byte.inGpsout[13]; 
output[14] = inGps2byte.inGpsout[14]; 
output[15] = inGps2byte.inGpsout[15]; 
output[16] = inGps2byte.inGpsout[16]; 
output[17] = inGps2byte.inGpsout[17]; 
output[18] = inGps2byte.inGpsout[18]; 
output[19] = inGps2byte.inGpsout[19]; 
output[20] = inGps2byte.inGpsout[20]; 
output[21] = inGps2byte.inGpsout[21];
output[22] = inGps2byte.inGpsout[22];
output[23] = inGps2byte.inGpsout[23];
output[24] = inGps2byte.inGpsout[24];
output[25] = inGps2byte.inGpsout[25];
output[26] = inGps2byte.inGpsout[26];
output[27] = inGps2byte.inGpsout[27];
output[28] = inGps2byte.inGpsout[28];
output[29] = inGps2byte.inGpsout[29];
output[30] = inGps2byte.inGpsout[30];
output[31] = inGps2byte.inGpsout[31];
output[32] = inGps2byte.inGpsout[32];
output[33] = inGps2byte.inGpsout[33];
output[34] = inGps2byte.inGpsout[34];
output[35] = inGps2byte.inGpsout[35];
output[36] = inGps2byte.inGpsout[36];
output[37] = inGps2byte.inGpsout[37];
output[38] = inGps2byte.inGpsout[38];
output[39] = inGps2byte.inGpsout[39];
output[40] = inGps2byte.inGpsout[40];
output[41] = inGps2byte.inGpsout[41];
output[42] = inGps2byte.inGpsout[42];
output[43] = inGps2byte.inGpsout[43];
output[44] = inGps2byte.inGpsout[44];
output[45] = inGps2byte.inGpsout[45];
output[46] = inGps2byte.inGpsout[46];
output[47] = inGps2byte.inGpsout[47];
output[48] = inGps2byte.inGpsout[48];
output[49] = inGps2byte.inGpsout[49];
output[50] = inGps2byte.inGpsout[50];
output[51] = inGps2byte.inGpsout[51];
output[52] = inGps2byte.inGpsout[52];
output[53] = inGps2byte.inGpsout[53];
output[54] = inGps2byte.inGpsout[54];
output[55] = inGps2byte.inGpsout[55];
output[56] = inGps2byte.inGpsout[56];
output[57] = inGps2byte.inGpsout[57];
output[58] = inGps2byte.inGpsout[58];
output[59] = inGps2byte.inGpsout[59];
output[60] = inGps2byte.inGpsout[60];
output[61] = inGps2byte.inGpsout[61];
output[62] = inGps2byte.inGpsout[62];
output[63] = inGps2byte.inGpsout[63];
output[64] = inGps2byte.inGpsout[64];
output[65] = inGps2byte.inGpsout[65];
output[66] = inGps2byte.inGpsout[66];
output[67] = inGps2byte.inGpsout[67];
output[68] = inGps2byte.inGpsout[68];
output[69] = inGps2byte.inGpsout[69];
output[70] = inGps2byte.inGpsout[70];
output[71] = inGps2byte.inGpsout[71];
output[72] = inGps2byte.inGpsout[72];
output[73] = inGps2byte.inGpsout[73];
output[74] = inGps2byte.inGpsout[74];
output[75] = inGps2byte.inGpsout[75];
output[76] = inGps2byte.inGpsout[76];
output[77] = inGps2byte.inGpsout[77];
output[78] = inGps2byte.inGpsout[78];
output[79] = inGps2byte.inGpsout[79];
output[80] = inGps2byte.inGpsout[80];
output[81] = inGps2byte.inGpsout[81];
output[82] = inGps2byte.inGpsout[82];
output[83] = inGps2byte.inGpsout[83];
output[84] = inGps2byte.inGpsout[84];
output[85] = inGps2byte.inGpsout[85];
output[86] = inGps2byte.inGpsout[86];
output[87] = inGps2byte.inGpsout[87];
output[88] = inGps2byte.inGpsout[88];
output[89] = inGps2byte.inGpsout[89];
output[90] = inGps2byte.inGpsout[90];
output[91] = inGps2byte.inGpsout[91];
output[92] = inGps2byte.inGpsout[92];
output[93] = inGps2byte.inGpsout[93];
output[94] = inGps2byte.inGpsout[94];
output[95] = inGps2byte.inGpsout[95];
output[96] = inGps2byte.inGpsout[96];
output[97] = inGps2byte.inGpsout[97];
output[98] = inGps2byte.inGpsout[98];
output[99] = inGps2byte.inGpsout[99];
/

radio.stopListening();
bool ok = radio.write(output,sizeof(byte));
if (ok)
printf("ok...Tchar2byte12\n\r");
else 
printf("failed.Tchar2byte12\n\r");
delay(10);
*/
  for (int i = 0; i < sizeof(inGps2byte.inGpsout); i++) {
    Serial.print(inGps2byte.inGpsout[i]); 
  } 
Serial.println();
}


now the gpsBuff works fine i can scan it and print the bits in the array out. now im just having probs geting them stuffed into the union to convert to bytes for the radio to send.

scanning inGps2byte.inGpsout shows 36 on [0] and 0 on the other [1]-[99].

i am guessing it's due to the fact im using a pointer (to my understanding pointers hold addresses to mem of the item your trying to actually access) therefor it's understandable the array is empty.

so now i just need to learn pointers and how to reference them properly i guess. and if i do that then i can forgo all this and just use the NMEA lib and point it into a union for byte conversion or not even, have not got that far yet.