// wptList.h
//
// Header for doubly linked list used by wp2m.c
//


struct node
{
     struct node *prevPtr;
     double Lat;         //decimal degrees eg: 36.1234
     double Lon;         //decimal degrees eg: -121.4321
     double legMeters;   //meters to nextPtr waypoint
     double heading;     //degrees to nextPtr waypoint
     double legSecs;     //time to nextPtr waypoint
     int wptNumber;      // number of the waypoint struct
     struct node *nextPtr;
};
struct node *headNodePtr;    // head of list
struct node *tailNodePtr;    // tail of list


// function prototypes
void insertLatLonBeg(double latIn, double lonIn);

void insertLatLonEnd(double latIn, double lonIn);

int initNode(struct node *currNodePtr);

int displayNode(struct node *currNodePtr);

void insertBeg(double legMetersIn);

void insertEnd(double legMetersIn);

void displayFwd(void);

void displayRev(void);

void insertNode(struct node *currNodePtr, double smallerlegMeters);

void insertIfBig_legMeters(void);

int fillBlankLatLons(void);

void itemizeList(void);

void calcWaypointTimes(void);

double calcMissionTime(void);

int launch_waypoint(void);

void destroyList(void);


