Im not sure how to recall the last function i did in a new one. (LINE 7)
double azimuth(struct place * a,struct place * b){
(a->lon)*(PI/180.0);
(b->lon)*(PI/180.0);
double C,c,d,azimuth;
C=b-a;
d=(90-a->lat)*(PI/180.0);
c= IM TRYING TO MAKE THIS EQUAL THE LAST FUNCTION I DID
azimuth= sin(C) * sin(d)/sin(c);
return azimuth;
}
ie.
lets say
function A
it outputs D
function B
its operation is 5- D
how do i recall functions A results?
(the previous function im trying to reuse)
double distance_between(struct place * a, struct place * b){
What is it exactly you want to do? Call distance_between() from azimuth()? If that's the case, all you need to do is define distance_between() before azimuth().
Also, I'm saying this without a clear idea of what your code does, but this is a faster way to calculate the distance between two 3D points: sqrt(pow(x1-x0,2)+pow(y1-y0,2)+pow(z1-z0,2));