GNU Radio's GPS Package
gps_navdata_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 <+YOU OR YOUR COMPANY+>.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_GPS_GPS_NAVDATA_IMPL_H
22 #define INCLUDED_GPS_GPS_NAVDATA_IMPL_H
23 
24 #include <gps/gps_navdata.h>
25 #include <stdio.h>
26 
27 
28 typedef enum
29 {
34 } frame_state;
35 
36 namespace gr {
37  namespace gps {
38 
40  {
41  private:
42 
43  frame_state fsm;
44  unsigned char polarity; // 0 = right way around, 1 = upside down
45  int bit_counter;
46  int word_counter;
47  unsigned char word[30];
48  unsigned char last2[2];
49 
50  int check_preamble(unsigned char *, unsigned char &);
51  int check_checksum(unsigned char *, unsigned char *);
52 
53  public:
56 
57  // Where all the action really happens
58  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
59 
60  int general_work(int noutput_items,
61  gr_vector_int &ninput_items,
62  gr_vector_const_void_star &input_items,
63  gr_vector_void_star &output_items);
64  };
65 
66  } // namespace gps
67 } // namespace gr
68 
69 #endif /* INCLUDED_GPS_GPS_NAVDATA_IMPL_H */
70 
int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
<+description of block+>
Definition: gps_navdata.h:36
Definition: gps_navdata_impl.h:39
Definition: gps_navdata_impl.h:32
frame_state
Definition: gps_navdata_impl.h:28
Definition: gps_navdata_impl.h:33
Definition: gps_navdata_impl.h:30
void forecast(int noutput_items, gr_vector_int &ninput_items_required)
Definition: gps_navdata_impl.h:31