getting numbers from an array in one number


hello
with code want convert degree , decimal minutes coordinates degree coordinates.
my problem don't understand how several numbers array in 1 single numer( pos 0,1,2 of anarray[]  to 1 single number in  int number)

the array contains 5417.7540 on [2]
and contains 00735.9808 on [4]   ( coordinates modified real location)
it 3d array of [15][11]

code: [select]
int latd;
int lond;
double latx;
double lonx;
double latxx;
double lonxx;
double lat;
double lon;

latd = (gps.arguments[2][0,1]);
lond = (gps.arguments[4][2]);
latx = (double)gps.arguments[2][2, 3, 5, 6, 7, 8];
lonx = (double)gps.arguments[4][3, 4, 6, 7, 8, 9];
latxx = (latx / 60);
lonxx = (lonx / 60);
lat = (latd + latxx);
lon = (lond + lonxx);


serial.println("next latd-lond-latx-lonx-latxx-lonxx");
serial.println(latd);
serial.println(lond);
serial.println(latx);
serial.println(lonx);
serial.println(latxx);
serial.println(lonxx);


this part of big code converts coordinates. though not work  :-[

thank
regards diamantmatch

if array of type char, , null terminated, can use atoi, atol, , atof functions convert strings integers, longs, , floats, respectively.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > getting numbers from an array in one number


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums