reading structured arrays, changing their structure
hi,
i am trying to read in two different structured arrays, place them in a different structure so they are both the same and then compare them.
the first array, 'primary', has the structure..
Code:
struct primary_plot {
double bearing; /*degrees */
int range; /*metres */
double elevation; /*degrees */
};
the second array, 'secondary', has a similar structure..
Code:
struct secondary_plot {
double bearing; /*degrees */
int range; /*metres */
int altitude; /*metres */
int flight_number;
};
i need to read these arrays into a file, and store them in seperate arrays with this structure..
Code:
struct aircraft_information {
double bearing; /*degrees */
double range; /*kilometres */
int altitude; /*metres */
int flight_number;
int match; /*array index of matching plot */
obviously i will need to convert the range's from both the primary and secondary into kilometres which isnt a problem, im just unsure of how to carry out this task.
any help will be appreciated!