My queue implementation (in C)
DRY. queue_push assigns queue_back to the input_node no matter what. Consider
  if (input_queue-&gt;front == NULL) {
      assert(input_queue-&gt;back == NULL);
      input_queue-&gt;front = input_node;
  } else {
      assert(input_queue-&gt;back != NULL);
      input_queue-&gt;back-&gt;next = input_node;
  }
  input_queue-&gt;back = input_node;

(asserts are there only to clarify the logic).
Ditto for queue_pop.

Usually we don't want the client code to be aware of the containers, neither depend of them. If perchance you'd eventually decide to keep the weighted coordinates in a tree rather than a list, you'd need to redesign struct Weighted_coord_node, and the surrounding code. I strongly recommend to have struct Queue_node keeping the pointer to the actual data
  struct Queue_node {
      struct Queue_node * next;
      void * client_data;
  };