add grkkgps-0.0 and 0.1

This commit is contained in:
Harald Welte 2011-01-12 13:17:50 +01:00
commit 3d93772ef1
105 changed files with 62876 additions and 0 deletions

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000000000001001010010110010100010100111011100101100011100111111101100111010011010101101001100100110111111101111001101000010000001011000100111000010100010010001101011101111111110000000000001101101101000000111001110010000101000000100010110000001110011100010100010110010001100010101011010000111000011111101110000010101010001101110100001100011010000011011011101100110101100100111000111111000101001100000111010110110010010010010100111000110111111100110100110101011110011010000011011101011011001101011011101110110111001011011011100100100010110000001110011100010100010110010001100100101110100000111111111010110111111010011111111100111011100100011111101000000000000011101000100110011100101111110110011100101011000110001000000110011000101001111101011101111110111100000110001111000000000101111000010100011100111000011111100010001000001000100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101100111111111100001001110110011000000100011000000101010111011111111000110101000010000110000100110000001100000101010111010010111111000110001101001000010000010001111101101101100001011001001110110000011000000000000101110010000

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000000000000011001101001101011101011000100011010011100011000000010011000101100101010010110011011001000000010000110010111101111100111100001011000111011101101110001111011111111111111111111111010100111111101101010001000110101101100100010110000001110011100010100010110010001100010101011010000100111000000000000110011101101110010110111101111011100010000011000000110101010010101101101111111111101011011111011011111110011011110100011101010100001111101011001001001011110010000000011011010111100001011010001101110110111000110011000011000100010110000001110011100010100010110010001100100101110100000000000000100111101111101111000011001000000001101000011101101111111111101100111011001110001000100111000111001100100100101110111010010101110000111000100000111000110101101010110001010111111111010010010100111010101011000110000100001100100010000100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101100111111111100001001110110011000000100011000000101010111011111111000110101000010000110000100110000001100000101010111010010111111000110001101001000010000010001111101101101100001011001001110110000011000000000000101110010000

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000000000000011001101001101011101011000100011010011100011000000010011000101100101010010110011011001000000010000110010111101111101110100100001100000100010010001110100100000000000000000001101011001011000010010001100010110101010000100010110000001110011100010100010110010001100010101011010000001100001111111011000010100111110011111101101101101101111000111010000011001001010000000010111111101110011000000010000011010011001101110010001011001001111011100101000001011110001111111100110100001000010010100111101110110111000110001111100000100010110000001110011100010100010110010001100100101110100000000000000001101010101000110011101010111100000101111011011000000000000011010000100111010011110100101110000101000001011110000110110000001011000110101000110100101100101110111000010101000000000101011011101111001001110011110000000101011011110100100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101100111111111100001001110110011000000100011000000101010111011111111000110101000010000110000100110000001100000101010111010010111111000110001101001000010000010001111101101101100001011001001110110000011000000000000101110010000

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000100000001000100010100010100010100111011100011100011100111111101100111111010101010010110011011001000101011111001101000010000000110100011001001101011101101110001011100000000000000000000001010110011111001101010101001010110010000100010110000001110011100010100010110010001100010101011010000110110011111111000101100010101110101100001111001101111011110100000101010001110100011110111000000011010110111110111010110011101010110101110111000111011111011011111000001011110000111111100010100001111011111101001101110110111000110000011010100100010110000001110011100010100010110010001100100101110100000000000001000100010101000010011011001011010011010001010001011111111111011100011010111111100000110111000010101001101101111111001000110100001000001100000001000110110101100011001111011000000000101001001000000001010110110010000000010010100001000100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101101111101001100111001110110010111111010101000000101011001111111111011010101000010000110000100001111100011111010101100110100001000010110001101000110111111000100111111111101111110100010111110110000011000000000000101011001000

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000100000010110010010100010100010100111011001010011100011000000010011000101100101010010110011011001000000010000110010111101111110010010101000101011011101101110001000101111111110000000001011100100000001110100000101001001000010100100010110000001110011100010100010110010001100010101011010000111010100000000010000100111101110100110010100110011011101000101011101000000011011001101001111111111100001011111000101111010101111100011111000111010110000011110100110010100001101010000011010001011111010000010011101110110111000110000001011000100010110000001110011100010100010110010001100100101110100000111111110111110111010001111010000111110110111110111100110100111111111000001000100111001010111011100000011111100011011010000111110101000000010110100011101100100101010110100000111111000000000101010010110110100100111010100000101111111100000000100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101101111101001100111001110110010111111010101000000101011001111111111011010101000010000110000100001111100011111010101100110100001000010110001101000110111111000100111111111101111110100010111110110000011000000000000101011001000

View File

@ -0,0 +1 @@
100010110000001110011100010100010110010001100000100110111000001110011101000000000000011001101001101011101011000100011010011100011000000010011000101100101010010110011011001000000010000110010111101111110010010101110010111011101101110010110011111111111111111111001100111100000111000111011110001111001100100010110000001110011100010100010110010001100010101011010000001101000000000101100001100110001011100100101111000010101110000000110100111101011100001100000000011011000100000100000110010000010110000111011111011111111100001001111001011110000000000011011001010010101111000000010001001000110100111011011100100010110000001110011100010100010110010001100100101110100000111111111110001111001111001101001100001000011000100010101000000000000101110000100111111100110011100011011010111111001100000111110000100011000100110001101110111100110011001001010110111111111010100100001111110001110010111111010001111010010100100010110000001110011100010100010110010001100110110011100100011111100011001111010010010100011010011000000110000000000010110101010011011100010111100110001000011110000000000010101111101100011100101001011100111001010001100100011011111011001111000011000101010101010101001001010101010101010101010110011100100010110000001110011100010100010110010001101000110111011000010110000100110101100111111111100001001110110011000000100011000000101010111011111111000110101000010000110000100110000001100000101010111010010111111000110001101001000010000010001111101101101100001011001001110110000011000000000000101110010000

1
grkkgps-0.0/AUTHORS Normal file
View File

@ -0,0 +1 @@
Krzysztof Kamieniecki wrote all of kkGPS.

340
grkkgps-0.0/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

77
grkkgps-0.0/README Normal file
View File

@ -0,0 +1,77 @@
#
# Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
#
# This file is part of kkGPS.
#
# kkGPS is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# kkGPS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kkGPS; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
IMPORTANT
THIS IS A PROTOTYPE. THE CODE WILL CHANGE, FILES WILL BE REMOVED, CLASSES
WILL BE SLAUGHTERED.
BUILDING
To do a clean build of kkGPS
$ make clean all
Only standard GNU C++ libraries are used
Currently the correlator type is selected in the makefile by uncommenting
the appropriate line in this block in makefile
##########################################
#SELECT correlator type
#uncomment next line for generic c++ correlator
CORROBJ = gps_corr_generic.o
#uncomment next line for SSE1 optimized correlator
#CORROBJ = gps_corr_sse1.o
#uncomment next line for G4 altivec optimized correlator
#CORROBJ = gps_corr_g4_altivec.o
##########################################
EXECUTABLE FILES
The following executables will be generated
kkgps:
Runs the GPS receiver with a simulated set of six satellites. About
42 seconds into the simulation the download of the Ephemeris data will
be completed and the output will change to display satellite and user
position information.
testunit:
Tests a bunch of functions and classes as well as displaying
timing information for various critical routines (like the correlator)
testorbit:
Prints out 24 hours of position information for a satellite selected in
testorbit.cpp
The following executables will not be generated by default
async_parse:
Used to parse data files generated by the ASYNC program[1]
MISCELLANEOUS
There are six files named 273673_{09,21,22,23,26,29}.txt these contain
one frame of the C/A navigation message from their respective satellites.
These were acquired using a GARMIN GPSmap76S and the ASYNC program[1]
[1] http://artico.lma.fi.upm.es/numerico/miembros/antonio/async/
A program that downloads various types of raw data from GARMIN GPS
receivers.

3
grkkgps-0.0/THANKS Normal file
View File

@ -0,0 +1,3 @@
tebinumaATyahooDOTcom
Supplied a RINEX file and an xyzt data generated from it, that help to
fix some bugs in the Satellite position calculation code.

41
grkkgps-0.0/TODO Normal file
View File

@ -0,0 +1,41 @@
Review use of T_GD
problem with signal going below threshold losing C/A sync
try loading signal data as s16 all the way into the correlator
functions to see if this helps with bandwidth issues,
this will require s16->f32 conversion (sse?) at corr Func .
also try s16 for cos/sin + s8 for spreading code?
Display Lat, Long for user position
Decode Subframes 4 + 5
Update PRNS for atomosphere
...
Assembly / Intrinsic Correlators
TOW roll over mitigation in subframe/word syncronization
TOW for subframe is (msg.TOW + MAX_TOW - 1) % MAX_TOW
Kalmen filter
Real Data Processing:
PLL + DLL
AGC
Figure how to calculate corrilation threshold for real data
possible keep two sums one of correlator the other of abs(signal)
Real Hardware/Data
Altivec Correlator
DONE:
Replace library code with my own code for least squares routines / matrix inversion
Generates test data from Frames I got from Garmin GPS (Upconversion + Spreading)
Downconverstion, Despreading, Search & Tracking
Decode Subframes 1,2,3
Samples the correlators every second
Attempts to Calculate User position
Get orbits to work

114
grkkgps-0.0/async_parse.cpp Normal file
View File

@ -0,0 +1,114 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <cmath>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <iomanip>
#include <ctime>
#include <fstream>
#include <string>
#include <sstream>
#include "kkutils.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
try
{
if(argc > 2)
{
std::fstream f(argv[1],std::ios::in | std::ios::binary);
if(!f.is_open()) throw KKException("Could Not Open File");
u32 satId;
std::stringstream ss(argv[2]);
ss >> satId;
u32 lastSeq = 0xffffffff;
for(;;)
{
u8 id = 0;
u8 length = 0;
u8 buf[256];
f.read(reinterpret_cast<char*>(&id),1);
f.read(reinterpret_cast<char*>(&length),1);
if(length)
{
f.read(reinterpret_cast<char*>(buf),length);
buf[static_cast<int>(length)] = '\0';
}
if(f.eof()) break;
if(0x36 == id)
{
u32 const seq =
buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0];
u32 const msg =
buf[7] << 24 | buf[6] << 16 | buf[5] << 8 | buf[4];
u32 const svid =
static_cast<u32>(buf[8]) + 1;
if(svid == satId)
{
if((lastSeq != 0xffffffff) && ((seq - lastSeq) > 30))
{
for(u32 i = 0; i < (seq - lastSeq - 30); ++i)
std::cout << 'X';
}
if((lastSeq == 0xffffffff) && (0 != ((seq + 1500 - 30) % 1500)))
{
for(u32 i = 0; i < ((seq + 1500 - 30) % 1500); ++i)
std::cout << 'x';
}
for(s32 i = 29; i >= 0; --i)
std::cout << (1 & (msg >> i))?(c8)(1):(c8)(0);
lastSeq = seq;
//if we just precess the last word in a frame then start new line
if(0 == ((seq) % 1500)) std::cout << std::endl;
}
}
}
}
else
{
std::cerr << "Usage: async_parse <input file> <satelite id>";
}
}
catch(std::exception const& E)
{
std::cerr << E.what();
}
return 0;
}
//---------------------------------------------------------------------------

273
grkkgps-0.0/gps_corr.cpp Normal file
View File

@ -0,0 +1,273 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_corr.h"
#include "gps_corr_generic.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//GPSCorrelatorTrack::
//---------------------------------------------------------------------------
GPSCorrelatorTrack::GPSCorrelatorTrack(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber)
: GPSCorrelatorState(inSampleRate,inIntermediateFreq,inChipRate)
, chips_(inPrnNumber)
, trackingState_(tsIdle)
, intermediateFreq_(inIntermediateFreq)
, deltaSearchFreq_(200.0)
, minSearchFreq_(inIntermediateFreq - 20e3)
, maxSearchFreq_(inIntermediateFreq + 20e3)
, carrierFreq_(inIntermediateFreq)
{
reset();
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::reset()
{
trackingState_ = tsIdle;
codeSearchIndex_ = 0;
curVector_ = -1;
oldVector_ = -1;
confirmCount_ = 0;
lastFreqError_ = 0;
searchFreqBase_ = carrierFreq_;
searchFreqUpper_ = searchFreqBase_;
searchFreqLower_ = searchFreqBase_;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::start()
{
trackingState_ = tsSearch;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::prnNumberSet(
u32 const inPrnNumber)
{
chips_.generateChips(inPrnNumber);
}
//---------------------------------------------------------------------------
f64
GPSCorrelatorTrack::dopplerDeltaFreq()
const
{
return carrierFreqGet() - intermediateFreq_;
}
//---------------------------------------------------------------------------
bool
GPSCorrelatorTrack::doTrack(
f32 const*& inBegin,
f32 const* const inEnd)
{
//process block of data
switch(trackingState_)
{
case tsSearch:
chipResetOffset_ = 0;
chipBase_ = chips_.promptEarly_;
break;
default:
chipResetOffset_ = (2 << 16);
chipBase_ = chips_.promptEarlyMinusLate_;
break;
}
bool const dump = processGPSCorrelator(inBegin,inEnd,this);
if(dump)
{
u64 const currSamples = processedSamples_;
f32 const ip = dumpedSums_.ip_;
f32 const qp = dumpedSums_.qp_;
f32 const it = dumpedSums_.it_;
f32 const qt = dumpedSums_.qt_;
oldVector_ = curVector_;
curVector_ = cf64(ip,qp);
history_ <<= 1;
if(curVector_.real() > 0) history_ |= 1;
// f64 const npv = norm(curVector_);
f64 const npv = norm(cf64(ip+it,qp+qt));
f64 const threshold = 40e6 / (20e3 * 20e3);
if((tsIdle != trackingState_) && (npv < threshold))
{
trackingState_ = tsSearch;
}
switch(trackingState_)
{
case tsIdle:
{
}
break;
case tsSearch:
if(npv >= threshold)
{
trackingState_ = tsSearchConfirm;
confirmCount_ = 0;
}
else
{
++codeSearchIndex_;
if(codeSearchIndex_ >= 1024)
{ //completed code search at this frequency
//select new frequency
codeSearchIndex_ = 0;
bool const maxReached = (maxSearchFreq_ == searchFreqUpper_);
bool const minReached = (minSearchFreq_ == searchFreqLower_);
// bool const baseIsAtUpper = (searchFreqBase_ == searchFreqUpper_);
bool const baseIsAtLower = (searchFreqBase_ == searchFreqLower_);
if(maxReached && minReached)
{
trackingState_ = tsIdle;
}
else if(!maxReached && baseIsAtLower)
{
searchFreqUpper_ += deltaSearchFreq_;
searchFreqBase_ = searchFreqUpper_;
}
else
{
searchFreqLower_ -= deltaSearchFreq_;
searchFreqBase_ = searchFreqLower_;
}
carrierFreqSet(searchFreqBase_);
}
}
break;
case tsSearchConfirm:
{
++confirmCount_;
if(confirmCount_ > 5) trackingState_ = tsAdjustCarrierFrequency;
}
break;
case tsAdjustCarrierFrequency:
{
//adjust carrier frequency
f64 freqTheta = std::arg(curVector_ / oldVector_);
if(freqTheta > (M_PI * 0.5))
freqTheta -= M_PI;
if(freqTheta < (-M_PI * 0.5))
freqTheta += M_PI;
freqTheta *= (sampleRate_ / (2 * M_PI)) / currSamples;
f64 const freqError = freqTheta * pow(2.0,32) / sampleRate_;
f64 fet;
if(freqError > 0)
fet = floor(freqError + 0.5);
else
fet = ceil(freqError - 0.5);
carrierDelta_ += static_cast<u32>(fet);
trackingState_ = tsAdjustCarrierPhase;
}
break;
case tsAdjustCarrierPhase:
{
//adjust carrier phase
f64 phase_theta = arg(curVector_);
if(phase_theta > (M_PI * 0.5))
phase_theta -= M_PI;
if(phase_theta < (-M_PI * 0.5))
phase_theta += M_PI;
phase_theta *= (1 / (2 * M_PI));
f64 const phase_error = phase_theta * pow(2.0,32);
f64 pet;
if(phase_error > 0)
pet = floor(phase_error + 0.5);
else
pet = ceil(phase_error - 0.5);
carrierPhase_ += static_cast<u32>(pet);
confirmCount_ = 0;
trackingState_ = tsAdjustConfirm;
}
break;
case tsAdjustConfirm:
{
++confirmCount_;
if(confirmCount_ > 5) trackingState_ = tsTracking;
}
break;
case tsTracking:
{
//carrier frequency PLL
f64 freqTheta = atan2(qp,ip);
if(freqTheta > (M_PI * 0.5))
freqTheta -= M_PI;
if(freqTheta < (-M_PI * 0.5))
freqTheta += M_PI;
freqTheta *= (sampleRate_ / (2 * M_PI)) / currSamples;
f64 const freqError = freqTheta * pow(2.0,32) / sampleRate_;
/*
//eventual proper carrier loop filter
f64 const k_a = 0.6;
f64 const k_k = 0.05;
f64 static ynm1 = 0;
ynm1 = k_a * ynm1 + (1.0 - k_a) * freqError;
carrierDelta_ += k_k * ynm1;
*/
carrierDelta_ += static_cast<u32>(
0.1 * freqError + 0.2 * (freqError - lastFreqError_));
lastFreqError_ = freqError;
//code phase Lock Loop
cf64 const tv(it,qt);
cf64 const tDivP = tv / curVector_;
f64 const s = tDivP.real() + tDivP.imag();
chipPhase_ += static_cast<u32>((1<<16) * 0.5 * s);
}
break;
}
}
return dump; //dump did not occur
}
//---------------------------------------------------------------------------

427
grkkgps-0.0/gps_corr.h Normal file
View File

@ -0,0 +1,427 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_corrH
#define gps_corrH
//---------------------------------------------------------------------------
#include <vector>
#include <cmath>
#include "kkutils.h"
//---------------------------------------------------------------------------
/*
interleave prompt with each of the three other chip patterns
leave a 0 at the beggining of each chip pattern so we can advance one whole
chip during rough search, during normal mode, when we reach the last chip instead
of setting offset to zero chips set to one chip
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// 0 p/2 p 3p/4 2p
//cos 1 0 -1 0 1
//sin 0 1 0 -1 0
//-sin 0 -1 0 1 0
template<typename VA_,u32 BITS_>
class
CosData
{
public:
typedef VA_ Result;
enum {bits = BITS_};
enum {length = 1 << bits};
enum {mask = length - 1};
enum {negSinOffset = 1 << 30};
enum {negSinIndexOffset = negSinOffset >> (32 - bits)};
CosData()
{
for(u32 i = 0; i < length; ++i)
data_[i] = std::cos(M_PI * 2.0 * i / length);
}
static
inline
u32
cosineIndex(
u32 const inPhase)
{
return inPhase >> (32 - bits);
}
static
inline
u32
negSineIndex(
u32 const inPhase)
{
return ((inPhase >> (32 - bits)) + negSinIndexOffset) & mask;
}
inline
Result const*
cosine(
u32 const inPhase)
const
{
return data_ + cosineIndex(inPhase);
}
VA_ data_[length];
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
typedef CosData<f32,16> CarrierData;
static const CarrierData cosData;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
static const u32 g2Shift1[37] =
{2,3,4,5,1,2,1,2,3,2,3,5,6,7,8,9,1,2,3,4,5,6,1,4,5,6,7,8,1,2,3,4,5,4,1,2,4};
static const u32 g2Shift2[37] =
{6,7,8,9,9,10,8,9,10,3,4,6,7,8,9,10,4,5,6,7,8,9,3,6,7,8,9,10,6,7,8,9,10,10,7,8,10};
//---------------------------------------------------------------------------
template<typename IT_,typename VA_>
void
generateCACode(
u32 const inPrnNumber,
VA_ const inTrueValue,
VA_ const inFalseValue,
IT_ inBegin,
IT_ const inEnd)
{
if((0 == inPrnNumber) || (37 <= inPrnNumber))
{ //if out of range for valid PRN numbers set all to 1
for(u32 i = 0; (i < 1023) && (inBegin != inEnd); ++i)
{
*inBegin = inTrueValue;
++inBegin;
}
}
else
{ //valid PRN Number
u32 g1Code = ~0;
u32 g2Code = ~0;
for(u32 i = 0; (i < 1023) && (inBegin != inEnd); ++i)
{
//generate g1 bit
g1Code <<= 1;
u32 const g1CodeNewBit =
(g1Code >> 10) ^ (g1Code >> 3);
g1Code |= 1 & g1CodeNewBit;
//generate g2 bit
g2Code <<= 1;
u32 const g2CodeNewBit =
(g2Code >> 10) ^ (g2Code >> 9) ^ (g2Code >> 8) ^
(g2Code >> 6) ^ (g2Code >> 3) ^ (g2Code >> 2);
g2Code |= 1 & g2CodeNewBit;
u32 const caCodeNewBit =
(g1Code >> 10) ^
(g2Code >> g2Shift1[inPrnNumber-1]) ^
(g2Code >> g2Shift2[inPrnNumber-1]);
*inBegin = (1 & caCodeNewBit)?(inTrueValue):(inFalseValue);
++inBegin;
}
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorChips
{
public:
typedef f32 ValueType;
enum {bits = 11};
enum {length = 1 << bits};
enum {mask = length - 1};
GPSCorrelatorChips(
u32 const inPrnNumber)
{
generateChips(inPrnNumber);
}
void
generateChips(
u32 const inPrnNumber)
{
prnNumber_ = inPrnNumber;
std::vector<ValueType> ca(1023);
generateCACode(inPrnNumber,1,-1,ca.begin(),ca.end());
for(u32 i = 0; i < 2; ++i)
{
promptEarly_[i] = 0;
promptLate_[i] = 0;
promptEarlyMinusLate_[i] = 0;
promptEarly_[length + i] = 0;
promptLate_[length + i] = 0;
promptEarlyMinusLate_[length + i] = 0;
}
for(u32 i = 1; i < length / 2; ++i)
{
u32 const caIndex = i - 1;
u32 const arrIndex = 2 * i;
ValueType const prompt = ca[caIndex];
ValueType const next = ca[(caIndex + 1) % 1023];
ValueType const prev = ca[(caIndex + 1023 - 1) % 1023];
promptEarly_[arrIndex] = prompt;
promptEarly_[arrIndex+1] = prompt;
promptLate_[arrIndex] = prompt;
promptLate_[arrIndex+1] = prompt;
promptEarlyMinusLate_[arrIndex] = prompt;
promptEarlyMinusLate_[arrIndex+1] = prompt;
promptEarly_[length + arrIndex] = prompt;
promptEarly_[length + arrIndex+1] = next;
promptLate_[length + arrIndex] = prev;
promptLate_[length + arrIndex+1] = prompt;
promptEarlyMinusLate_[length + arrIndex] = prompt - prev;
promptEarlyMinusLate_[length + arrIndex+1] = next - prompt;
}
}
static
inline
u32
promptIndex(
u32 const chipPhase)
{
return (chipPhase >> 16) & mask;
}
static
inline
u32
trackIndex(
u32 const chipPhase)
{
return ((chipPhase >> 16) & mask) + length;
}
u32 prnNumber_;
ValueType promptEarly_[2 * length];
ValueType promptLate_[2 * length];
ValueType promptEarlyMinusLate_[2 * length];
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorState
{
public:
GPSCorrelatorState(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate)
: sampleRate_(inSampleRate)
, carrierPhase_(0)
, carrierDelta_(0)
, chipPhase_(0)
, chipDelta_(0)
, chipResetOffset_(0)
, processedSamples_(0)
, chipBase_(0)
, inProgress_(0)
{
carrierFreqSet(inCarrierFreq);
chipRateSet(inChipRate);
}
void
sampleRateSet(
f64 const inSampleRate)
{
//get sample rate independent carrier frequency
f64 const carrierFreq = carrierFreqGet();
//get sample rate independent chip rate
f64 const chipRate = chipRateGet();
//adjust sample rate
sampleRate_ = inSampleRate;
//set carrier frequency to value from before sample rate update
carrierFreqSet(carrierFreq);
//set chip rate to value from before sample rate update
chipRateSet(chipRate);
}
f64
carrierFreqGet()
const
{
return sampleRate_ * carrierDelta_ / std::pow(2.0,32);
}
void
carrierFreqSet(
f64 const inCarrierFreq)
{
carrierDelta_ = static_cast<u32>(inCarrierFreq * std::pow(2.0,32) / sampleRate_);
}
f64
chipRateGet()
const
{
return sampleRate_ * chipDelta_ / std::pow(2.0,16);
}
void
chipRateSet(
f64 const inChipRate)
{
chipDelta_ = static_cast<u32>(inChipRate * std::pow(2.0,16) / sampleRate_);
}
f64 sampleRate_;
u32 carrierPhase_;
u32 carrierDelta_;
u32 chipPhase_;
u32 chipDelta_;
u32 chipResetOffset_;
u64 processedSamples_;
GPSCorrelatorChips::ValueType* chipBase_;
bool inProgress_;
struct
Sums
{
Sums()
: ip_(0.0)
, qp_(0.0)
, it_(0.0)
, qt_(0.0)
{
};
void
set(
f32 const in_ip,
f32 const in_qp,
f32 const in_it,
f32 const in_qt)
{
ip_ = in_ip;
qp_ = in_qp;
it_ = in_it;
qt_ = in_qt;
}
void
get(
f32& in_ip,
f32& in_qp,
f32& in_it,
f32& in_qt)
const
{
in_ip = ip_;
in_qp = qp_;
in_it = it_;
in_qt = qt_;
}
f32 ip_,qp_,it_,qt_;
};
Sums runningSums_;
Sums dumpedSums_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorTrack
: public GPSCorrelatorState
{
public:
GPSCorrelatorTrack(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber);
void
reset();
void
start();
void
prnNumberSet(
u32 const inPrnNumber);
f64
dopplerDeltaFreq()
const;
bool
doTrack(
f32 const*& inBegin,
f32 const* const inEnd);
enum
TrackingState
{ tsIdle
, tsSearch
, tsSearchConfirm
, tsAdjustCarrierFrequency
, tsAdjustCarrierPhase
, tsAdjustConfirm
, tsTracking
};
GPSCorrelatorChips chips_;
TrackingState trackingState_;
f64 intermediateFreq_;
f64 deltaSearchFreq_;
f64 minSearchFreq_;
f64 maxSearchFreq_;
f64 carrierFreq_;
s32 codeSearchIndex_;
f64 searchFreqBase_;
f64 searchFreqUpper_;
f64 searchFreqLower_;
f64 lastFreqError_;
u32 history_;
cf64 curVector_;
cf64 oldVector_;
s32 confirmCount_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,109 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_corr.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
processGPSCorrelator(
f32 const*& inBegin,
f32 const* const inEnd,
GPSCorrelatorState* const ioState)
{
register f32 ip;
register f32 qp;
register f32 it;
register f32 qt;
ioState->runningSums_.get(ip,qp,it,qt);
f32 const* const orgBegin = inBegin;
register u32 carrierPhase = ioState->carrierPhase_;
const u32 carrierDelta = ioState->carrierDelta_;
register u32 chipPhase = ioState->chipPhase_;
const u32 chipDelta = ioState->chipDelta_;
register f32 const* carrierData = cosData.data_;
register GPSCorrelatorChips::ValueType const* chipBase = ioState->chipBase_;
if(!ioState->inProgress_)
{
chipPhase += ioState->chipResetOffset_;
ioState->processedSamples_ = 0;
}
// f32 register const* cosDataPntr = cosData.data_;
register f32 const* currPntr = inBegin;
while(currPntr != inEnd)
{
f32 register const d = *currPntr;
f32 register const c = *(carrierData + CarrierData::cosineIndex(carrierPhase));
f32 register const ns = *(carrierData + CarrierData::negSineIndex(carrierPhase));
f32 register const i = d * c;
f32 register const q = d * ns;
f32 register const p = *(chipBase + GPSCorrelatorChips::promptIndex(chipPhase));
f32 register const t = *(chipBase + GPSCorrelatorChips::trackIndex(chipPhase));
ip += i * p;
qp += q * p;
it += i * t;
qt += q * t;
carrierPhase += carrierDelta;
chipPhase += chipDelta;
++currPntr;
// if((chipPhase >> 16) & (~0 << 11))
//2^16 counts per half-chip,
//2^11-{0,2} half-chips per spreading code
if(chipPhase >> 27)
{ //dump
inBegin = currPntr;
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = (chipPhase & 0xFFFF);
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->runningSums_.set(0,0,0,0);
ioState->dumpedSums_.set(
ip / ioState->processedSamples_,
qp / ioState->processedSamples_,
it / ioState->processedSamples_,
qt / ioState->processedSamples_);
ioState->inProgress_ = false;
return true;
}
}
inBegin = currPntr;
ioState->runningSums_.set(ip,qp,it,qt);
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = chipPhase;
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->inProgress_ = true;
return false;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_corr_genericH
#define gps_corr_genericH
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
processGPSCorrelator(
f32 const*& inBegin,
f32 const* const inEnd,
GPSCorrelatorState* const ioState);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,131 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_corr.h"
#include <xmmintrin.h>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
processGPSCorrelator(
f32 const*& inBegin,
f32 const* const inEnd,
GPSCorrelatorState* const ioState)
{
//ip f[0]
//qp f[1]
//it f[2]
//qt f[3]
union
{
__m128 vec;
f32 f[4];
} convert;
ioState->runningSums_.get(convert.f[0],convert.f[1],convert.f[2],convert.f[3]);
register __m128 sum = convert.vec;
f32 const* const orgBegin = inBegin;
register f32 const* currPntr = inBegin;
register f32 const* const endPntr = inEnd;
register u32 carrierPhase = ioState->carrierPhase_;
register u32 const carrierDelta = ioState->carrierDelta_;
register u32 chipPhase = ioState->chipPhase_;
register u32 const chipDelta = ioState->chipDelta_;
register f32 const* carrierData = cosData.data_;
register f32 const* chipBase = ioState->chipBase_;
if(!ioState->inProgress_)
{
chipPhase += ioState->chipResetOffset_;
ioState->processedSamples_ = 0;
}
// f32 register const* cosDataPntr = cosData.data_;
while(currPntr != endPntr)
{
register __m128 data;
register __m128 cosine;
register __m128 cosnsin;
register __m128 nsine;
register __m128 promptCode;
register __m128 trackCode;
register __m128 despCode;
//data <- {*inBegin,*inBegin,*inBegin,*inBegin}
data = _mm_load_ps1(currPntr);
//cosnsin <- {cos,-sin,cos,-sin}
cosine = _mm_load_ss(carrierData + CarrierData::cosineIndex(carrierPhase));
nsine = _mm_load_ss(carrierData + CarrierData::negSineIndex(carrierPhase));
cosnsin = _mm_shuffle_ps(cosine,nsine,_MM_SHUFFLE(0,0,0,0));
cosnsin = _mm_shuffle_ps(cosnsin,cosnsin,_MM_SHUFFLE(2,0,2,0));
//despCode <- {prompt,prompt,track,track}
promptCode = _mm_load_ss(chipBase + GPSCorrelatorChips::promptIndex(chipPhase));
trackCode = _mm_load_ss(chipBase + GPSCorrelatorChips::trackIndex(chipPhase));
despCode = _mm_shuffle_ps(promptCode,trackCode,_MM_SHUFFLE(0,0,0,0));
++currPntr;
carrierPhase += carrierDelta;
chipPhase += chipDelta;
data = _mm_mul_ps(data,cosnsin);
data = _mm_mul_ps(data,despCode);
sum = _mm_add_ps(sum,data);
// if((chipPhase >> 16) & (~0 << 11))
//2^16 counts per half-chip,
//2^11-{0,2} half-chips per spreading code
if(chipPhase >> 27)
{ //dump
convert.vec = sum;
inBegin = currPntr;
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = (chipPhase & 0xFFFF);
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->runningSums_.set(0,0,0,0);
ioState->dumpedSums_.set(
convert.f[0] / ioState->processedSamples_,
convert.f[1] / ioState->processedSamples_,
convert.f[2] / ioState->processedSamples_,
convert.f[3] / ioState->processedSamples_);
ioState->inProgress_ = false;
return true;
}
}
convert.vec = sum;
inBegin = currPntr;
ioState->runningSums_.set(convert.f[0],convert.f[1],convert.f[2],convert.f[3]);
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = chipPhase;
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->inProgress_ = true;
return false;
}
//---------------------------------------------------------------------------

157
grkkgps-0.0/gps_display.cpp Normal file
View File

@ -0,0 +1,157 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_display.h"
#include <iostream>
#include <iomanip>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
DisplayMsgState(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData)
{
if(GPSCorrelatorMsgTrack::trMsgWord <= inResult)
{
u32 msgData = 0;
//display bit index
std::cout.setf(std::ios::dec,std::ios::basefield);
std::cout.precision(12);
std::cout << inData.spreadingCodeIndex_ / kSpreadingCodesPerBit << "\t"
<< inData.spreadingCodePhaseRemainder_ << "\t";
std::cout.setf(std::ios::hex,std::ios::basefield);
//display spreading code history
std::cout.width(5);
std::cout.fill('0');
std::cout << (0xFFFFF & inData.history_) << "\t";
if(checkWordParity(inData.msgWord_,msgData))
std::cout << 1;
else
std::cout << 0;
if(isPossibleTLMData(msgData))
std::cout << 1;
else
std::cout << 0;
std::cout << "\t";
std::cout.width(8);
std::cout.fill('0');
std::cout << inData.msgWord_ << "\t";
std::cout.width(8);
std::cout.fill('0');
std::cout << msgData;
std::cout << std::endl;
if(GPSCorrelatorMsgTrack::trMsgSubFrame == inResult)
{
s32 id;
s32 page;
SubFrame1 sf1;
SubFrame2 sf2;
SubFrame3 sf3;
if(SubFrameIDGet(inData.subFrameRaw_,id,page))
{
std::cout << "(id,page): (" << id << "," << page << ")";
switch(id)
{
case 1:
sf1.parse(inData.subFrameRaw_);
std::cout << std::endl << sf1.debugDump();
break;
case 2:
sf2.parse(inData.subFrameRaw_);
std::cout << std::endl << sf2.debugDump();
break;
case 3:
sf3.parse(inData.subFrameRaw_);
std::cout << std::endl << sf3.debugDump();
break;
}
}
else
{
std::cout << "Bad SubFrame" << std::endl;
}
}
std::cout.flush();
}
}
//---------------------------------------------------------------------------
void
DisplayCorrelatorState(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData)
{
if(GPSCorrelatorMsgTrack::trDump <= inResult)
{
f32 const ip = inData.dumpedSums_.ip_;
f32 const qp = inData.dumpedSums_.qp_;
f32 const it = inData.dumpedSums_.it_;
f32 const qt = inData.dumpedSums_.qt_;
std::cout
<< std::fixed << std::setprecision(1) << std::setw(8)
<< ip * 10000 << "\t"
<< qp * 10000 << "\t"
<< it * 10000 << "\t"
<< qt * 10000
<< "\t" << inData.carrierFreqGet()
<< "\t" << inData.trackingState_
<< "\t" << inData.processedSamples_
<< "\t" << inData.chipPhase_
;
std::cout << std::endl;
std::cout.flush();
}
}
//---------------------------------------------------------------------------
void
DisplaySpreadingCodeHistogram(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData)
{
if(GPSCorrelatorMsgTrack::trSpreadingCode <= inResult)
{
if(0 == (inData.spreadingCodeIndex_ % (30*20)))
{
std::cout << std::endl;
for(u32 i = 0; i < inData.spreadingCodeHistogram_.size(); ++i)
{
if(i) std::cout << ' ';
std::cout << inData.spreadingCodeHistogram_[i];
}
std::cout.flush();
}
}
}
//---------------------------------------------------------------------------

47
grkkgps-0.0/gps_display.h Normal file
View File

@ -0,0 +1,47 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_displayH
#define gps_displayH
//---------------------------------------------------------------------------
#include "gps_nav.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
DisplayMsgState(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData);
//---------------------------------------------------------------------------
void
DisplayCorrelatorState(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData);
//---------------------------------------------------------------------------
void
DisplaySpreadingCodeHistogram(
GPSCorrelatorMsgTrack::DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

326
grkkgps-0.0/gps_msg.cpp Normal file
View File

@ -0,0 +1,326 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_msg.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
isPossibleTLMWord(
u32 const inWord)
{
u32 static const kTLMPreamble = 0x8B << 22;
u32 static const kTLMPreambleMask = 0xFF << 22;
return (kTLMPreamble == (kTLMPreambleMask & inWord));
}
//---------------------------------------------------------------------------
bool
isPossibleTLMData(
u32 const inData)
{
u32 static const kTLMPreamble = 0x8B << 16;
u32 static const kTLMPreambleMask = 0xFF << 16;
return (kTLMPreamble == (kTLMPreambleMask & inData));
}
//---------------------------------------------------------------------------
//see Table 20-XIV "Parity Encoding Equation" in "ICD-GPS-200C 10 OCT 1993" spec
//input is u32 with bits MSB -> LSB (D29* D30* d1 d2 d3 .... d24 ? ? ? ? ? ?)
//D29* and D30* are bottom two parity bits from previous word
//output is u32 with bits MSB -> LSB (D29* D30* D1 D2 D3 .... D24 D25 D26 D27 D28 D29 D30)
u32
parityEncodingEquations(
u32 const inWord)
{
#define B(I_) ((inWord >> ((24 - I_) + 6)) & 1)
#define B29S ((inWord >> 31) & 1)
#define B30S ((inWord >> 30) & 1)
u32 result = inWord & (0xFFFFFF << 6); //result = 0 0 d1...d24 0 0 0 0 0 0
if(B30S) //if D30* == 1
result ^= (0xFFFFFF << 6); //xor d1..d24 in result
//D25 compute
result |= (B29S ^ B(1) ^ B(2) ^ B(3) ^ B(5) ^ B(6) ^ B(10) ^ B(11) ^ B(12)
^ B(13) ^ B(14) ^ B(17) ^ B(18) ^ B(20) ^ B(23)) << 5;
//D26 compute
result |= (B30S ^ B(2) ^ B(3) ^ B(4) ^ B(6) ^ B(7) ^ B(11) ^ B(12) ^ B(13)
^ B(14) ^ B(15) ^ B(18) ^ B(19) ^ B(21) ^ B(24)) << 4;
//D27 compute
result |= (B29S ^ B(1) ^ B(3) ^ B(4) ^ B(5) ^ B(7) ^ B(8) ^ B(12) ^ B(13)
^ B(14) ^ B(15) ^ B(16) ^ B(19) ^ B(20) ^ B(22)) << 3;
//D28 compute
result |= (B30S ^ B(2) ^ B(4) ^ B(5) ^ B(6) ^ B(8) ^ B(9) ^ B(13) ^ B(14)
^ B(15) ^ B(16) ^ B(17) ^ B(20) ^ B(21) ^ B(23)) << 2;
//D29 compute
result |= (B30S ^ B(1) ^ B(3) ^ B(5) ^ B(6) ^ B(7) ^ B(9) ^ B(10) ^ B(14)
^ B(15) ^ B(16) ^ B(17) ^ B(18) ^ B(21) ^ B(22) ^ B(24)) << 1;
//D30 compute
result |= (B29S ^ B(3) ^ B(5) ^ B(6) ^ B(8) ^ B(9) ^ B(10) ^ B(11) ^ B(13)
^ B(15) ^ B(19) ^ B(22) ^ B(23) ^ B(24)) << 0;
return result | ((3 << 30) & inWord); //put D29* and D30* back in result
#undef B30S
#undef B29S
#undef B
}
//---------------------------------------------------------------------------
bool
checkWordParity(
u32 const inWord,
u32& ouData)
{
u32 result = inWord; //setup D29* D30* D1...D24 for parity check
ouData = (inWord >> 6) & 0xFFFFFF; //setup D1...D24 for decodeing by caller
if((inWord >> 30) & 1) //if D30* == 1
{
result ^= (0xFFFFFF << 6); //xor D1...D24 in result d1...d24
ouData ^= 0xFFFFFF; //xor D1...D24 in result d1...d24
}
result = parityEncodingEquations(result);
return inWord == result;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//GPSCorrelatorMsgTrack::
//---------------------------------------------------------------------------
GPSCorrelatorMsgTrack::GPSCorrelatorMsgTrack(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate,
u32 const inPrnNumber)
: GPSCorrelatorTrack(inSampleRate,inCarrierFreq,inChipRate,inPrnNumber)
{
reset();
}
//---------------------------------------------------------------------------
void
GPSCorrelatorMsgTrack::reset()
{
GPSCorrelatorTrack::reset();
spreadingCodeIndex_ = 0;
spreadingCodeHistogram_.clear();
spreadingCodeHistogram_.resize(kSpreadingCodesPerBit);
msgWord_ = 0;
subFrameTrackState_ = ftsNoMatch;
subFrameEndBit_ = 0;
subFrameRaw_.clear();
}
//---------------------------------------------------------------------------
GPSCorrelatorMsgTrack::DoTrackResult
GPSCorrelatorMsgTrack::doTrack(
f32 const*& inBegin,
f32 const* const inEnd,
DoTrackDumpCallback const inCallback)
{
DoTrackResult result = trNone;
//process block of data
bool const dump = GPSCorrelatorTrack::doTrack(inBegin,inEnd);
if(dump) result = trDump;
if(dump && (trackingState_ == GPSCorrelatorTrack::tsTracking))
{
result = trSpreadingCode;
//msg bit tracking
if (0.0 > oldVector_.real() * curVector_.real())
++spreadingCodeHistogram_[spreadingCodeIndex_ % kSpreadingCodesPerBit];
++spreadingCodeIndex_;
spreadingCodePhaseRemainder_ = chipPhase_;
if(spreadingCodeIndex_ == 200)
{ //syncronise to message bit edges
//find most common SpreadingCode transition
u32 index = 0;
for(u32 i = 1; i < kSpreadingCodesPerBit; ++i)
if(spreadingCodeHistogram_[index] < spreadingCodeHistogram_[i])
index = i;
//clear SpreadingCode transition tracking vector
spreadingCodeHistogram_.clear();
spreadingCodeHistogram_.resize(kSpreadingCodesPerBit);
//adjust spreadingCodeIndex offset so bit edge occurs at
//kSpreadingCodesPerBit - 1 == spreadingCodeIndex_ % kSpreadingCodesPerBit
spreadingCodeIndex_ += kSpreadingCodesPerBit - 1 - index;
}
else if(spreadingCodeIndex_ > 200)
{
u32 const bitIndex = spreadingCodeIndex_ / kSpreadingCodesPerBit;
bool const bitMatch =
0 == ((spreadingCodeIndex_ + 1) % kSpreadingCodesPerBit);
if(bitMatch)
{
result = trMsgBit;
//construct 30-bit word + 2 previous word parity bits
msgWord_ <<= 1;
if(curVector_.real() > 0)
{
//eventually keep history of previous 20 SpreadingCode dumps
//then average/vote
msgWord_ |= 1;
}
//frame sync and construction
u32 msgData;
bool const parityMatch = checkWordParity(msgWord_,msgData);
bool const tlmMatch = parityMatch && isPossibleTLMData(msgData);
switch(subFrameTrackState_)
{
case ftsNoMatch:
if(parityMatch && tlmMatch)
{
subFrameTrackState_ = ftsProbation;
subFrameEndBit_ = bitIndex;
subFrameRaw_.words_[0] = msgWord_;
}
break;
case ftsProbation:
if(0 == (bitIndex - subFrameEndBit_) % kMsgBitsPerWord)
{
bool failed = true;
if(parityMatch)
{
u32 const wordIndex =
(bitIndex - subFrameEndBit_) / kMsgBitsPerWord;
if(wordIndex == 1)
{
failed = false;
//this is another check but it does not work with the sample nav mesasge
// failed = ((msgWord_ & 3) == 0);
subFrameRaw_.words_[wordIndex] = msgWord_;
}
else if(wordIndex < kMsgWordsPerSubFrame)
{
failed = false;
subFrameRaw_.words_[wordIndex] = msgWord_;
}
else if(wordIndex == kMsgWordsPerSubFrame)
{
failed = !tlmMatch;
subFrameRaw_.words_[0] = msgWord_;
}
else if(wordIndex == (kMsgWordsPerSubFrame + 1))
{
u32 TLM1st;
checkWordParity(subFrameRaw_.words_[1],TLM1st);
u32 const truncatedZCount = (msgData >> 7) & 0x1FFFF;
//this Truncated Z-Count must be one more
//then the Truncated Z-Count for the previous SubFrame
failed = truncatedZCount != (((TLM1st >> 7) + 1) & 0x1FFFF);
if(!failed)
{
subFrameRaw_.words_[1] = msgWord_;
// goto tracking mode but drop previous subframe
subFrameTrackState_ = ftsTracking;
spreadingCodeIndex_ = kSpreadingCodesPerBit *
(truncatedZCount * 6 * 50 - kMsgBitsPerWord * 8) - 1;
}
}
}
if(failed)
{ //expected word checks
subFrameEndBit_ = 0;
subFrameRaw_.clear();
subFrameTrackState_ = ftsNoMatch;
}
}
break;
case ftsTracking:
if(0 == (bitIndex + 1) % kMsgBitsPerWord)
{
u32 const wordIndex =
(bitIndex % (kMsgBitsPerWord * kMsgWordsPerSubFrame)) / kMsgBitsPerWord;
subFrameRaw_.words_[wordIndex] = msgWord_;
if(wordIndex == (kMsgWordsPerSubFrame - 1))
{
//reset spreading code index based on truncated Z count
//in message.
u32 TLM1st;
checkWordParity(subFrameRaw_.words_[1],TLM1st);
u32 const truncatedZCount = (TLM1st >> 7) & 0x1FFFF;
spreadingCodeIndex_ =
kSpreadingCodesPerBit * truncatedZCount * 6 * 50 - 1;
result = trMsgSubFrame;
}
else
{
result = trMsgWord;
}
}
break;
}
}
}
}
if(inCallback) inCallback(result,*this);
return result;
}
//---------------------------------------------------------------------------
f64
GPSCorrelatorMsgTrack::satTimeOfWeek()
const
{
//calculate approximate fractional spreadingCode value
f64 satTime = chipPhase_ - spreadingCodePhaseRemainder_;
//remove chip offset used during normal tracking
if(inProgress_) satTime -= chipResetOffset_;
//convert from Chip Phase to Spreading Codes
satTime /= (1 << 16) * (1 << 11) - chipResetOffset_;
//add in spreading code of week value
satTime += spreadingCodeIndex_;
//convert from Spreading Codes to Seconds
satTime /= kSpreadingCodesPerSecond;
return satTime;
}
//---------------------------------------------------------------------------

146
grkkgps-0.0/gps_msg.h Normal file
View File

@ -0,0 +1,146 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_msgH
#define gps_msgH
//---------------------------------------------------------------------------
#include "gps_corr.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
u32 static const kSpreadingCodesPerBit = 20;
u32 static const kMsgBitsPerWord = 30;
u32 static const kMsgWordsPerSubFrame = 10;
u32 static const kMsgBitsPerSecond = 50;
u32 static const kSpreadingCodesPerSecond = kSpreadingCodesPerBit * kMsgBitsPerSecond;
u32 static const kSecondsPerWeek = 7 * 24 * 60 * 60;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
isPossibleTLMWord(
u32 const inWord);
//---------------------------------------------------------------------------
bool
isPossibleTLMData(
u32 const inData);
//---------------------------------------------------------------------------
u32
parityEncodingEquations(
u32 const inWord);
//---------------------------------------------------------------------------
bool
checkWordParity(
u32 const inWord,
u32& ouData);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
SubFrameRaw
{
SubFrameRaw()
{
clear();
}
void
clear()
{
std::memset(words_,0,sizeof(words_));
}
/*
bitOfWeek
lastBitEndSampleNumber
lastBitEndCodePhase
lastBitEndCarrierPhase
*/
u32 words_[kMsgWordsPerSubFrame];
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorMsgTrack
: public GPSCorrelatorTrack
{
public:
GPSCorrelatorMsgTrack(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate,
u32 const inPrnNumber);
void
reset();
enum
DoTrackResult
{ trNone
, trDump
, trSpreadingCode
, trMsgBit
, trMsgWord
, trMsgSubFrame
};
typedef void (*DoTrackDumpCallback)(
DoTrackResult const inResult,
GPSCorrelatorMsgTrack const& inData);
DoTrackResult
doTrack(
f32 const*& inBegin,
f32 const* const inEnd,
DoTrackDumpCallback const inCallback = 0);
f64
satTimeOfWeek()
const;
u32 spreadingCodeIndex_; //keeps track of number of spreadingCodes processed
u32 spreadingCodePhaseRemainder_; //keeps track of Spreading Code Phase Register at last dump
//msg bit tracking i.e. every 20 spreadingCode cycles
std::vector<u32> spreadingCodeHistogram_; //array for tracking bit edges
//word tracking
u32 msgWord_; //stores work bits of message word decoding
//subframe tracking
enum
FrameTrackState
{ ftsNoMatch
, ftsProbation
, ftsTracking
};
FrameTrackState subFrameTrackState_;
u32 subFrameEndBit_;
SubFrameRaw subFrameRaw_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif // gps_msgH

1002
grkkgps-0.0/gps_nav.cpp Normal file

File diff suppressed because it is too large Load Diff

411
grkkgps-0.0/gps_nav.h Normal file
View File

@ -0,0 +1,411 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_navH
#define gps_navH
//---------------------------------------------------------------------------
#include "gps_msg.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
Invert4x4Matrix( f64 *mat, f64 *dst);
//---------------------------------------------------------------------------
//all reference to sections is to the GPS standard ICD-GPS-200C 10/OCT/1993
/*
* msg word bits are label as follows
* MSb LSb
* XX000000000111111111122222222223
* XX123456789012345678901234567890
* XXDataDataDataDataDataDataParity
*
* msg data bits are label as follows
* MSb LSb
* XXXXXXXX000000000111111111122222
* XXXXXXXX123456789012345678901234
* XXXXXXXXDataDataDataDataDataData
*/
//---------------------------------------------------------------------------
//desc: Will parse a GPS nav message and extract a value from 1 or 2
// words. Bit addresses are in GPS Notation GPS bit 1 is normal
// bit 23 (base 0) and GPS bit 24 is normal bit 0 (base 0)
//---------------------------------------------------------------------------
s32
parseMsgDataS32(
u32 const inMsbWord,
u32 const inMsbFirstBit,
u32 const inMsbLastBit,
u32 const inLsbWord = 0,
u32 const inLsbFirstBit = 0,
u32 const inLsbLastBit = 0);
//---------------------------------------------------------------------------
u32
parseMsgDataU32(
u32 const inMsbWord,
u32 const inMsbFirstBit,
u32 const inMsbLastBit,
u32 const inLsbWord = 0,
u32 const inLsbFirstBit = 0,
u32 const inLsbLastBit = 0);
//---------------------------------------------------------------------------
f64
parseMsgDataSF64(
s32 const inScale,
u32 const inMsbWord,
u32 const inMsbFirstBit,
u32 const inMsbLastBit,
u32 const inLsbWord = 0,
u32 const inLsbFirstBit = 0,
u32 const inLsbLastBit = 0);
//---------------------------------------------------------------------------
f64
parseMsgDataUF64(
s32 const inScale,
u32 const inMsbWord,
u32 const inMsbFirstBit,
u32 const inMsbLastBit,
u32 const inLsbWord = 0,
u32 const inLsbFirstBit = 0,
u32 const inLsbLastBit = 0);
//---------------------------------------------------------------------------
bool
SubFrameIDGet(
SubFrameRaw const& inSubFrame,
s32& ouSubFrameID,
s32& ouPage);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
SubFrameBase
{
public:
virtual
bool
parse(
SubFrameRaw const& inSubFrame);
virtual
std::string
debugDump();
//sub-frame data
//preamble //word 1 : bit 1 - 8
u32 telemetryMessage_; //word 1 : bit 9 - 22
//reserved //word 1 : bit 23 - 24
u32 truncatedTowCount_; //word 2 : bit 1 - 17
bool alertFlag_; //word 2 : bit 18
bool antiSpoofFlag_; //word 2 : bit 19
u32 subFrameId_; //word 2 : bit 20 - 22
//parity adjustment //word 2 : bit 23 - 24
};
//---------------------------------------------------------------------------
struct
SubFrame1Data
{
//sub-frame data
u32 gpsWeekNumber_; //word 3 : bit 1 - 10
u32 codesOnL2_; //word 3 : bit 11 - 12
u32 svAccuracy_; //word 3 : bit 13 - 16 //section 20.3.3.3.1.3
bool svHealthSummary_; //word 3 : bit 17
u32 svHealth_; //word 3 : bit 18 - 22
//IODC //section 20.3.3.3.1.5
u32 IODC_; //word 3 : bit 23 - 24 MSbs
//word 8 : bit 1 - 8 LSbs
bool pCodeOffOnL2_; //word 4 : bit 1
//reserved //word 4 : bit 2 - 24
//reserved //word 5 : bit 1 - 24
//reserved //word 6 : bit 1 - 24
//reserved //word 7 : bit 1 - 16
f64 T_GD_; //word 7 : bit 17 - 24 //scale 2^-31
//IODC LSb //word 8 : bit 1 - 8
u32 t_oc_; //word 8 : bit 9 - 24 //scale 2^4
f64 a_f2_; //word 9 : bit 1 - 8 //scale 2^-55
f64 a_f1_; //word 9 : bit 9 - 24 //scale 2^-43
f64 a_f0_; //word 10 : bit 1 - 22 //scale 2^-31
//parity adjustment //word 10 : bit 23 - 24
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
SubFrame2Data
{
//sub-frame data
u32 sf2IODE_; //word 3 : bit 1 - 8
f64 C_rs_; //word 3 : bit 9 - 24 //scale 2^-5
f64 deltan_; //word 4 : bit 1 - 16 //scale 2^-43
f64 M_0_; //word 4 : bit 17 - 24 //MSbs //scale 2^-31
//word 5 : bit 1 - 24 //LSbs
f64 C_uc_; //word 6 : bit 1 - 16 //scale 2^-29
f64 e_; //word 6 : bit 17 - 24 //MSbs //scale 2^-33
//word 7 : bit 1 - 24 //LSbs
f64 C_us_; //word 8 : bit 1 - 16 //scale 2^-29
f64 sqrtA_; //word 8 : bit 17 - 24 //MSbs //scale 2^-19
//word 9 : bit 1 - 24 //LSbs
f64 t_oe_; //word 10 : bit 1 - 16 //scale 2^4
bool fitIntervalFlag_; //word 10 : bit 17
u32 AODO_; //word 10 : bit 18 - 22
//parity adjustment //word 10 : bit 23 - 24
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
SubFrame3Data
{
//sub-frame data
f64 C_ic_; //word 3 : bit 1 - 16 //scale 2^-29
f64 omega_0_; //word 3 : bit 17 - 24 //MSbs //scale 2^-31
//word 4 : bit 1 - 24 //LSbs
f64 C_is_; //word 5 : bit 1 - 16 //scale 2^-29
f64 i_0_; //word 5 : bit 17 - 24 //MSbs //scale 2^-31
//word 6 : bit 1 - 24 //LSbs
f64 C_rc_; //word 7 : bit 1 - 16 //scale 2^-5
f64 w_; //word 7 : bit 17 - 24 //MSbs //scale 2^-31
//word 8 : bit 1 - 24 //LSbs
f64 dot_omega_; //word 9 : bit 1 - 24 //scale 2^-43
u32 sf3IODE_; //word 10 : bit 1 - 8
f64 IDOT_; //word 10 : bit 9 - 22 //scale 2^-43
//parity adjustment //word 10 : bit 23 - 24
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
SubFrame1
: public SubFrameBase
, public SubFrame1Data
{
public:
virtual
bool
parse(
SubFrameRaw const& inSubFrame);
virtual
std::string
debugDump();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
SubFrame2
: public SubFrameBase
, public SubFrame2Data
{
public:
virtual
bool
parse(
SubFrameRaw const& inSubFrame);
virtual
std::string
debugDump();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
SubFrame3
: public SubFrameBase
, public SubFrame3Data
{
public:
virtual
bool
parse(
SubFrameRaw const& inSubFrame);
virtual
std::string
debugDump();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class FourDPos
{
public:
FourDPos()
: x(0.0)
, y(0.0)
, z(0.0)
, t(0.0)
{
}
FourDPos(
f64 const inX,
f64 const inY,
f64 const inZ,
f64 const inT)
: x(inX)
, y(inY)
, z(inZ)
, t(inT)
{
}
f64 x;
f64 y;
f64 z;
f64 t;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
Ephemeris
: public SubFrame1Data
, public SubFrame2Data
, public SubFrame3Data
{
public:
Ephemeris();
void
reset();
bool
ephemerisValid()
const;
void
processSubFrameRaw(
SubFrameRaw const& inSubFrameRaw);
void
debugLoadCAMsg(
c8 const* const inFileName);
void
calculateDeltaSVTimeAndEkFromGPSTime(
f64 const inT_GPS,
f64& ouDeltaT_sv,
f64& ouE_k)
const;
FourDPos
findPos(
f64 const inTtr_SV)
const;
protected:
bool ephemerisValid_;
SubFrame1 preliminarySF1_;
SubFrame2 preliminarySF2_;
SubFrame3 preliminarySF3_;
void
preliminarySubFramesProcess();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
struct
ChannelSetup
{
ChannelSetup(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate,
u32 const inPrnNumber);
ChannelSetup(
ChannelSetup const& inOther);
f64 sampleRate_;
f64 carrierFreq_;
f64 chipRate_;
u32 prnNumber_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
Channel
{
public:
Channel(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate,
u32 const inPrnNumber);
Channel(
ChannelSetup const& inSetup);
void
processData(
f32 const* inBegin,
f32 const* const inEnd,
GPSCorrelatorMsgTrack::DoTrackDumpCallback const inCallback = 0);
void
reset();
void
reset(
u32 const inPrnNumber);
void
start();
GPSCorrelatorMsgTrack signalTrack_;
Ephemeris ephemeris_;
f64 lastSatTtr_;
};
//---------------------------------------------------------------------------
typedef std::vector<Channel> ChannelVector;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void LeastSqFit(
f64* ouDX,
FourDPos& inPosition,
std::vector<f64>& inSatX,
std::vector<f64>& inSatY,
std::vector<f64>& inSatZ,
std::vector<f64>& inPRN);
//---------------------------------------------------------------------------
bool findPosition(
FourDPos& ioPosition,
ChannelVector const& inChannels);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,165 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_receiver.h"
#include <iostream>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//GPS_Receiver::
//---------------------------------------------------------------------------
GPS_Receiver::GPS_Receiver(
u32 const inChannelCount,
ChannelSetup const& inChannelSetup)
: sampleIndex_(0)
, userPosition_()
, channelSetup_(inChannelSetup)
, chs_(inChannelCount,inChannelSetup)
, inactivePrns_()
{
inactivePrns_.push_back(9);
inactivePrns_.push_back(21);
inactivePrns_.push_back(22);
inactivePrns_.push_back(23);
inactivePrns_.push_back(26);
inactivePrns_.push_back(29);
// for(u32 i = 1; i <= 33; ++i)
// inactivePrns_.push_back(i);
}
//---------------------------------------------------------------------------
GPS_Receiver::~GPS_Receiver()
{
}
//---------------------------------------------------------------------------
void
GPS_Receiver::processData(
f32 const* inBegin,
f32 const* const inEnd)
{
//update position at once per second
u32 const kPositionProcessDelta =
static_cast<u32>(channelSetup_.sampleRate_ / 1);
//samplesPerWeek used to wrap sampleIndex_
u64 const samplesPerWeek =
static_cast<u64>(kSecondsPerWeek * channelSetup_.sampleRate_);
while(inBegin != inEnd)
{
//if at desired user time then we sample
if(0 == (sampleIndex_ % kPositionProcessDelta))
{
f64 const receiverTime = sampleIndex_ / channelSetup_.sampleRate_;
//manage channels
for(u32 i = 0; i < chs_.size(); ++i)
switch(chs_[i].signalTrack_.trackingState_)
{
case GPSCorrelatorTrack::tsIdle:
{
u32 const oldPrn = chs_[i].signalTrack_.chips_.prnNumber_;
if(oldPrn) inactivePrns_.push_back(oldPrn);
chs_[i].reset(inactivePrns_.front());
chs_[i].start();
inactivePrns_.pop_front();
}
break;
default:
//store T_transmit(SV) at T_receive(User)
chs_[i].lastSatTtr_ = chs_[i].signalTrack_.satTimeOfWeek();
break;
}
std::cerr << "-----------------------------------------" << std::endl;
//process position
findPosition(userPosition_,chs_);
//display GPS State
std::cerr.precision(10);
std::cerr
<< "ReceiverTime: " << receiverTime
<< std::endl
<< " uX: " << userPosition_.x
<< " uY: " << userPosition_.y
<< " uZ: " << userPosition_.z
<< " uT: " << userPosition_.t
<< std::endl
<< " uLat: "
<< " uLon: "
<< std::endl;
std::cerr
<< "channel\t""svid\t""freq.\t""t.state\t""f.state\t""TOW(sv)" << std::endl;
for(u32 i = 0; i < chs_.size(); ++i)
{
std::cerr.precision(5);
std::cerr
<< i << "\t"
<< chs_[i].signalTrack_.chips_.prnNumber_ << "\t"
<< chs_[i].signalTrack_.dopplerDeltaFreq() << "\t"
<< chs_[i].signalTrack_.trackingState_ << "\t"
<< chs_[i].signalTrack_.subFrameTrackState_ << "\t";
std::cerr.precision(10);
std::cerr
<< chs_[i].signalTrack_.satTimeOfWeek() << std::endl;
}
for(u32 i = 0; i < chs_.size(); ++i)
{
if(chs_[i].ephemeris_.ephemerisValid())
{
std::cerr.precision(10);
FourDPos p = chs_[i].ephemeris_.findPos(chs_[i].lastSatTtr_);
std::cerr
<< chs_[i].signalTrack_.chips_.prnNumber_
<< "\tx: " << p.x << "\ty: " << p.y
<< "\tz: " << p.z << "\tt: " << p.t
<< std::endl;
}
}
}
//only process data until next user sample time
u32 const sampleCount = std::min(
static_cast<u32>((kPositionProcessDelta - sampleIndex_ % kPositionProcessDelta)),
static_cast<u32>(inEnd - inBegin));
for(u32 i = 0; i < chs_.size(); ++i)
{
chs_[i].processData(inBegin,inBegin + sampleCount,0);
//DisplayMsgState
//DisplayCorrelatorState
//DisplaySpreadingCodeHistogram
}
inBegin += sampleCount;
sampleIndex_ += sampleCount;
if(sampleIndex_ > samplesPerWeek) sampleIndex_ -= samplesPerWeek;
}
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,54 @@
//---------------------------------------------------------------------------
//Copyright (C) 2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "kkutils.h"
#include <deque>
#include "gps_nav.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class GPS_Receiver
{
public:
typedef std::deque<u32> u32Deque;
GPS_Receiver(
u32 const inChannelCount,
ChannelSetup const& inChannelSetup);
virtual
~GPS_Receiver();
void
processData(
f32 const* inBegin,
f32 const* const inEnd);
protected:
u64 sampleIndex_;
FourDPos userPosition_;
ChannelSetup channelSetup_;
ChannelVector chs_;
u32Deque inactivePrns_;
};
//---------------------------------------------------------------------------

80
grkkgps-0.0/kkutils.h Normal file
View File

@ -0,0 +1,80 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef kkutilsH
#define kkutilsH
//---------------------------------------------------------------------------
#include <complex>
#include <exception>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
typedef char c8;
typedef float f32;
typedef double f64;
typedef signed char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef long s32;
typedef unsigned long u32;
typedef signed long long s64;
typedef unsigned long long u64;
typedef std::complex<f64> cf64;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
KKException
: public std::exception
{
public:
KKException(
std::string const& inStr)
: whatString_(inStr)
{
}
virtual
~KKException()
throw()
{
}
c8 const*
what()
const
throw()
{
return whatString_.c_str();
}
protected:
std::string whatString_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#define M_KK_ASSERT(COND_) do {if(!(COND_)) throw KKException("ASSERT FAILED: "#COND_);} while(false)
//---------------------------------------------------------------------------
#endif

201
grkkgps-0.0/main.cpp Normal file
View File

@ -0,0 +1,201 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <iostream>
#include <fstream>
#include "gps_receiver.h"
//---------------------------------------------------------------------------
std::string
printBits(
u32 const& in_value)
{
std::string result;
for(s32 i = 31; i >= 0; --i)
if(1 & (in_value >> i))
result += '1';
else
result += '0';
return result;
}
//---------------------------------------------------------------------------
void
loadCAMessage(
c8 const* const inFile,
c8* const ioBuf,
u32 const inSize)
{
std::fstream f(inFile,std::ios::in | std::ios::binary);
if(!f.is_open()) throw KKException("Could Not Open C/A Message File");
f.read(ioBuf,inSize);
if(!f.good()) throw KKException("Could Not Read C/A Message File");
for(u32 i = 0; i < inSize; ++i)
ioBuf[i] = ('1' == ioBuf[i])?1:-1;
}
//---------------------------------------------------------------------------
//does tracking. continuosly reports
// <prompt I> <prompt Q> <track I> <track Q> <current carrier freq> <state>
void
testGPSTrack()
{
//load C/A message from file gotten from Async downalod from gps reciever
c8 CAMessage09[1500];
c8 CAMessage21[1500];
c8 CAMessage22[1500];
c8 CAMessage23[1500];
c8 CAMessage26[1500];
c8 CAMessage29[1500];
loadCAMessage("273673_09.txt",CAMessage09,sizeof(CAMessage09));
loadCAMessage("273673_21.txt",CAMessage21,sizeof(CAMessage21));
loadCAMessage("273673_22.txt",CAMessage22,sizeof(CAMessage22));
loadCAMessage("273673_23.txt",CAMessage23,sizeof(CAMessage23));
loadCAMessage("273673_26.txt",CAMessage26,sizeof(CAMessage26));
loadCAMessage("273673_29.txt",CAMessage29,sizeof(CAMessage29));
//GPS signal Simulation + processing
u32 const Fs_u32 = 5000000; //Sample Frequency
f64 const Fs = Fs_u32; //Sample Frequency Again
u32 const chipFs_u32 = 2046000; //1/2 Chip Frequency
f64 const chipFs = chipFs_u32; //1/2 Chip Frequency Again
f64 sourceFreq = 1.25e6 + 45; //simulator carrier frequency
std::vector<f32> inputData(16*1024); //simulator data buffer
GPSCorrelatorChips prn09(9); //simulator chip generator
GPSCorrelatorChips prn21(21); //simulator chip generator
GPSCorrelatorChips prn22(22); //simulator chip generator
GPSCorrelatorChips prn23(23); //simulator chip generator
GPSCorrelatorChips prn26(26); //simulator chip generator
GPSCorrelatorChips prn29(29); //simulator chip generator
GPSCorrelatorState source(Fs,sourceFreq,chipFs); //used for simulator NCOs
u32 phase = cosData.negSinOffset / 2; //simulator carrier phase offset
u32 chipPhase = 2 << 15; //simulator chip phase offset
u32 messageCodeCount = 0; //simulator spreading code counter
u32 messageBitCount = 0; //simulator message bit count
u32 const receiverChannels = 6;
GPS_Receiver gpsRx(receiverChannels,ChannelSetup(Fs,1.25e6,chipFs,0));
while(true)
{
//generate block of data
u32 const inputLength = inputData.size();
for(u32 i = 0; i < inputLength; ++i)
{
inputData[i] = 0;
//carrier and spreading code
f64 data09 =
*(cosData.cosine(phase)) *
prn09.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data09 *= CAMessage09[messageBitCount];
inputData[i] += data09;
//carrier and spreading code
f64 data21 =
*(cosData.cosine(phase)) *
prn21.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data21 *= CAMessage21[messageBitCount];
inputData[i] += data21;
//carrier and spreading code
f64 data22 =
*(cosData.cosine(phase)) *
prn22.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data22 *= CAMessage22[messageBitCount];
inputData[i] += data22;
//carrier and spreading code
f64 data23 =
*(cosData.cosine(phase)) *
prn23.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data23 *= CAMessage23[messageBitCount];
inputData[i] += data23;
//carrier and spreading code
f64 data26 =
*(cosData.cosine(phase)) *
prn26.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data26 *= CAMessage26[messageBitCount];
inputData[i] += data26;
//carrier and spreading code
f64 data29 =
*(cosData.cosine(phase)) *
prn29.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
data29 *= CAMessage29[messageBitCount];
inputData[i] += data29;
//uniform distribution noise
// inputData[i] += 2.0 * std::rand() / RAND_MAX - 1.0;
//eventual gaussian distribution noise
// inputData[i] += RandG(100.0,10);
phase += source.carrierDelta_;
chipPhase += source.chipDelta_;
//handle updating message bit
if(chipPhase >= (2046 << 16))
{
++messageCodeCount;
if(messageCodeCount >= 20)
{
messageCodeCount = 0;
++messageBitCount;
if(messageBitCount >= 1500)
messageBitCount = 0;
}
}
chipPhase %= 2046 << 16;
}
f32 const* dataBegin = &*inputData.begin();
f32 const* const dataEnd = &*inputData.end();
gpsRx.processData(dataBegin,dataEnd);
}
}
//---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
try
{
testGPSTrack();
}
catch(std::exception const& E)
{
std::cerr << "\nERROR: " << E.what() << std::endl;
return 1;
}
return 0;
}
//---------------------------------------------------------------------------

93
grkkgps-0.0/makefile Normal file
View File

@ -0,0 +1,93 @@
#
# Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
#
# This file is part of kkGPS.
#
# kkGPS is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# kkGPS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kkGPS; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
CXX = g++
CXXFLAGS = -fmessage-length=0 -Wall -g -O2
#CXXFLAGS = -fmessage-length=0 -Wall -g
##########################################
#SELECT correlator type
#uncomment next line for generic c++ correlator
CORROBJ = gps_corr_generic.o
#uncomment next line for SSE1 optimized correlator
#CORROBJ = gps_corr_sse1.o
#uncomment next line for G4 altivec optimized correlator
#CORROBJ = gps_corr_g4_altivec.o
##########################################
all: kkgps testunit testorbit #async_parse
clean:
rm -f main.o testunit.o testorbit.o gps_corr.o gps_msg.o gps_nav.o \
gps_display.o gps_receiver.o gps_corr_generic.o gps_corr_sse1.o async_parse.o \
gps_corr_g4_altivec.o
kkgps: main.o gps_corr.o gps_msg.o gps_nav.o gps_display.o gps_receiver.o $(CORROBJ)
$(CXX) -o kkgps main.o gps_corr.o gps_msg.o gps_nav.o gps_display.o gps_receiver.o $(CORROBJ)
testunit: testunit.o gps_corr.o gps_msg.o gps_nav.o $(CORROBJ)
$(CXX) -o testunit testunit.o gps_corr.o gps_msg.o gps_nav.o $(CORROBJ)
testorbit: testorbit.o gps_corr.o gps_msg.o gps_nav.o $(CORROBJ)
$(CXX) -o testorbit testorbit.o gps_corr.o gps_msg.o gps_nav.o $(CORROBJ)
async_parse: async_parse.o
$(CXX) -o async_parse async_parse.o
main.o: main.cpp
$(CXX) $(CXXFLAGS) -c main.cpp
testunit.o: testunit.cpp
$(CXX) $(CXXFLAGS) -c testunit.cpp
testorbit.o: testorbit.cpp
$(CXX) $(CXXFLAGS) -c testorbit.cpp
gps_corr.o: gps_corr.cpp
$(CXX) $(CXXFLAGS) -c gps_corr.cpp
gps_corr_generic.o: gps_corr_generic.cpp
$(CXX) $(CXXFLAGS) -c gps_corr_generic.cpp
gps_corr_sse1.o: gps_corr_sse1.cpp
$(CXX) $(CXXFLAGS) -msse -c gps_corr_sse1.cpp
gps_corr_g4_altivec.o: gps_corr_g4_altivec.cpp
$(CXX) $(CXXFLAGS) -altivec -c gps_corr_g4_altivec.cpp
gps_msg.o: gps_msg.cpp
$(CXX) $(CXXFLAGS) -c gps_msg.cpp
gps_nav.o: gps_nav.cpp
$(CXX) $(CXXFLAGS) -c gps_nav.cpp
gps_display.o: gps_display.cpp
$(CXX) $(CXXFLAGS) -c gps_display.cpp
gps_receiver.o: gps_receiver.cpp
$(CXX) $(CXXFLAGS) -c gps_receiver.cpp
async_parse.o: async_parse.cpp
$(CXX) $(CXXFLAGS) -c async_parse.cpp
asm_gps_corr: gps_corr.cpp
$(CXX) $(CXXFLAGS) -S -c gps_corr.cpp

104
grkkgps-0.0/testorbit.cpp Normal file
View File

@ -0,0 +1,104 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <cmath>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <ctime>
#include <fstream>
#include "gps_corr.h"
#include "gps_msg.h"
#include "gps_nav.h"
//---------------------------------------------------------------------------
s32 const kSecondsPerDay = 24 * 60 * 60;
//---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
try
{
Ephemeris ephemeris;
ephemeris.debugLoadCAMsg("273673_09.txt");
// ephemeris.debugLoadCAMsg("273673_21.txt");
// ephemeris.debugLoadCAMsg("273673_22.txt");
// ephemeris.debugLoadCAMsg("273673_23.txt");
// ephemeris.debugLoadCAMsg("273673_26.txt");
// ephemeris.debugLoadCAMsg("273673_29.txt");
/*
static const f64 k_pi = 3.1415926535898;
//based on orbit from tebinuma@yahoo.com
ephemeris.a_f0_ = 2.356632612646E-04;
ephemeris.a_f1_ = 1.932676241267E-12;
ephemeris.a_f2_ = 0.000000000000E+00;
ephemeris.sf3IODE_ = ephemeris.sf2IODE_ = 212;
ephemeris.C_rs_ = -9.409375000000E+01;
ephemeris.deltan_ = 4.070169538899E-09 / k_pi;
ephemeris.M_0_ = 2.056614701229E+00 / k_pi;
ephemeris.C_uc_ = -4.839152097702E-06 / k_pi;
ephemeris.e_ = 5.168720614165E-03;
ephemeris.C_us_ = 1.081451773643E-05 / k_pi;
ephemeris.sqrtA_ = 5.153628406525E+03;
ephemeris.t_oe_ = 8.640000000000E+04;
ephemeris.C_ic_ = 1.005828380585E-07 / k_pi;
ephemeris.omega_0_ = 2.979421253197E+00 / k_pi;
ephemeris.C_is_ = -1.080334186554E-07 / k_pi;
ephemeris.i_0_ = 9.698482115566E-01 / k_pi;
ephemeris.C_rc_ = 1.797187500000E+02;
ephemeris.w_ = -1.694442176021E+00 / k_pi;
ephemeris.dot_omega_ = -7.571029649489E-09 / k_pi;
ephemeris.IDOT_ = 3.053698627377E-10 / k_pi;
ephemeris.T_GD_ = -3.259629011154E-09;
ephemeris.IODC_ = 468;
// ephemeris.CODES on L2 = 0.000000000000E+00;
// ephemeris.GPSWeek = 1.172000000000E+03;
// ephemeris.L2Pdata = 0.000000000000E+00;
// ephemeris.SVAcc = 4.000000000000E+00;
// ephemeris.SVHealth = 0.000000000000E+00;
// Transmissitib time 8.637000000000D+04
// spare 4.000000000000D+00
*/
//dump satellite orbit
// if(ephemeris.ephemerisValid())
{
std::cout.precision(10);
for(s32 j = (-kSecondsPerDay/2); j < (kSecondsPerDay/2); j += 60)
{
FourDPos p = ephemeris.findPos(ephemeris.t_oe_ + j);
std::cout
<< p.t << "\t" << p.x << "\t" << p.y << "\t" << p.z << std::endl;
}
}
}
catch(std::exception const& E)
{
std::cerr << "\nERROR: " << E.what() << std::endl;
return 1;
}
return 0;
}

383
grkkgps-0.0/testunit.cpp Normal file
View File

@ -0,0 +1,383 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <cmath>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <ctime>
#include <fstream>
#include "gps_corr.h"
#include "gps_corr_generic.h"
#include "gps_msg.h"
#include "gps_nav.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#define M_SIGN(V_) (V_ == 0)?(0):((V_ < 0)?(-1):(1))
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
testMatrixInvert()
{
//A <row1> <row2> <row3> <row4>
f64 A[16] = {1,1,0,0, 0,0,1,1, 0,1,1,0, 0,1,0,0};
f64 const originalX[4] = {1,2,3,4};
f64 b[4] = {0,0,0,0};
for(u32 i = 0; i < 4; ++i)
{
b[0] += A[0*4 + i] * originalX[i];
b[1] += A[1*4 + i] * originalX[i];
b[2] += A[2*4 + i] * originalX[i];
b[3] += A[3*4 + i] * originalX[i];
}
f64 iA[16];
u32 const repCount = 1000000;
clock_t const b1 = std::clock();
for(u32 i = 0; i < repCount; ++i) Invert4x4Matrix(A,iA);
clock_t const e1 = std::clock();
std::cout << repCount << " 4x4 matrix inverts @ "
<< 1.0 * repCount / (e1 - b1) * CLOCKS_PER_SEC << " reps / second\n";
f64 x[4] = {0,0,0,0};
for(u32 i = 0; i < 4; ++i)
{
x[0] += iA[0*4 + i] * b[i];
x[1] += iA[1*4 + i] * b[i];
x[2] += iA[2*4 + i] * b[i];
x[3] += iA[3*4 + i] * b[i];
}
std::cout << "Ax = b Test\n";
std::cout << " A =";
for(u32 i = 0; i < 16; ++i) std::cout << " " << A[i];
std::cout << "\n";
std::cout << " b =";
for(u32 i = 0; i < 4; ++i) std::cout << " " << b[i];
std::cout << "\n";
std::cout << " iA =";
for(u32 i = 0; i < 16; ++i) std::cout << " " << iA[i];
std::cout << "\n";
std::cout << " x =";
for(u32 i = 0; i < 4; ++i) std::cout << " " << x[i];
std::cout << "\n";
std::cout << " x - originalX =";
for(u32 i = 0; i < 4; ++i) std::cout << " " << (x[i] - originalX[i]);
std::cout << "\n";
}
//---------------------------------------------------------------------------
void
testLeastSqFit()
{
f64 const k_c = 2.99792458e8;
f64 dX[4] = {0,0,0,0};
FourDPos pos(1e6,1e6,1e6,0);
std::vector<f64> satX(6);
std::vector<f64> satY(6);
std::vector<f64> satZ(6);
std::vector<f64> PRN(6);
satX[0] = 20e6; satY[0] = 0.0; satZ[0] = 0.0;
satX[1] = 30e6; satY[1] = 40e6; satZ[1] = 0.0;
satX[2] = 0.0; satY[2] = 0.0; satZ[2] = 20e6;
satX[3] = -20e6; satY[3] = 0.0; satZ[3] = 0.0;
satX[4] = 0.0; satY[4] = -30e6; satZ[4] = 40e6;
satX[5] = 0.0; satY[5] = 0.0; satZ[5] = -20e6;
for(u32 i = 0; i < PRN.size(); ++i)
PRN[i] = std::sqrt(satX[i] * satX[i] + satY[i] * satY[i] + satZ[i] * satZ[i]) / k_c;
for(u32 j = 0; j < 10; ++j)
{
LeastSqFit(dX,pos,satX,satY,satZ,PRN);
pos.x += dX[0];
pos.y += dX[1];
pos.z += dX[2];
pos.t -= dX[3] / k_c;
for(u32 i = 0; i < PRN.size(); ++i)
PRN[i] -= dX[3] / k_c;
f64 const posErr =
std::sqrt(dX[0] * dX[0] + dX[1] * dX[1] + dX[2] * dX[2] + dX[3]*dX[3]);
std::cout << "Least Sq.: del "
<< dX[0] << " " << dX[1] << " "
<< dX[2] << " " << dX[3] << " " << posErr << "\n";
std::cout << "Least Sq.: pos "
<< pos.x << " " << pos.y << " "
<< pos.z << " " << pos.t << "\n";
if(posErr < 0.001) break;
}
}
//---------------------------------------------------------------------------
void
testMsgDecodeFuncs()
{
std::cerr << "s32 0xFF0000, 1, 8 = " << parseMsgDataS32(0xFF0000, 1, 8) << std::endl;
std::cerr << "s32 0x00FF00, 9,16 = " << parseMsgDataS32(0x00FF00, 9,16) << std::endl;
std::cerr << "s32 0x0000FF,17,24 = " << parseMsgDataS32(0x0000FF,17,24) << std::endl;
std::cerr << "u32 0x0000FF,17,24 = " << parseMsgDataU32(0x0000FF,17,24) << std::endl;
std::cerr << "s32 0xFF0000, 2, 8 = " << parseMsgDataS32(0xFF0000, 2, 8) << std::endl;
std::cerr << "s32 0x00FF00, 7,16 = " << parseMsgDataS32(0x00FF00, 7,16) << std::endl;
std::cerr << "s32 0x0000FF,24,24 = " << parseMsgDataS32(0x0000FF,24,24) << std::endl;
std::cerr << "s32 0x0000FF,16,17 = " << parseMsgDataS32(0x0000FF,16,17) << std::endl;
std::cerr << "u32 0x0000FF,17,24,0xFFFFFF,1,24 = " << parseMsgDataU32(0x0000FF,17,24,0xFFFFFF,1,24) << std::endl;
std::cerr << "s32 0x0000FF,17,24,0xFFFFFF,1,24 = " << parseMsgDataS32(0x0000FF,17,24,0xFFFFFF,1,24) << std::endl;
std::cerr << "f64(-10) s32 0x0000FF,16,17 = " << parseMsgDataSF64(-10,0x0000FF,16,17) << std::endl;
std::cerr << "f64(-10) s32 0xFFFFFF,1,24 = " << parseMsgDataSF64(-10,0xFFFFFF,1,24) << std::endl;
std::cerr << "f64(-10) u32 0xFFFFFF,1,24 = " << parseMsgDataUF64(-10,0xFFFFFF,1,24) << std::endl;
std::cerr << "f64(-31) u32 0x0000FF,17,24,0xFFFFFF,1,24 = " << parseMsgDataUF64(-31,0x0000FF,17,24,0xFFFFFF,1,24) << std::endl;
std::cerr << "f64(-31) s32 0x0000FF,17,24,0xFFFFFF,1,24 = " << parseMsgDataSF64(-31,0x0000FF,17,24,0xFFFFFF,1,24) << std::endl;
}
//---------------------------------------------------------------------------
//makes sure that the PRN code genrator works
void
testGenerateCACode()
{
c8 ca[10];
generateCACode(1,1,0,ca,ca+10);
u32 v = 0;
for(u32 i = 0; i < 10; ++i)
{
v <<= 1;
v |= ca[i];
}
assert(v == 01440);
}
//---------------------------------------------------------------------------
//runs a timing test of the correlator does ~1 sec worth of correlation and
//reports the <actual process time in seconds> <iteration count>
void
timeProcessGPSCorrelator(
u32 const Fs_u32)
{
f64 const Fs = Fs_u32;
u32 const chipFs_u32 = 2046000;
f64 const chipFs = chipFs_u32;
u32 const inputLength = static_cast<u32>(Fs_u32 * 1.1);
std::vector<f32> inputData(inputLength);
const f32* dataBegin = &*inputData.begin();
const f32* const dataEnd = &*inputData.end();
GPSCorrelatorChips prn1(1);
GPSCorrelatorTrack gpscs(Fs,1.25e6,chipFs,1);
gpscs.chipBase_ = prn1.promptEarly_;
u32 phase = 0;//(carrierLength / 8) << 16;
u32 chipPhase = 0;
for(u32 i = 0; i < inputLength; ++i)
{
inputData[i] = 0;
inputData[i] +=
*cosData.cosine(phase) *
prn1.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
phase += gpscs.carrierDelta_;
chipPhase += gpscs.chipDelta_;
chipPhase %= 2046 << 16;
}
gpscs.carrierFreqSet(5e6);
gpscs.carrierPhase_ = 0;
u32 cnt = 0;
clock_t const b = std::clock();
while(dataBegin != dataEnd)
{
processGPSCorrelator(dataBegin,dataEnd,&gpscs);
++cnt;
}
clock_t const e = std::clock();
f64 const d3 = 1.0 * (e - b) / CLOCKS_PER_SEC;
std::cerr << "corr time test Fs = " << Fs_u32 << " : " << d3 << " " << cnt << std::endl;
}
//---------------------------------------------------------------------------
void
testParityCheck(
c8 const* const inFileName)
{
c8 CAMessage[1500];
std::fstream f(inFileName,std::ios::in | std::ios::binary);
if(!f.is_open()) throw KKException("Could Not Open C/A Message File");
f.read(CAMessage,sizeof(CAMessage));
if(!f.good()) throw KKException("Could Not Read C/A Message File");
for(u32 i = 0; i < sizeof(CAMessage); ++i)
CAMessage[i] = ('1' == CAMessage[i])?1:-1;
u32 msg = 0;
std::cout << inFileName << " Parity Check: ";
for(u32 i = 0; i < 1500; ++i)
{
msg <<= 1;
msg |= (CAMessage[i] > 0)?1:0;
if(0 ==((i+1) % 30))
{
u32 data;
std::cout << ((checkWordParity(msg,data))?1:0);
}
}
std::cout << std::endl;
}
//---------------------------------------------------------------------------
//load C/A message from file gotten from OpenGPSSim
void
timeFullGPSTrack()
{ c8 CAMessage[1500];
{
std::fstream f("273673_22.txt",std::ios::in | std::ios::binary);
if(!f.is_open()) throw KKException("Could Not Open C/A Message File");
f.read(CAMessage,sizeof(CAMessage));
if(!f.good()) throw KKException("Could Not Read C/A Message File");
for(u32 i = 0; i < sizeof(CAMessage); ++i)
CAMessage[i] = ('1' == CAMessage[i])?1:-1;
}
//GPS signal Simulation + processing
u32 const Fs_u32 = 5000000; //Sample Frequency
f64 const Fs = Fs_u32; //Sample Frequency Again
u32 const chipFs_u32 = 2046000; //1/2 Chip Frequency
f64 const chipFs = chipFs_u32; //1/2 Chip Frequency Again
f64 sourceFreq = 1.25e6 + 45; //simulator carrier frequency
std::vector<f32> inputData(Fs_u32); //simulator data buffer
GPSCorrelatorChips prn22(22); //simulator chip generator
GPSCorrelatorState source(Fs,sourceFreq,chipFs); //used for simulator NCOs
u32 phase = cosData.negSinOffset / 2; //simulator carrier phase offset
u32 chipPhase = 2 << 15; //simulator chip phase offset
u64 messageCodeCount = 0; //simulator spreading code counter
GPSCorrelatorMsgTrack gpscs(Fs,1.25e6,chipFs,22); //tracking correlator channel
//generate block of data
u32 const inputLength = inputData.size();
for(u32 i = 0; i < inputLength; ++i)
{
inputData[i] = 0;
//carrier and spreading code
inputData[i] +=
*(cosData.cosine(phase)) *
prn22.promptEarly_[((chipPhase >> 16) + 0) % 2046 + 2];
//message bit
inputData[i] *= CAMessage[(messageCodeCount / 20) % 1500];
//uniform distribution noise
inputData[i] += 2.0 * std::rand() / RAND_MAX - 1.0;
//eventual gaussian distribution noise
// inputData[i] += RandG(100.0,10);
phase += source.carrierDelta_;
chipPhase += source.chipDelta_;
//handle updating message bit
if(chipPhase >= (2046 << 16))
{
++messageCodeCount;
messageCodeCount %= (1500 * 20);
}
chipPhase %= 2046 << 16;
}
const f32* dataBegin = &*inputData.begin();
const f32* const dataEnd = &*inputData.end();
gpscs.start();
clock_t const b = std::clock();
//process block of data
while(dataBegin != dataEnd)
gpscs.doTrack(dataBegin,dataEnd);
clock_t const e = std::clock();
f64 const d3 = (Fs / inputData.size()) * (e - b) / CLOCKS_PER_SEC;
std::cerr << "full time test: " << d3 << std::endl;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
int main(int argc, char* argv[])
{
try
{
testMatrixInvert();
testLeastSqFit();
testMsgDecodeFuncs();
testGenerateCACode();
testParityCheck("273673_09.txt");
testParityCheck("273673_21.txt");
testParityCheck("273673_22.txt");
testParityCheck("273673_23.txt");
testParityCheck("273673_26.txt");
testParityCheck("273673_29.txt");
timeProcessGPSCorrelator(5000000);
timeProcessGPSCorrelator(20000000);
timeFullGPSTrack();
}
catch(std::exception const& E)
{
std::cerr << "\nERROR: " << E.what() << std::endl;
return 1;
}
return 0;
}
//---------------------------------------------------------------------------

1
grkkgps-0.1/.buildpri Normal file
View File

@ -0,0 +1 @@
100

0
grkkgps-0.1/AUTHORS Executable file
View File

340
grkkgps-0.1/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

0
grkkgps-0.1/ChangeLog Executable file
View File

236
grkkgps-0.1/INSTALL Normal file
View File

@ -0,0 +1,236 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

29
grkkgps-0.1/Makefile.am Executable file
View File

@ -0,0 +1,29 @@
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
include $(top_srcdir)/Makefile.common
EXTRA_DIST = bootstrap configure config.h.in .buildpri
SUBDIRS = config src
DIST_SUBDIRS = config src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =

35
grkkgps-0.1/Makefile.common Executable file
View File

@ -0,0 +1,35 @@
# -*- Makefile -*-
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# includes
grincludedir = $(includedir)/gnuradio
# swig includes
swigincludedir = $(grincludedir)/swig
# Install this stuff in the appropriate subdirectory
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
grpythondir = $(pythondir)/gnuradio
grpyexecdir = $(pyexecdir)/gnuradio

752
grkkgps-0.1/Makefile.in Normal file
View File

@ -0,0 +1,752 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# -*- Makefile -*-
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/Makefile.common $(top_srcdir)/configure AUTHORS \
COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh ltmain.sh missing py-compile
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \
$(top_srcdir)/config/gr_as.m4 $(top_srcdir)/config/gr_boost.m4 \
$(top_srcdir)/config/gr_gprof.m4 \
$(top_srcdir)/config/gr_omnithread.m4 \
$(top_srcdir)/config/gr_pwin32.m4 \
$(top_srcdir)/config/gr_python.m4 \
$(top_srcdir)/config/gr_scripting.m4 \
$(top_srcdir)/config/gr_swig.m4 $(top_srcdir)/config/lf_cxx.m4 \
$(top_srcdir)/config/lf_warnings.m4 \
$(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_CFLAGS = @BOOST_CFLAGS@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@
GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@
GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMNITHREAD_NT_FALSE = @OMNITHREAD_NT_FALSE@
OMNITHREAD_NT_TRUE = @OMNITHREAD_NT_TRUE@
OMNITHREAD_POSIX_FALSE = @OMNITHREAD_POSIX_FALSE@
OMNITHREAD_POSIX_TRUE = @OMNITHREAD_POSIX_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@
STRIP = @STRIP@
SWIG = @SWIG@
SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@
SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
# includes
grincludedir = $(includedir)/gnuradio
# swig includes
swigincludedir = $(grincludedir)/swig
# Install this stuff in the appropriate subdirectory
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
grpythondir = $(pythondir)/gnuradio
grpyexecdir = $(pyexecdir)/gnuradio
EXTRA_DIST = bootstrap configure config.h.in .buildpri
SUBDIRS = config src
DIST_SUBDIRS = config src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/config $(distdir)/src/python
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-pkgconfigDATA
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-pkgconfigDATA install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0
grkkgps-0.1/NEWS Executable file
View File

13
grkkgps-0.1/README Executable file
View File

@ -0,0 +1,13 @@
How to use:
./configure
make
make check
and possibly
sudo make install
Then try running src/python/grkkgps_scope.py, it is setup to use simulated data but there is code in place to use data files or realtime data from the dbsrx

7218
grkkgps-0.1/aclocal.m4 vendored Executable file

File diff suppressed because it is too large Load Diff

29
grkkgps-0.1/bootstrap Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# Copyright 2001 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
rm -fr config.cache autom4te*.cache
aclocal -I config
autoconf
autoheader
libtoolize --automake
automake --add-missing

1466
grkkgps-0.1/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

269
grkkgps-0.1/config.h.in Normal file
View File

@ -0,0 +1,269 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if for loop scoping is broken */
#undef CXX_HAS_BUGGY_FOR_LOOPS
/* Define if C++ is missing bool type */
#undef CXX_HAS_NO_BOOL
/* Define if has std::isnan */
#undef CXX_HAS_STD_ISNAN
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the <Python.h> header file. */
#undef HAVE_PYTHON_H
/* Define to 1 if you have the `rand' function. */
#undef HAVE_RAND
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the `sleep' function. */
#undef HAVE_SLEEP
/* Define to 1 if you have the `srand' function. */
#undef HAVE_SRAND
/* Define to 1 if you have the `srandom' function. */
#undef HAVE_SRANDOM
/* Define to 1 if the system has the type `ssize_t'. */
#undef HAVE_SSIZE_T
/* Define to 1 if you have win32 Sleep */
#undef HAVE_SSLEEP
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if the system has the type `struct timespec'. */
#undef HAVE_STRUCT_TIMESPEC
/* Define to 1 if the system has the type `struct timezone'. */
#undef HAVE_STRUCT_TIMEZONE
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
/* Define to 1 if you have the <winbase.h> header file. */
#undef HAVE_WINBASE_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Define to 1 if you have the <winioctl.h> header file. */
#undef HAVE_WINIOCTL_H
/* Define if mkdir accepts only one arg */
#undef MKDIR_TAKES_ONE_ARG
/* Define to disable asserts (don't doit!) */
#undef NDEBUG
/* Define to 1 to enable NT thread */
#undef OMNITHREAD_NT
/* Define to 1 to enable pthread */
#undef OMNITHREAD_POSIX
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
// Workaround for compilers with buggy for-loop scoping
// That's quite a few compilers actually including recent versions of
// Dec Alpha cxx, HP-UX CC and SGI CC.
// The trivial "if" statement provides the correct scoping to the
// for loop
#ifdef CXX_HAS_BUGGY_FOR_LOOPS
#undef for
#define for if(1) for
#endif
// If the C++ compiler we use doesn't have bool, then
// the following is a near-perfect work-around.
// You must make sure your code does not depend on "int" and "bool"
// being two different types, in overloading for instance.
#ifdef CXX_HAS_NO_BOOL
#define bool int
#define true 1
#define false 0
#endif
/* Define missing prototypes, implemented in replacement lib */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_GETOPT
int getopt (int argc, char * const argv[], const char * optstring);
extern char * optarg;
extern int optind, opterr, optopt;
#endif
#ifndef HAVE_USLEEP
int usleep(unsigned long usec); /* SUSv2 */
#endif
#ifndef HAVE_NANOSLEEP
#ifndef HAVE_STRUCT_TIMESPEC
#if HAVE_SYS_TYPES_H
# include <sys/types.h> /* need time_t */
#endif
struct timespec {
time_t tv_sec;
long tv_nsec;
};
#endif
static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
#endif
#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP)
#ifdef HAVE_WINBASE_H
#include <windows.h>
#include <winbase.h>
#endif
/* TODO: what about SleepEx? */
static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; }
#endif
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifndef HAVE_STRUCT_TIMEZONE
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
#if !defined(HAVE_RANDOM) && defined(HAVE_RAND)
#include <stdlib.h>
static inline long int random (void) { return rand(); }
#endif
#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND)
static inline void srandom (unsigned int seed) { srand(seed); }
#endif
#ifndef HAVE_SSIZE_T
typedef size_t ssize_t;
#endif
#ifdef __cplusplus
}
#endif

1579
grkkgps-0.1/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
#
# Copyright 2001 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
include $(top_srcdir)/Makefile.common
# Install m4 macros in this directory
m4datadir = $(datadir)/aclocal
# List your m4 macros here
m4macros = \
acx_pthread.m4 \
bnv_have_qt.m4 \
cppunit.m4 \
gr_as.m4 \
gr_boost.m4 \
gr_check_usrp.m4 \
gr_check_mc4020.m4 \
gr_check_shm_open.m4 \
gr_doxygen.m4 \
gr_gprof.m4 \
gr_omnithread.m4 \
gr_pwin32.m4 \
gr_python.m4 \
gr_scripting.m4 \
gr_set_md_cpu.m4 \
gr_swig.m4 \
gr_sysv_shm.m4 \
lf_cc.m4 \
lf_cxx.m4 \
lf_warnings.m4 \
lf_x11.m4 \
mkstemp.m4 \
onceonly.m4 \
pkg.m4 \
usrp_fusb_tech.m4 \
usrp_libusb.m4 \
usrp_sdcc.m4
# Don't install m4 macros anymore
# m4data_DATA = $(m4macros)
EXTRA_DIST = $(m4macros)

View File

@ -0,0 +1,456 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright 2001 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# -*- Makefile -*-
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.common
subdir = config
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \
$(top_srcdir)/config/gr_as.m4 $(top_srcdir)/config/gr_boost.m4 \
$(top_srcdir)/config/gr_gprof.m4 \
$(top_srcdir)/config/gr_omnithread.m4 \
$(top_srcdir)/config/gr_pwin32.m4 \
$(top_srcdir)/config/gr_python.m4 \
$(top_srcdir)/config/gr_scripting.m4 \
$(top_srcdir)/config/gr_swig.m4 $(top_srcdir)/config/lf_cxx.m4 \
$(top_srcdir)/config/lf_warnings.m4 \
$(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_CFLAGS = @BOOST_CFLAGS@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@
GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@
GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMNITHREAD_NT_FALSE = @OMNITHREAD_NT_FALSE@
OMNITHREAD_NT_TRUE = @OMNITHREAD_NT_TRUE@
OMNITHREAD_POSIX_FALSE = @OMNITHREAD_POSIX_FALSE@
OMNITHREAD_POSIX_TRUE = @OMNITHREAD_POSIX_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@
STRIP = @STRIP@
SWIG = @SWIG@
SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@
SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
# includes
grincludedir = $(includedir)/gnuradio
# swig includes
swigincludedir = $(grincludedir)/swig
# Install this stuff in the appropriate subdirectory
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
grpythondir = $(pythondir)/gnuradio
grpyexecdir = $(pyexecdir)/gnuradio
# Install m4 macros in this directory
m4datadir = $(datadir)/aclocal
# List your m4 macros here
m4macros = \
acx_pthread.m4 \
bnv_have_qt.m4 \
cppunit.m4 \
gr_as.m4 \
gr_boost.m4 \
gr_check_usrp.m4 \
gr_check_mc4020.m4 \
gr_check_shm_open.m4 \
gr_doxygen.m4 \
gr_gprof.m4 \
gr_omnithread.m4 \
gr_pwin32.m4 \
gr_python.m4 \
gr_scripting.m4 \
gr_set_md_cpu.m4 \
gr_swig.m4 \
gr_sysv_shm.m4 \
lf_cc.m4 \
lf_cxx.m4 \
lf_warnings.m4 \
lf_x11.m4 \
mkstemp.m4 \
onceonly.m4 \
pkg.m4 \
usrp_fusb_tech.m4 \
usrp_libusb.m4 \
usrp_sdcc.m4
# Don't install m4 macros anymore
# m4data_DATA = $(m4macros)
EXTRA_DIST = $(m4macros)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu config/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/..
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,190 @@
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
dnl
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD

View File

@ -0,0 +1,404 @@
dnl Available from the GNU Autoconf Macro Archive at:
dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html
dnl
AC_DEFUN([BNV_HAVE_QT],
[
dnl THANKS! This code includes bug fixes by:
dnl Tim McClarren.
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PATH_X])
AC_REQUIRE([AC_PATH_XTRA])
AC_MSG_CHECKING(for Qt)
AC_ARG_WITH([Qt-dir],
[ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the
installation instructions of Trolltech. Header
files are in DIR/include, binary utilities are
in DIR/bin and the library is in DIR/lib])
AC_ARG_WITH([Qt-include-dir],
[ --with-Qt-include-dir=DIR
Qt header files are in DIR])
AC_ARG_WITH([Qt-bin-dir],
[ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR])
AC_ARG_WITH([Qt-lib-dir],
[ --with-Qt-lib-dir=DIR The Qt library is in DIR])
AC_ARG_WITH([Qt-lib],
[ --with-Qt-lib=LIB Use -lLIB to link with the Qt library])
if test x"$with_Qt_dir" = x"no" ||
test x"$with_Qt_include-dir" = x"no" ||
test x"$with_Qt_bin_dir" = x"no" ||
test x"$with_Qt_lib_dir" = x"no" ||
test x"$with_Qt_lib" = x"no"; then
# user disabled Qt. Leave cache alone.
have_qt="User disabled Qt."
else
# "yes" is a bogus option
if test x"$with_Qt_dir" = xyes; then
with_Qt_dir=
fi
if test x"$with_Qt_include_dir" = xyes; then
with_Qt_include_dir=
fi
if test x"$with_Qt_bin_dir" = xyes; then
with_Qt_bin_dir=
fi
if test x"$with_Qt_lib_dir" = xyes; then
with_Qt_lib_dir=
fi
if test x"$with_Qt_lib" = xyes; then
with_Qt_lib=
fi
# No Qt unless we discover otherwise
have_qt=no
# Check whether we are requested to link with a specific version
if test x"$with_Qt_lib" != x; then
bnv_qt_lib="$with_Qt_lib"
fi
# Check whether we were supplied with an answer already
if test x"$with_Qt_dir" != x; then
have_qt=yes
bnv_qt_dir="$with_Qt_dir"
bnv_qt_include_dir="$with_Qt_dir/include"
bnv_qt_bin_dir="$with_Qt_dir/bin"
bnv_qt_lib_dir="$with_Qt_dir/lib"
# Only search for the lib if the user did not define one already
if test x"$bnv_qt_lib" = x; then
bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
fi
bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
else
# Use cached value or do search, starting with suggestions from
# the command line
AC_CACHE_VAL(bnv_cv_have_qt,
[
# We are not given a solution and there is no cached value.
bnv_qt_dir=NO
bnv_qt_include_dir=NO
bnv_qt_lib_dir=NO
if test x"$bnv_qt_lib" = x; then
bnv_qt_lib=NO
fi
BNV_PATH_QT_DIRECT
if test "$bnv_qt_dir" = NO ||
test "$bnv_qt_include_dir" = NO ||
test "$bnv_qt_lib_dir" = NO ||
test "$bnv_qt_lib" = NO; then
# Problem with finding complete Qt. Cache the known absence of Qt.
bnv_cv_have_qt="have_qt=no"
else
# Record where we found Qt for the cache.
bnv_cv_have_qt="have_qt=yes \
bnv_qt_dir=$bnv_qt_dir \
bnv_qt_include_dir=$bnv_qt_include_dir \
bnv_qt_bin_dir=$bnv_qt_bin_dir \
bnv_qt_LIBS=\"$bnv_qt_LIBS\""
fi
])dnl
eval "$bnv_cv_have_qt"
fi # all $bnv_qt_* are set
fi # $have_qt reflects the system status
if test x"$have_qt" = xyes; then
QT_CXXFLAGS="-I$bnv_qt_include_dir"
QT_DIR="$bnv_qt_dir"
QT_LIBS="$bnv_qt_LIBS"
# If bnv_qt_dir is defined, utilities are expected to be in the
# bin subdirectory
if test x"$bnv_qt_dir" != x; then
if test -x "$bnv_qt_dir/bin/uic"; then
QT_UIC="$bnv_qt_dir/bin/uic"
else
# Old versions of Qt don't have uic
QT_UIC=
fi
QT_MOC="$bnv_qt_dir/bin/moc"
else
# Or maybe we are told where to look for the utilities
if test x"$bnv_qt_bin_dir" != x; then
if test -x "$bnv_qt_bin_dir/uic"; then
QT_UIC="$bnv_qt_bin_dir/uic"
else
# Old versions of Qt don't have uic
QT_UIC=
fi
QT_MOC="$bnv_qt_bin_dir/moc"
else
# Last possibility is that they are in $PATH
QT_UIC="`which uic`"
QT_MOC="`which moc`"
fi
fi
# All variables are defined, report the result
AC_MSG_RESULT([$have_qt:
QT_CXXFLAGS=$QT_CXXFLAGS
QT_DIR=$QT_DIR
QT_LIBS=$QT_LIBS
QT_UIC=$QT_UIC
QT_MOC=$QT_MOC])
else
# Qt was not found
QT_CXXFLAGS=
QT_DIR=
QT_LIBS=
QT_UIC=
QT_MOC=
AC_MSG_RESULT($have_qt)
fi
AC_SUBST(QT_CXXFLAGS)
AC_SUBST(QT_DIR)
AC_SUBST(QT_LIBS)
AC_SUBST(QT_UIC)
AC_SUBST(QT_MOC)
#### Being paranoid:
if test x"$have_qt" = xyes; then
AC_MSG_CHECKING(correct functioning of Qt installation)
AC_CACHE_VAL(bnv_cv_qt_test_result,
[
cat > bnv_qt_test.h << EOF
#include <qobject.h>
class Test : public QObject
{
Q_OBJECT
public:
Test() {}
~Test() {}
public slots:
void receive() {}
signals:
void send();
};
EOF
cat > bnv_qt_main.$ac_ext << EOF
#include "bnv_qt_test.h"
#include <qapplication.h>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
Test t;
QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );
}
EOF
bnv_cv_qt_test_result="failure"
bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out"
AC_TRY_EVAL(bnv_try_1)
bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"`
if test x"$bnv_err_1" != x; then
echo "$bnv_err_1" >&AC_FD_CC
echo "configure: could not run $QT_MOC on:" >&AC_FD_CC
cat bnv_qt_test.h >&AC_FD_CC
else
bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out"
AC_TRY_EVAL(bnv_try_2)
bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"`
if test x"$bnv_err_2" != x; then
echo "$bnv_err_2" >&AC_FD_CC
echo "configure: could not compile:" >&AC_FD_CC
cat bnv_qt_test.$ac_ext >&AC_FD_CC
else
bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out"
AC_TRY_EVAL(bnv_try_3)
bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"`
if test x"$bnv_err_3" != x; then
echo "$bnv_err_3" >&AC_FD_CC
echo "configure: could not compile:" >&AC_FD_CC
cat bnv_qt_main.$ac_ext >&AC_FD_CC
else
bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out"
AC_TRY_EVAL(bnv_try_4)
bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out`
if test x"$bnv_err_4" != x; then
echo "$bnv_err_4" >&AC_FD_CC
else
bnv_cv_qt_test_result="success"
fi
fi
fi
fi
])dnl AC_CACHE_VAL bnv_cv_qt_test_result
AC_MSG_RESULT([$bnv_cv_qt_test_result]);
if test x"$bnv_cv_qt_test_result" = "xfailure"; then
# working Qt was not found
QT_CXXFLAGS=
QT_DIR=
QT_LIBS=
QT_UIC=
QT_MOC=
have_qt=no
AC_MSG_WARN([Failed to find matching components of a complete
Qt installation. Try using more options,
see ./configure --help.])
fi
rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \
bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \
bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out
fi
])
dnl Internal subroutine of BNV_HAVE_QT
dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib
dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no>
AC_DEFUN([BNV_PATH_QT_DIRECT],
[
## Binary utilities ##
if test x"$with_Qt_bin_dir" != x; then
bnv_qt_bin_dir=$with_Qt_bin_dir
fi
## Look for header files ##
if test x"$with_Qt_include_dir" != x; then
bnv_qt_include_dir="$with_Qt_include_dir"
else
# The following header file is expected to define QT_VERSION.
qt_direct_test_header=qglobal.h
# Look for the header file in a standard set of common directories.
bnv_include_path_list="
/usr/include
`ls -dr /usr/include/qt* 2>/dev/null`
`ls -dr /usr/lib/qt*/include 2>/dev/null`
`ls -dr /usr/local/qt*/include 2>/dev/null`
`ls -dr /opt/qt*/include 2>/dev/null`
"
for bnv_dir in $bnv_include_path_list; do
if test -r "$bnv_dir/$qt_direct_test_header"; then
bnv_dirs="$bnv_dirs $bnv_dir"
fi
done
# Now look for the newest in this list
bnv_prev_ver=0
for bnv_dir in $bnv_dirs; do
bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//`
if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then
bnv_qt_include_dir=$bnv_dir
bnv_prev_ver=$bnv_this_ver
fi
done
fi dnl Found header files.
# Are these headers located in a traditional Trolltech installation?
# That would be $bnv_qt_include_dir stripped from its last element:
bnv_possible_qt_dir=`dirname $bnv_qt_include_dir`
if test -x $bnv_possible_qt_dir/bin/moc &&
ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then
# Then the rest is a piece of cake
bnv_qt_dir=$bnv_possible_qt_dir
bnv_qt_bin_dir="$bnv_qt_dir/bin"
bnv_qt_lib_dir="$bnv_qt_dir/lib"
# Only look for lib if the user did not supply it already
if test x"$bnv_qt_lib" = xNO; then
bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
fi
bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
else
# There is no valid definition for $QTDIR as Trolltech likes to see it
bnv_qt_dir=
## Look for Qt library ##
if test x"$with_Qt_lib_dir" != x; then
bnv_qt_lib_dir="$with_Qt_lib_dir"
# Only look for lib if the user did not supply it already
if test x"$bnv_qt_lib" = xNO; then
bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
fi
bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
else
# Normally, when there is no traditional Trolltech installation,
# the library is installed in a place where the linker finds it
# automatically.
# If the user did not define the library name, try with qt
if test x"$bnv_qt_lib" = xNO; then
bnv_qt_lib=qt
fi
qt_direct_test_header=qapplication.h
qt_direct_test_main="
int argc;
char ** argv;
QApplication app(argc,argv);
"
# See if we find the library without any special options.
# Don't add top $LIBS permanently yet
bnv_save_LIBS="$LIBS"
LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
bnv_qt_LIBS="$LIBS"
bnv_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-I$bnv_qt_include_dir"
AC_TRY_LINK([#include <$qt_direct_test_header>],
$qt_direct_test_main,
[
# Success.
# We can link with no special library directory.
bnv_qt_lib_dir=
], [
# That did not work. Try the multi-threaded version
echo "Non-critical error, please neglect the above." >&AC_FD_CC
bnv_qt_lib=qt-mt
LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
AC_TRY_LINK([#include <$qt_direct_test_header>],
$qt_direct_test_main,
[
# Success.
# We can link with no special library directory.
bnv_qt_lib_dir=
], [
# That did not work. Try the OpenGL version
echo "Non-critical error, please neglect the above." >&AC_FD_CC
bnv_qt_lib=qt-gl
LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
AC_TRY_LINK([#include <$qt_direct_test_header>],
$qt_direct_test_main,
[
# Succes.
# We can link with no special library directory.
bnv_qt_lib_dir=
], [
# That did not work. Maybe a library version I don't know about?
echo "Non-critical error, please neglect the above." >&AC_FD_CC
# Look for some Qt lib in a standard set of common directories.
bnv_dir_list="
`echo $bnv_qt_includes | sed ss/includess`
/lib
/usr/lib
/usr/local/lib
/opt/lib
`ls -dr /usr/lib/qt* 2>/dev/null`
`ls -dr /usr/local/qt* 2>/dev/null`
`ls -dr /opt/qt* 2>/dev/null`
"
for bnv_dir in $bnv_dir_list; do
if ls $bnv_dir/libqt*; then
# Gamble that it's the first one...
bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p |
sed s@$bnv_dir/lib@@ | sed s/[.].*//`"
bnv_qt_lib_dir="$bnv_dir"
break
fi
done
# Try with that one
LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
AC_TRY_LINK([#include <$qt_direct_test_header>],
$qt_direct_test_main,
[
# Succes.
# We can link with no special library directory.
bnv_qt_lib_dir=
], [
# Leave bnv_qt_lib_dir defined
])
])
])
])
if test x"$bnv_qt_lib_dir" != x; then
bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS"
else
bnv_qt_LIBS="$LIBS"
fi
LIBS="$bnv_save_LIBS"
CXXFLAGS="$bnv_save_CXXFLAGS"
fi dnl $with_Qt_lib_dir was not given
fi dnl Done setting up for non-traditional Trolltech installation
])

View File

@ -0,0 +1,80 @@
dnl
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl
AC_DEFUN([AM_PATH_CPPUNIT],
[
AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
cppunit_config_prefix="$withval", cppunit_config_prefix="")
AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
if test x$cppunit_config_exec_prefix != x ; then
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
fi
fi
if test x$cppunit_config_prefix != x ; then
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
fi
fi
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
cppunit_version_min=$1
AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
no_cppunit=""
if test "$CPPUNIT_CONFIG" = "no" ; then
no_cppunit=yes
else
CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
cppunit_version=`$CPPUNIT_CONFIG --version`
cppunit_major_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_major_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_version_proper=`expr \
$cppunit_major_version \> $cppunit_major_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \> $cppunit_minor_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \= $cppunit_minor_min \& \
$cppunit_micro_version \>= $cppunit_micro_min `
if test "$cppunit_version_proper" = "1" ; then
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
else
AC_MSG_RESULT(no)
no_cppunit=yes
fi
fi
if test "x$no_cppunit" = x ; then
ifelse([$2], , :, [$2])
else
CPPUNIT_CFLAGS=""
CPPUNIT_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(CPPUNIT_CFLAGS)
AC_SUBST(CPPUNIT_LIBS)
])

View File

@ -0,0 +1,34 @@
# Figure out how to run the assembler. -*- Autoconf -*-
# serial 2
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# I just copy and renamed this from automake-1.6.3 so we should work
# under both 1.4-p6 and later. -eb
# GR_PROG_AS
# ----------
AC_DEFUN([GR_PROG_AS],
[# By default we simply use the C compiler to build assembly code.
AC_REQUIRE([AC_PROG_CC])
: ${CCAS='$(CC)'}
# Set ASFLAGS if not already set.
: ${CCASFLAGS='$(CFLAGS)'}
AC_SUBST(CCAS)
AC_SUBST(CCASFLAGS)])

View File

@ -0,0 +1,70 @@
dnl
dnl Copyright 2004 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([GR_REQUIRE_BOOST_INCLUDES],
[
AC_LANG_PUSH(C++)
gr_boost_include_dir=
AC_ARG_WITH([boost-include-dir],
AC_HELP_STRING([--with-boost-include-dir=<path>],
[path to boost c++ include files]),
[
# "yes" and "no" are bogus answers
if test x"$with_boost_include_dir" == xyes ||
test x"$with_boost_include_dir" == xno; then
gr_boost_include_dir=
else
gr_boost_include_dir=$with_boost_include_dir
fi
])
echo "gr_boost_include_dir = $gr_boost_include_dir"
if test x$gr_boost_include_dir != x; then
# if user specified a directory, then we use it
OLD_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir"
AC_CHECK_HEADER([boost/shared_ptr.hpp],
[BOOST_CFLAGS="-I$gr_boost_include_dir"],
[AC_MSG_ERROR(
[Failed to locate boost/shared_ptr.hpp.
Try using --with-boost-include-dir=<path>])])
CPPFLAGS=$OLD_CPPFLAGS
else
# is the header in the default place?
AC_CHECK_HEADER([boost/shared_ptr.hpp],
[BOOST_CFLAGS=""],
[ # nope, look one more place
# wipe out cached value. KLUDGE: AC should have API for this
unset AS_TR_SH([ac_cv_header_boost/shared_ptr.hpp])
p=/usr/local/include/boost-1_31
OLD_CPPFLAGS=$CPP_FLAGS
CPPFLAGS="$CPPFLAGS -I$p"
AC_CHECK_HEADER([boost/shared_ptr.hpp],
[BOOST_CFLAGS="-I$p"],
[AC_MSG_ERROR(
[Failed to locate boost/shared_ptr.hpp.
Try using --with-boost-include-dir=<path>])])
CPPFLAGS=$OLD_CPPFLAGS
])
fi
AC_LANG_POP
AC_SUBST(BOOST_CFLAGS)
])

View File

@ -0,0 +1,37 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([GR_CHECK_MC4020],[
AC_MSG_CHECKING([for mc4020 A/D driver include file])
AC_COMPILE_IFELSE([
#include <mc4020.h>
int main (int argc, char **argv)
{
return 0;
}
],[HAVE_MC4020=yes
AC_DEFINE(HAVE_MC4020,[1],[Define if you have a Measurement Computing PCI-DAS4020/12 A/D])],
[HAVE_MC4020=no])
AC_MSG_RESULT($HAVE_MC4020)
AM_CONDITIONAL(HAVE_MC4020, test x$HAVE_MC4020 = xyes)
])

View File

@ -0,0 +1,29 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GR_CHECK_SHM_OPEN],
[
SHM_OPEN_LIBS=""
save_LIBS="$LIBS"
AC_SEARCH_LIBS([shm_open], [rt], [SHM_OPEN_LIBS="$LIBS"])
AC_CHECK_FUNCS([shm_open])
LIBS="$save_LIBS"
AC_SUBST(SHM_OPEN_LIBS)
])

View File

@ -0,0 +1,32 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
dnl Check for Universal Software Radio Peripheral
AC_DEFUN([GR_CHECK_USRP],[
PKG_CHECK_MODULES(USRP, usrp >= 0.2,
[HAVE_USRP=yes
AC_DEFINE(HAVE_USRP,[1],[Define if you have a USRP])],
[HAVE_USRP=no])
AM_CONDITIONAL(HAVE_USRP, test x$HAVE_USRP = xyes)
])

View File

@ -0,0 +1,56 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([GR_CHECK_DOXYGEN],[
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no])
if test "x$enable_doxygen" = xno; then
enable_doc=no
else
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
if test x$DOXYGEN = x; then
if test "x$enable_doxygen" = xyes; then
AC_MSG_ERROR([could not find doxygen])
fi
enable_doc=no
else
enable_doc=yes
AC_PATH_PROG(DOT, dot, , $PATH)
fi
fi
AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
if test x$DOT = x; then
if test "x$enable_dot" = xyes; then
AC_MSG_ERROR([could not find dot])
fi
enable_dot=no
else
enable_dot=yes
fi
AC_SUBST(enable_dot)
AC_SUBST(enable_html_docs)
AC_SUBST(enable_latex_docs)
])

View File

@ -0,0 +1,72 @@
dnl
dnl Copyright 2002 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
dnl FIXME probably need to add linker flag too...
AC_DEFUN([GR_SET_GPROF],[
dnl Check for --with-gprof
AC_MSG_CHECKING([whether user wants gprof])
AC_ARG_WITH(gprof,
[ --with-gprof Turn on gprof profiling],
[], [ with_gprof=no ])
AC_MSG_RESULT($with_gprof)
dnl gprof profiling flags for the two main compilers
cc_profiling_flags="-pg"
cxx_profiling_flags="-pg"
ld_profiling_flags="-pg"
if test $with_gprof = yes
then
if test -n "${CC}"
then
LF_CHECK_CC_FLAG($cc_profiling_flags)
fi
if test -n "${CXX}"
then
LF_CHECK_CXX_FLAG($cxx_profiling_flags)
fi
fi
])
AC_DEFUN([GR_SET_PROF],[
dnl Check for --with-prof
AC_MSG_CHECKING([whether user wants prof])
AC_ARG_WITH(prof,
[ --with-prof Turn on prof profiling],
[], [ with_prof=no ])
AC_MSG_RESULT($with_prof)
dnl prof profiling flags for the two main compilers
cc_profiling_flags="-p"
cxx_profiling_flags="-p"
ld_profiling_flags="-p"
if test $with_prof = yes
then
if test -n "${CC}"
then
LF_CHECK_CC_FLAG($cc_profiling_flags)
fi
if test -n "${CXX}"
then
LF_CHECK_CXX_FLAG($cxx_profiling_flags)
fi
fi
])

View File

@ -0,0 +1,51 @@
# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*-
# Copyright 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([GR_OMNITHREAD],
[
# Check first for POSIX
ACX_PTHREAD(
[ ot_posix="yes"
AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread])
],[
# If no POSIX support found, then check for NT threads
AC_MSG_CHECKING([for NT threads])
AC_LINK_IFELSE([
#include <windows.h>
#include <winbase.h>
int main() { InitializeCriticalSection(NULL); return 0; }
],
[
ot_nt="yes"
AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread])
],
[AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])]
)
AC_MSG_RESULT(yes)
])
AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes)
AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes)
save_LIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"])
AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep])
LIBS="$save_LIBS"
])

View File

@ -0,0 +1,146 @@
# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*-
# Copyright 2003,2004,2005 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
AC_DEFUN([GR_PWIN32],
[
AC_REQUIRE([AC_HEADER_TIME])
AC_CHECK_HEADERS([sys/types.h fcntl.h io.h])
AC_CHECK_HEADERS([windows.h])
AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [
#if HAVE_WINDOWS_H
#include <windows.h>
#endif
])
AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction])
AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
])
dnl Checks for replacements
AC_REPLACE_FUNCS([getopt usleep gettimeofday])
AC_MSG_CHECKING(for Sleep)
AC_TRY_LINK([ #include <windows.h>
#include <winbase.h>
], [ Sleep(0); ],
[AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep])
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no)
)
dnl Under Win32, mkdir prototype in io.h has only one arg
AC_MSG_CHECKING(whether mkdir accepts only one arg)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>], [
mkdir("")
], [ AC_MSG_RESULT(yes)
AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
[ AC_MSG_RESULT(no)
])
AH_BOTTOM(
[
/* Define missing prototypes, implemented in replacement lib */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_GETOPT
int getopt (int argc, char * const argv[], const char * optstring);
extern char * optarg;
extern int optind, opterr, optopt;
#endif
#ifndef HAVE_USLEEP
int usleep(unsigned long usec); /* SUSv2 */
#endif
#ifndef HAVE_NANOSLEEP
#ifndef HAVE_STRUCT_TIMESPEC
#if HAVE_SYS_TYPES_H
# include <sys/types.h> /* need time_t */
#endif
struct timespec {
time_t tv_sec;
long tv_nsec;
};
#endif
static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
#endif
#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP)
#ifdef HAVE_WINBASE_H
#include <windows.h>
#include <winbase.h>
#endif
/* TODO: what about SleepEx? */
static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; }
#endif
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifndef HAVE_STRUCT_TIMEZONE
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
#endif
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
#if !defined(HAVE_RANDOM) && defined(HAVE_RAND)
#include <stdlib.h>
static inline long int random (void) { return rand(); }
#endif
#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND)
static inline void srandom (unsigned int seed) { srand(seed); }
#endif
#ifndef HAVE_SSIZE_T
typedef size_t ssize_t;
#endif
#ifdef __cplusplus
}
#endif
])
])

View File

@ -0,0 +1,104 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
# PYTHON_DEVEL()
#
# Checks for Python and tries to get the include path to 'Python.h'.
# It provides the $(PYTHON_CPPFLAGS) output variable.
AC_DEFUN([PYTHON_DEVEL],[
AC_REQUIRE([AM_PATH_PYTHON])
# Check for Python include path
AC_MSG_CHECKING([for Python include path])
if test -z "$PYTHON" ; then
AC_MSG_ERROR([cannot find Python path])
fi
python_path=${PYTHON%/bin*}
for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
python_path=`find $i -type f -name Python.h -print`
if test -n "$python_path" ; then
break
fi
done
for i in $python_path ; do
python_path=${python_path%/Python.h}
break
done
AC_MSG_RESULT([$python_path])
if test -z "$python_path" ; then
AC_MSG_ERROR([cannot find Python include path])
fi
AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path])
# Check for Python headers usability
python_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_CHECK_HEADERS([Python.h], [],
[AC_MSG_ERROR([cannot find usable Python headers])])
CPPFLAGS="$python_save_CPPFLAGS"
# Check for Python library path
AC_MSG_CHECKING([for Python library path])
python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" "$python_path/libs" ; do
python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
if test -n "$python_path" ; then
break
fi
done
python_path=`echo $python_path | sed "s,/libpython.*$,,"`
if test -z "$python_path" ; then
AC_MSG_WARN(cannot find Python library path)
fi
AC_MSG_RESULT([$python_path])
AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
#
python_site=`echo $python_path | sed "s/config/site-packages/"`
AC_SUBST([PYTHON_SITE_PKG],[$python_site])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print conf('LOCALMODLIBS')+' '+conf('LIBS')"
AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
AC_SUBST(PYTHON_EXTRA_LIBS)
# Check for Python library usability
python_save_LIBS=$LIBS
python_save_CPPFLAGS=$CPPFLAGS
LIBS="$LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS"
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
AC_MSG_CHECKING(Python headers and library usability)
AC_TRY_LINK([ #include <Python.h> ], [ PyArg_Parse(NULL, NULL); ],
[AC_MSG_RESULT(yes)],
[AC_MSG_WARN(no dev lib, crossing fingers)
AC_SUBST([PYTHON_LDFLAGS],[""])])
CPPFLAGS="$python_save_CPPFLAGS"
LIBS="$python_save_LIBS"
])

View File

@ -0,0 +1,30 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([GR_SCRIPTING],[
AC_REQUIRE([AC_PROG_LN_S])
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_LIBTOOL])
SWIG_PROG(1.3.23)
SWIG_ENABLE_CXX
SWIG_PYTHON
])

View File

@ -0,0 +1,41 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([GR_SET_MD_CPU],[
AC_REQUIRE([AC_CANONICAL_TARGET])
AC_ARG_WITH(md-cpu,
[ --with-md-cpu=ARCH set machine dependent speedups (auto)],
[cf_with_md_cpu="$withval"],
[cf_with_md_cpu="$target_cpu"])
AC_MSG_CHECKING([for machine dependent speedups])
case "$cf_with_md_cpu" in
x86 | i[[3-7]]86) MD_CPU=x86 ;;
# sparc) MD_CPU=sparc ;;
*) MD_CPU=generic ;;
esac
AC_MSG_RESULT($MD_CPU)
AC_SUBST(MD_CPU)
AM_CONDITIONAL(MD_CPU_x86, test $MD_CPU = x86)
AM_CONDITIONAL(MD_CPU_generic, test $MD_CPU = generic)
])

View File

@ -0,0 +1,85 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
# SWIG_PROG([required-version])
#
# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG).
# You can use the optional first argument to check if the version of the available SWIG
# is greater or equal to the value of the argument. It should have the format:
# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.)
AC_DEFUN([SWIG_PROG],[
AC_REQUIRE([AC_PROG_MAKE_SET])
AC_CHECK_PROG(SWIG,swig,[`which swig`])
if test -z "$SWIG" ; then
AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required])
SWIG=false
elif test -n "$1" ; then
AC_MSG_CHECKING([for SWIG version])
swig_version=`$SWIG -version 2>&1 | \
awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'`
AC_MSG_RESULT([$swig_version])
if test -n "$swig_version" ; then
swig_version=`echo $swig_version | \
awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null`
swig_required_version=`echo $1 | \
awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null`
if test $swig_required_version -gt $swig_version ; then
AC_MSG_ERROR([SWIG version >= $1 required])
fi
else
AC_MSG_ERROR([cannot determine SWIG version])
fi
fi
])
# SWIG_ENABLE_CXX()
#
# Enable swig C++ support. This effects all invocations of $(SWIG).
AC_DEFUN([SWIG_ENABLE_CXX],[
AC_REQUIRE([SWIG_PROG])
AC_REQUIRE([AC_PROG_CXX])
if test "$SWIG" != "false" ; then
SWIG="$SWIG -c++"
fi
])
# SWIG_PYTHON([use-shadow-classes])
#
# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables.
# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate
# code for Python. If you need multi module support use
# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT()
# macro) to link against the appropriate library. It contains the
# SWIG Python runtime library that is needed by the type check system
# for example.
AC_DEFUN([SWIG_PYTHON],[
AC_REQUIRE([SWIG_PROG])
AC_REQUIRE([PYTHON_DEVEL])
if test "$SWIG" != "false" ; then
AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy])
dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow=""
dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow])
AC_SUBST(SWIG_PYTHON_OPT,[-python])
fi
AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS])
])

View File

@ -0,0 +1,36 @@
# Check for IPC System V shm support. -*- Autoconf -*-
# Copyright 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([GR_SYSV_SHM],
[
AC_LANG_SAVE
AC_LANG_C
AC_CHECK_HEADERS([sys/ipc.h sys/shm.h])
save_LIBS="$LIBS"
AC_SEARCH_LIBS(shmat, [cygipc ipc],
[ IPC_LIBS="$LIBS" ],
[ AC_MSG_WARN([SystemV IPC support not found. ]) ]
)
LIBS="$save_LIBS"
AC_LANG_RESTORE
AC_SUBST(IPC_LIBS)
])

View File

@ -0,0 +1,42 @@
dnl Autoconf support for C++
dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a configuration
dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
# -------------------------------------------------------------------------
# Use this macro to configure your C compiler
# When called the macro does the following things:
# 1. It finds an appropriate C compiler.
# If you passed the flag --with-cc=foo then it uses that
# particular compiler
# 2. Check whether the compiler works.
# 3. Checks whether the compiler accepts the -g
# -------------------------------------------------------------------------
AC_DEFUN([LF_CONFIGURE_CC],[
dnl Sing the song
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
AC_REQUIRE([AC_AIX])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_MINIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
])

View File

@ -0,0 +1,121 @@
dnl Autoconf support for C++
dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a configuration
dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
# -----------------------------------------------------------------
# This macro should be called to configure your C++ compiler.
# When called, the macro does the following things:
# 1. It finds an appropriate C++ compiler
# If you passed the flag --with-cxx=foo, then it uses that
# particular compiler
# 2. Checks whether the compiler accepts the -g
# ------------------------------------------------------------------
AC_DEFUN([LF_CONFIGURE_CXX],[
AC_REQUIRE([AC_PROG_CXX])dnl
AC_REQUIRE([AC_PROG_CXXCPP])dnl
LF_CXX_PORTABILITY
])
# -----------------------------------------------------------------------
# This macro tests the C++ compiler for various portability problem.
# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool
# data type
# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy
# scoping for the for-loop
# 3. Defines USE_ASSERT if the user wants to use assertions
# -----------------------------------------------------------------------
AC_DEFUN([LF_CXX_PORTABILITY],[
dnl
dnl Check for common C++ portability problems
dnl
dnl AC_LANG_PUSH
dnl AC_LANG_CPLUSPLUS
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
dnl Check whether we have bool
AC_MSG_CHECKING(whether C++ has bool)
AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
[ AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no)
AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ],
[ AC_MSG_WARN(Don't cross-compile)]
)
dnl Test whether C++ has buggy for-loops
AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops)
AC_TRY_COMPILE([#include <iostream.h>], [
for (int i=0;i<10;i++) { }
for (int i=0;i<10;i++) { }
], [ AC_MSG_RESULT(no) ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ])
dnl Test whether the user wants to enable assertions
AC_MSG_CHECKING(whether user wants assertions)
AC_ARG_ENABLE(assert,
[ --disable-assert don't use cpp.h assert],
[ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)])
AC_MSG_RESULT(no) ],
[ AC_MSG_RESULT(yes) ],
)
dnl Test whether C++ has std::isnan
AC_MSG_CHECKING(whether C++ has std::isnan)
AC_TRY_COMPILE([#include <math.h>], [
std::isnan(0);
], [ AC_MSG_RESULT(yes)
AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ],
[ AC_MSG_RESULT(no) ])
dnl Done with the portability checks
dnl AC_LANG_POP([C++])
AC_LANG_RESTORE
])
AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping
// That's quite a few compilers actually including recent versions of
// Dec Alpha cxx, HP-UX CC and SGI CC.
// The trivial "if" statement provides the correct scoping to the
// for loop
#ifdef CXX_HAS_BUGGY_FOR_LOOPS
#undef for
#define for if(1) for
#endif
])
AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then
// the following is a near-perfect work-around.
// You must make sure your code does not depend on "int" and "bool"
// being two different types, in overloading for instance.
#ifdef CXX_HAS_NO_BOOL
#define bool int
#define true 1
#define false 0
#endif
])

View File

@ -0,0 +1,128 @@
dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a configuration
dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
# --------------------------------------------------------------------------
# Check whether the C++ compiler accepts a certain flag
# If it does it adds the flag to CXXFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...)
# -------------------------------------------------------------------------
AC_DEFUN([LF_CHECK_CXX_FLAG],[
echo 'void f(){}' > conftest.cc
for i in $1
do
AC_MSG_CHECKING([whether $CXX accepts $i])
if test -z "`${CXX} $i -c conftest.cc 2>&1`"
then
CXXFLAGS="${CXXFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.cc conftest.o
])
# --------------------------------------------------------------------------
# Check whether the C compiler accepts a certain flag
# If it does it adds the flag to CFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...)
# -------------------------------------------------------------------------
AC_DEFUN([LF_CHECK_CC_FLAG],[
echo 'void f(){}' > conftest.c
for i in $1
do
AC_MSG_CHECKING([whether $CC accepts $i])
if test -z "`${CC} $i -c conftest.c 2>&1`"
then
CFLAGS="${CFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.c conftest.o
])
# --------------------------------------------------------------------------
# Check whether the Fortran compiler accepts a certain flag
# If it does it adds the flag to FFLAGS
# If it does not then it returns an error to lf_ok
# Usage:
# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...)
# -------------------------------------------------------------------------
AC_DEFUN([LF_CHECK_F77_FLAG],[
cat << EOF > conftest.f
c....:++++++++++++++++++++++++
PROGRAM MAIN
PRINT*,'Hello World!'
END
EOF
for i in $1
do
AC_MSG_CHECKING([whether $F77 accepts $i])
if test -z "`${F77} $i -c conftest.f 2>&1`"
then
FFLAGS="${FFLAGS} $i"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
done
rm -f conftest.f conftest.o
])
# ----------------------------------------------------------------------
# Provide the configure script with an --with-warnings option that
# turns on warnings. Call this command AFTER you have configured ALL your
# compilers.
# ----------------------------------------------------------------------
AC_DEFUN([LF_SET_WARNINGS],[
dnl Check for --with-warnings
AC_MSG_CHECKING([whether user wants warnings])
AC_ARG_WITH(warnings,
[ --with-warnings Turn on warnings],
[ lf_warnings=yes ], [ lf_warnings=no ])
lf_warnings=yes # hard code for now -eb
AC_MSG_RESULT($lf_warnings)
dnl Warnings for the two main compilers
cc_warning_flags="-Wall"
cxx_warning_flags="-Wall -Woverloaded-virtual"
if test $lf_warnings = yes
then
if test -n "${CC}"
then
LF_CHECK_CC_FLAG($cc_warning_flags)
fi
if test -n "${CXX}"
then
LF_CHECK_CXX_FLAG($cxx_warning_flags)
fi
fi
])

View File

@ -0,0 +1,39 @@
dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a configuration
dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
#-----------------------------------------------------------------------
# This macro searches for Xlib and when it finds it it adds the
# appropriate flags to CXXFLAGS and export the link sequence to
# the variable XLIB.
# In your configure.in file add:
# LF_PATH_XLIB
# In your Makefile.am add
# program_LDADD = .... $(XLIB)
#------------------------------------------------------------------------
AC_DEFUN([LF_PATH_XLIB],[
AC_PATH_XTRA
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_SUBST(XLIB)
])

View File

@ -0,0 +1,89 @@
#serial 4
# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
# silly limit that it can create no more than 26 files from a given template.
# Other systems lack mkstemp altogether.
# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
# only 32 files per process.
# On systems like the above, arrange to use the replacement function.
AC_DEFUN([UTILS_FUNC_MKSTEMP],
[dnl
AC_REPLACE_FUNCS(mkstemp)
if test $ac_cv_func_mkstemp = no; then
utils_cv_func_mkstemp_limitations=yes
else
AC_CACHE_CHECK([for mkstemp limitations],
utils_cv_func_mkstemp_limitations,
[
AC_TRY_RUN([
# include <stdlib.h>
int main ()
{
int i;
for (i = 0; i < 70; i++)
{
char template[] = "conftestXXXXXX";
int fd = mkstemp (template);
if (fd == -1)
exit (1);
close (fd);
}
exit (0);
}
],
utils_cv_func_mkstemp_limitations=no,
utils_cv_func_mkstemp_limitations=yes,
utils_cv_func_mkstemp_limitations=yes
)
]
)
fi
if test $utils_cv_func_mkstemp_limitations = yes; then
AC_LIBOBJ(mkstemp)
AC_LIBOBJ(tempname)
AC_DEFINE(mkstemp, rpl_mkstemp,
[Define to rpl_mkstemp if the replacement function should be used.])
gl_PREREQ_MKSTEMP
jm_PREREQ_TEMPNAME
fi
])
# Prerequisites of lib/mkstemp.c.
AC_DEFUN([gl_PREREQ_MKSTEMP],
[
AH_BOTTOM(
[
#ifndef HAVE_MKSTEMP
#ifdef __cplusplus
extern "C" {
#endif
int rpl_mkstemp (char *templ);
#ifdef __cplusplus
}
#endif
#endif
])
])
# Prerequisites of lib/tempname.c.
AC_DEFUN([jm_PREREQ_TEMPNAME],
[
AC_REQUIRE([AC_HEADER_STAT])
AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h)
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat)
AC_CHECK_DECLS_ONCE(getenv)
# AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
dnl Under Win32, mkdir prototype in io.h has only one arg
AC_MSG_CHECKING(whether mkdir accepts only one arg)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>], [
mkdir("")
], [ AC_MSG_RESULT(yes)
AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
[ AC_MSG_RESULT(no)
])
])

View File

@ -0,0 +1,63 @@
# onceonly.m4 serial 3
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl This file defines some "once only" variants of standard autoconf macros.
dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
dnl The advantage is that the check for each of the headers/functions/decls
dnl will be put only once into the 'configure' file. It keeps the size of
dnl the 'configure' file down, and avoids redundant output when 'configure'
dnl is run.
dnl The drawback is that the checks cannot be conditionalized. If you write
dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
dnl empty, and the check will be inserted before the body of the AC_DEFUNed
dnl function.
dnl Autoconf version 2.57 or newer is recommended.
AC_PREREQ(2.54)
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
:
AC_FOREACH([gl_HEADER_NAME], [$1], [
AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]),
[-./], [___])), [
AC_CHECK_HEADERS(gl_HEADER_NAME)
])
AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
[-./], [___])))
])
])
# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
:
AC_FOREACH([gl_FUNC_NAME], [$1], [
AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [
AC_CHECK_FUNCS(defn([gl_FUNC_NAME]))
])
AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]))
])
])
# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
# AC_CHECK_DECLS(DECL1, DECL2, ...).
AC_DEFUN([AC_CHECK_DECLS_ONCE], [
:
AC_FOREACH([gl_DECL_NAME], [$1], [
AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [
AC_CHECK_DECLS(defn([gl_DECL_NAME]))
])
AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME]))
])
])

68
grkkgps-0.1/config/pkg.m4 Normal file
View File

@ -0,0 +1,68 @@
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig.
dnl If it's set, assume the user knows what they're doing.
dnl This should help avoid failures while looking for fftw3f
if test -z "$PKG_CONFIG_PATH"; then
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
fi
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
if $PKG_CONFIG --exists "$2" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING($1_CFLAGS)
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
$1_LIBS=`$PKG_CONFIG --libs "$2"`
AC_MSG_RESULT($$1_LIBS)
AC_MSG_CHECKING($1_INCLUDEDIR)
$1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"`
AC_MSG_RESULT($$1_INCLUDEDIR)
else
$1_CFLAGS=""
$1_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
ifelse([$4], ,echo $$1_PKG_ERRORS,)
fi
AC_SUBST($1_CFLAGS)
AC_SUBST($1_LIBS)
AC_SUBST($1_INCLUDEDIR)
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
ifelse([$3], , :, [$3])
else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
fi
])

View File

@ -0,0 +1,54 @@
dnl
dnl Copyright 2003 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
AC_REQUIRE([AC_CANONICAL_TARGET])
AC_ARG_WITH(fusb-tech,
[ --with-fusb-tech=OS set fast usb technique (auto)],
[cf_with_fusb_tech="$withval"],
[cf_with_fusb_tech="$target_os"])
AC_CHECK_HEADER([linux/usbdevice_fs.h],
[x_have_usbdevice_fs_h=yes],
[x_have_usbdevice_fs_h=no])
AC_MSG_CHECKING([for fast usb technique to use])
case "$cf_with_fusb_tech" in
linux*) if test x${x_have_usbdevice_fs_h} = xyes;
then
FUSB_TECH=linux
else
FUSB_TECH=generic
fi ;;
darwin*) FUSB_TECH=darwin ;;
*) FUSB_TECH=generic ;;
esac
AC_MSG_RESULT($FUSB_TECH)
AC_SUBST(FUSB_TECH)
AM_CONDITIONAL(FUSB_TECH_darwin, test $FUSB_TECH = darwin)
AM_CONDITIONAL(FUSB_TECH_generic, test $FUSB_TECH = generic)
AM_CONDITIONAL(FUSB_TECH_linux, test $FUSB_TECH = linux)
])

View File

@ -0,0 +1,38 @@
# Check for libusb support. -*- Autoconf -*-
# Copyright 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([USRP_LIBUSB],
[
AC_LANG_PUSH(C)
AC_CHECK_HEADERS([usb.h],
[],
[ AC_MSG_ERROR([USRP requires libusb. usb.h not found, stop. See http://libusb.sf.net]) ]
)
save_LIBS="$LIBS"
AC_SEARCH_LIBS(usb_bulk_write, [usb],
[ USB_LIBS="$LIBS" ],
[ AC_MSG_ERROR([USRP requires libusb. usb_bulk_write not found, stop. See http://libusb.sf.net]) ]
)
LIBS="$save_LIBS"
AC_LANG_POP
AC_SUBST(USB_LIBS)
])

View File

@ -0,0 +1,67 @@
# Check for sdcc support. -*- Autoconf -*-
# Copyright 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([USRP_SDCC],
[
AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no)
AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no)
if test "$XCC" = "no" -o "$XAS" = "no" ; then
AC_MSG_ERROR([USRP requires sdcc. sdcc not found, stop. See http://sdcc.sf.net])
fi
sdcc_version_min=$1
sdcc_version=`sdcc --version 2>&1 | \
sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'`
AC_MSG_CHECKING([sdcc_version "$sdcc_version"])
sdcc_major_version=`echo $sdcc_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdcc_minor_version=`echo $sdcc_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdcc_micro_version=`echo $sdcc_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
sdcc_major_min=`echo $sdcc_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdcc_minor_min=`echo $sdcc_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdcc_micro_min=`echo $sdcc_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
sdcc_version_proper=`expr \
"$sdcc_major_version" \> "$sdcc_major_min" \| \
"$sdcc_major_version" \= "$sdcc_major_min" \& \
"$sdcc_minor_version" \> "$sdcc_minor_min" \| \
"$sdcc_major_version" \= "$sdcc_major_min" \& \
"$sdcc_minor_version" \= "$sdcc_minor_min" \& \
"$sdcc_micro_version" \>= "$sdcc_micro_min" `
if test "$sdcc_version_proper" = "1" ; then
AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version])
else
AC_MSG_ERROR([USRP requires sdcc >= $sdcc_version_min. sdcc not found, stop. See http://sdcc.sf.net])
fi
AC_SUBST(XCC)
AC_SUBST(XAS)
])

25861
grkkgps-0.1/configure vendored Executable file

File diff suppressed because it is too large Load Diff

102
grkkgps-0.1/configure.ac Executable file
View File

@ -0,0 +1,102 @@
dnl
dnl Copyright 2004 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
dnl GNU Radio is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Radio is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Radio; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
AC_INIT
AC_PREREQ(2.57)
AC_CONFIG_SRCDIR([src/lib/grkkgps.i])
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(grkkgps,0.1)
dnl LF_CONFIGURE_CC
LF_CONFIGURE_CXX
LF_SET_WARNINGS
GR_SET_GPROF
GR_SET_PROF
GR_PROG_AS
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_LIBTOOL_WIN32_DLL
AC_ENABLE_SHARED dnl do build shared libraries
AC_DISABLE_STATIC dnl don't build static libraries
AC_PROG_LIBTOOL
dnl Locate python, SWIG, etc
GR_SCRIPTING
dnl Checks for libraries.
dnl check for threads (mandatory)
GR_OMNITHREAD
CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
if test "x$CXX_FOR_BUILD" = x
then
CXX_FOR_BUILD=${CXX}
fi
AC_SUBST(CXX_FOR_BUILD)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h)
AC_CHECK_HEADERS(sys/mman.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_CHECK_FUNCS([])
dnl Check for Mingw support
GR_PWIN32
PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2)
LIBS="$LIBS $GNURADIO_CORE_LIBS"
dnl Define where to find boost includes
dnl defines BOOST_CFLAGS
GR_REQUIRE_BOOST_INCLUDES
STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS"
AC_SUBST(STD_DEFINES_AND_INCLUDES)
AC_CONFIG_FILES([\
Makefile \
config/Makefile \
src/Makefile \
src/lib/Makefile \
src/python/Makefile \
src/python/run_tests \
])
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests], [chmod +x src/python/run_tests])
AC_OUTPUT

530
grkkgps-0.1/depcomp Executable file
View File

@ -0,0 +1,530 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

323
grkkgps-0.1/install-sh Executable file
View File

@ -0,0 +1,323 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

6538
grkkgps-0.1/ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

360
grkkgps-0.1/missing Executable file
View File

@ -0,0 +1,360 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

146
grkkgps-0.1/py-compile Executable file
View File

@ -0,0 +1,146 @@
#!/bin/sh
# py-compile - Compile a Python program
scriptversion=2005-05-14.22
# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
if [ -z "$PYTHON" ]; then
PYTHON=python
fi
basedir=
destdir=
files=
while test $# -ne 0; do
case "$1" in
--basedir)
basedir=$2
if test -z "$basedir"; then
echo "$0: Missing argument to --basedir." 1>&2
exit 1
fi
shift
;;
--destdir)
destdir=$2
if test -z "$destdir"; then
echo "$0: Missing argument to --destdir." 1>&2
exit 1
fi
shift
;;
-h|--h*)
cat <<\EOF
Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
Byte compile some python scripts FILES. Use --destdir to specify any
leading directory path to the FILES that you don't want to include in the
byte compiled file. Specify --basedir for any additional path information you
do want to be shown in the byte compiled file.
Example:
py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v|--v*)
echo "py-compile $scriptversion"
exit $?
;;
*)
files="$files $1"
;;
esac
shift
done
if test -z "$files"; then
echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
exit 1
fi
# if basedir was given, then it should be prepended to filenames before
# byte compilation.
if [ -z "$basedir" ]; then
pathtrans="path = file"
else
pathtrans="path = os.path.join('$basedir', file)"
fi
# if destdir was given, then it needs to be prepended to the filename to
# byte compile but not go into the compiled file.
if [ -z "$destdir" ]; then
filetrans="filepath = path"
else
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
fi
$PYTHON -c "
import sys, os, string, py_compile
files = '''$files'''
print 'Byte-compiling python modules...'
for file in string.split(files):
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
print file,
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
print" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
import sys, os, string, py_compile
files = '''$files'''
print 'Byte-compiling python modules (optimized versions) ...'
for file in string.split(files):
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
continue
print file,
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'o', path)
print" 2>/dev/null || :
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

22
grkkgps-0.1/src/Makefile.am Executable file
View File

@ -0,0 +1,22 @@
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
SUBDIRS = lib python

540
grkkgps-0.1/src/Makefile.in Normal file
View File

@ -0,0 +1,540 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \
$(top_srcdir)/config/gr_as.m4 $(top_srcdir)/config/gr_boost.m4 \
$(top_srcdir)/config/gr_gprof.m4 \
$(top_srcdir)/config/gr_omnithread.m4 \
$(top_srcdir)/config/gr_pwin32.m4 \
$(top_srcdir)/config/gr_python.m4 \
$(top_srcdir)/config/gr_scripting.m4 \
$(top_srcdir)/config/gr_swig.m4 $(top_srcdir)/config/lf_cxx.m4 \
$(top_srcdir)/config/lf_warnings.m4 \
$(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_CFLAGS = @BOOST_CFLAGS@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@
GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@
GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMNITHREAD_NT_FALSE = @OMNITHREAD_NT_FALSE@
OMNITHREAD_NT_TRUE = @OMNITHREAD_NT_TRUE@
OMNITHREAD_POSIX_FALSE = @OMNITHREAD_POSIX_FALSE@
OMNITHREAD_POSIX_TRUE = @OMNITHREAD_POSIX_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@
STRIP = @STRIP@
SWIG = @SWIG@
SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@
SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
SUBDIRS = lib python
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
clean clean-generic clean-libtool clean-recursive ctags \
ctags-recursive distclean distclean-generic distclean-libtool \
distclean-recursive distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

98
grkkgps-0.1/src/lib/Makefile.am Executable file
View File

@ -0,0 +1,98 @@
#
# Copyright 2004,2005 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
include $(top_srcdir)/Makefile.common
# Install this stuff so that it ends up as the gnuradio.grkkgps module
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
ourpythondir = $(grpythondir)
ourlibdir = $(grpyexecdir)
INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) \
-I$(swigincludedir) -I$(grincludedir)
ALL_IFILES = \
$(LOCAL_IFILES) \
$(NON_LOCAL_IFILES)
NON_LOCAL_IFILES = \
$(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i
LOCAL_IFILES = \
grkkgps.i
# These files are built by SWIG. The first is the C++ glue.
# The second is the python wrapper that loads the _grkkgps shared library
# and knows how to call our extensions.
BUILT_SOURCES = \
grkkgps.cc \
grkkgps.py
# This gets grkkgps.py installed in the right place
ourpython_PYTHON = \
grkkgps.py
ourlib_LTLIBRARIES = _grkkgps.la
# These are the source files that go into the shared library
_grkkgps_la_SOURCES = \
kkutils.h \
gps_source.h \
gps_source.cc \
gps_corr.h \
gps_corr.cc \
gps_corr_generic.h \
gps_corr_generic.cc \
grkkgps.cc \
grkkgps_gps_source_f.cc \
grkkgps_tracking_gps_correlator_fc.cc
# grkkgps_gps_correlator_f.cc
# magic flags
_grkkgps_la_LDFLAGS = -module -avoid-version
# link the library against some comon swig runtime code and the
# c++ standard library
_grkkgps_la_LIBADD = \
-lstdc++
grkkgps.cc grkkgps.py: grkkgps.i $(ALL_IFILES)
$(SWIG) $(SWIGCPPPYTHONARGS) -module grkkgps -o grkkgps.cc $<
# These headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
grkkgps_gps_source_f.h \
grkkgps_tracking_gps_correlator_fc.h
# grkkgps_gps_correlator_f.h
# These swig headers get installed in ${prefix}/include/gnuradio/swig
swiginclude_HEADERS = \
$(LOCAL_IFILES)
MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc

View File

@ -0,0 +1,726 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright 2004,2005 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# -*- Makefile -*-
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(grinclude_HEADERS) $(ourpython_PYTHON) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(swiginclude_HEADERS) $(top_srcdir)/Makefile.common
subdir = src/lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/acx_pthread.m4 \
$(top_srcdir)/config/gr_as.m4 $(top_srcdir)/config/gr_boost.m4 \
$(top_srcdir)/config/gr_gprof.m4 \
$(top_srcdir)/config/gr_omnithread.m4 \
$(top_srcdir)/config/gr_pwin32.m4 \
$(top_srcdir)/config/gr_python.m4 \
$(top_srcdir)/config/gr_scripting.m4 \
$(top_srcdir)/config/gr_swig.m4 $(top_srcdir)/config/lf_cxx.m4 \
$(top_srcdir)/config/lf_warnings.m4 \
$(top_srcdir)/config/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(ourlibdir)" "$(DESTDIR)$(ourpythondir)" \
"$(DESTDIR)$(grincludedir)" "$(DESTDIR)$(swigincludedir)"
ourlibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(ourlib_LTLIBRARIES)
_grkkgps_la_DEPENDENCIES =
am__grkkgps_la_OBJECTS = gps_source.lo gps_corr.lo gps_corr_generic.lo \
grkkgps.lo grkkgps_gps_source_f.lo \
grkkgps_tracking_gps_correlator_fc.lo
_grkkgps_la_OBJECTS = $(am__grkkgps_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(_grkkgps_la_SOURCES)
DIST_SOURCES = $(_grkkgps_la_SOURCES)
ourpythonPYTHON_INSTALL = $(INSTALL_DATA)
py_compile = $(top_srcdir)/py-compile
grincludeHEADERS_INSTALL = $(INSTALL_HEADER)
swigincludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(grinclude_HEADERS) $(swiginclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BOOST_CFLAGS = @BOOST_CFLAGS@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GNURADIO_CORE_CFLAGS = @GNURADIO_CORE_CFLAGS@
GNURADIO_CORE_INCLUDEDIR = @GNURADIO_CORE_INCLUDEDIR@
GNURADIO_CORE_LIBS = @GNURADIO_CORE_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OMNITHREAD_NT_FALSE = @OMNITHREAD_NT_FALSE@
OMNITHREAD_NT_TRUE = @OMNITHREAD_NT_TRUE@
OMNITHREAD_POSIX_FALSE = @OMNITHREAD_POSIX_FALSE@
OMNITHREAD_POSIX_TRUE = @OMNITHREAD_POSIX_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STD_DEFINES_AND_INCLUDES = @STD_DEFINES_AND_INCLUDES@
STRIP = @STRIP@
SWIG = @SWIG@
SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
SWIG_PYTHON_LIB = @SWIG_PYTHON_LIB@
SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
# includes
grincludedir = $(includedir)/gnuradio
# swig includes
swigincludedir = $(grincludedir)/swig
# Install this stuff in the appropriate subdirectory
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
grpythondir = $(pythondir)/gnuradio
grpyexecdir = $(pyexecdir)/gnuradio
# Install this stuff so that it ends up as the gnuradio.grkkgps module
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
ourpythondir = $(grpythondir)
ourlibdir = $(grpyexecdir)
INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
SWIGCPPPYTHONARGS = -python $(PYTHON_CPPFLAGS) \
-I$(swigincludedir) -I$(grincludedir)
ALL_IFILES = \
$(LOCAL_IFILES) \
$(NON_LOCAL_IFILES)
NON_LOCAL_IFILES = \
$(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i
LOCAL_IFILES = \
grkkgps.i
# These files are built by SWIG. The first is the C++ glue.
# The second is the python wrapper that loads the _grkkgps shared library
# and knows how to call our extensions.
BUILT_SOURCES = \
grkkgps.cc \
grkkgps.py
# This gets grkkgps.py installed in the right place
ourpython_PYTHON = \
grkkgps.py
ourlib_LTLIBRARIES = _grkkgps.la
# These are the source files that go into the shared library
_grkkgps_la_SOURCES = \
kkutils.h \
gps_source.h \
gps_source.cc \
gps_corr.h \
gps_corr.cc \
gps_corr_generic.h \
gps_corr_generic.cc \
grkkgps.cc \
grkkgps_gps_source_f.cc \
grkkgps_tracking_gps_correlator_fc.cc
# grkkgps_gps_correlator_f.cc
# magic flags
_grkkgps_la_LDFLAGS = -module -avoid-version
# link the library against some comon swig runtime code and the
# c++ standard library
_grkkgps_la_LIBADD = \
-lstdc++
# These headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
grkkgps_gps_source_f.h \
grkkgps_tracking_gps_correlator_fc.h
# grkkgps_gps_correlator_f.h
# These swig headers get installed in ${prefix}/include/gnuradio/swig
swiginclude_HEADERS = \
$(LOCAL_IFILES)
MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-ourlibLTLIBRARIES: $(ourlib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(ourlibdir)" || $(mkdir_p) "$(DESTDIR)$(ourlibdir)"
@list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(ourlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(ourlibdir)/$$f'"; \
$(LIBTOOL) --mode=install $(ourlibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(ourlibdir)/$$f"; \
else :; fi; \
done
uninstall-ourlibLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(ourlibdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(ourlibdir)/$$p"; \
done
clean-ourlibLTLIBRARIES:
-test -z "$(ourlib_LTLIBRARIES)" || rm -f $(ourlib_LTLIBRARIES)
@list='$(ourlib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
_grkkgps.la: $(_grkkgps_la_OBJECTS) $(_grkkgps_la_DEPENDENCIES)
$(CXXLINK) -rpath $(ourlibdir) $(_grkkgps_la_LDFLAGS) $(_grkkgps_la_OBJECTS) $(_grkkgps_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gps_corr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gps_corr_generic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gps_source.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grkkgps.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grkkgps_gps_source_f.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grkkgps_tracking_gps_correlator_fc.Plo@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-ourpythonPYTHON: $(ourpython_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(ourpythondir)" || $(mkdir_p) "$(DESTDIR)$(ourpythondir)"
@list='$(ourpython_PYTHON)'; dlist=''; for p in $$list; do\
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
f=$(am__strip_dir) \
dlist="$$dlist $$f"; \
echo " $(ourpythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(ourpythondir)/$$f'"; \
$(ourpythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(ourpythondir)/$$f"; \
else :; fi; \
done; \
if test -n "$$dlist"; then \
if test -z "$(DESTDIR)"; then \
PYTHON=$(PYTHON) $(py_compile) --basedir "$(ourpythondir)" $$dlist; \
else \
PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(ourpythondir)" $$dlist; \
fi; \
else :; fi
uninstall-ourpythonPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(ourpython_PYTHON)'; dlist=''; for p in $$list; do\
f=$(am__strip_dir) \
rm -f "$(DESTDIR)$(ourpythondir)/$$f"; \
rm -f "$(DESTDIR)$(ourpythondir)/$${f}c"; \
rm -f "$(DESTDIR)$(ourpythondir)/$${f}o"; \
done
install-grincludeHEADERS: $(grinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(grincludedir)" || $(mkdir_p) "$(DESTDIR)$(grincludedir)"
@list='$(grinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(grincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(grincludedir)/$$f'"; \
$(grincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(grincludedir)/$$f"; \
done
uninstall-grincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(grinclude_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(grincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(grincludedir)/$$f"; \
done
install-swigincludeHEADERS: $(swiginclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(swigincludedir)" || $(mkdir_p) "$(DESTDIR)$(swigincludedir)"
@list='$(swiginclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(swigincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(swigincludedir)/$$f'"; \
$(swigincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(swigincludedir)/$$f"; \
done
uninstall-swigincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(swiginclude_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(swigincludedir)/$$f'"; \
rm -f "$(DESTDIR)$(swigincludedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../..
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(ourlibdir)" "$(DESTDIR)$(ourpythondir)" "$(DESTDIR)$(grincludedir)" "$(DESTDIR)$(swigincludedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-ourlibLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-grincludeHEADERS install-ourlibLTLIBRARIES \
install-ourpythonPYTHON install-swigincludeHEADERS
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-grincludeHEADERS uninstall-info-am \
uninstall-ourlibLTLIBRARIES uninstall-ourpythonPYTHON \
uninstall-swigincludeHEADERS
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-ourlibLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-grincludeHEADERS install-info \
install-info-am install-man install-ourlibLTLIBRARIES \
install-ourpythonPYTHON install-strip \
install-swigincludeHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-grincludeHEADERS uninstall-info-am \
uninstall-ourlibLTLIBRARIES uninstall-ourpythonPYTHON \
uninstall-swigincludeHEADERS
grkkgps.cc grkkgps.py: grkkgps.i $(ALL_IFILES)
$(SWIG) $(SWIGCPPPYTHONARGS) -module grkkgps -o grkkgps.cc $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,424 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_corr.h"
#include "gps_corr_generic.h"
#include <iostream>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//GPSCorrelatorTrack::
//---------------------------------------------------------------------------
GPSCorrelatorTrack::GPSCorrelatorTrack(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber)
: GPSCorrelatorState(inSampleRate,inIntermediateFreq,inChipRate)
, chips_(inPrnNumber)
, trackingState_(tsIdle)
, intermediateFreq_(inIntermediateFreq)
, deltaSearchFreq_(200.0)
, minSearchFreq_(inIntermediateFreq - 20e3)
, maxSearchFreq_(inIntermediateFreq + 20e3)
, carrierFreq_(inIntermediateFreq)
, threshold_(0.0)
, belowThresholdCount_(0)
, confirmSetupCountTotal_(8)
, confirmSetupCountPass_(6)
, confirmHistory_(confirmSetupCountTotal_)
, debug_level_(0)
{
reset();
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::reset()
{
trackingState_ = tsIdle;
codeSearchIndex_ = 0;
curVector_ = -1;
oldVector_ = -1;
confirmCount_ = 0;
lastFreqError_ = 0;
searchFreqBase_ = carrierFreq_;
searchFreqUpper_ = searchFreqBase_;
searchFreqLower_ = searchFreqBase_;
confirmAttempts_ = 0;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::debug_level_set(
s32 const inDebugLevel)
{
debug_level_ = inDebugLevel;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::threshold_set(
f64 const inThreshold)
{
threshold_ = inThreshold;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::start()
{
trackingState_ = tsSearch;
}
//---------------------------------------------------------------------------
void
GPSCorrelatorTrack::prnNumberSet(
u32 const inPrnNumber)
{
chips_.generateChips(inPrnNumber);
}
//---------------------------------------------------------------------------
f64
GPSCorrelatorTrack::dopplerDeltaFreq()
const
{
return carrierFreqGet() - intermediateFreq_;
}
//---------------------------------------------------------------------------
bool
GPSCorrelatorTrack::doTrack(
f32 const*& inBegin,
f32 const* const inEnd)
{
//process block of data
switch(trackingState_)
{
case tsSearch:
chipResetOffset_ = 0;
chipBase_ = chips_.promptEarly_;
break;
default:
chipResetOffset_ = (2 << 16);
chipBase_ = chips_.promptEarlyMinusLate_;
break;
}
bool const dump = processGPSCorrelator(inBegin,inEnd,this);
if(dump)
{
u64 const currSamples = processedSamples_;
f32 const ip = dumpedSums_.ip_;
f32 const qp = dumpedSums_.qp_;
f32 const it = dumpedSums_.it_;
f32 const qt = dumpedSums_.qt_;
oldVector_ = curVector_;
curVector_ = cf64(ip,qp);
history_ <<= 1;
if(curVector_.real() > 0) history_ |= 1;
// f64 const npv = abs(curVector_);
// f64 const npv = abs(cf64(ip+it,qp+qt));
f64 const npv = abs(cf64(ip,qp)) + abs(cf64(it,qt));
//cache threshold value
f64 const threshold = threshold_;
//update code search index if in tsSearch mode
if(0 == chipResetOffset_)
++codeSearchIndex_;
if(debug_level_ > 0)
{
cf64 const pv(ip,qp);
cf64 const tv(it,qt);
switch(trackingState_)
{
case tsIdle:
break;
case tsSearch:
break;
case tsSearchConfirm:
break;
case tsAdjustCarrierFrequency:
break;
case tsAdjustCarrierPhase:
break;
case tsAdjustConfirm:
std::cout << "Confirm: " << pv << ":" << abs(pv) << " " << tv << ":" << abs(tv) << " " << abs(pv) + abs(tv) << "\n";
break;
case tsTracking:
std::cout << "Track: pv" << pv << " " << abs(pv) << " " << (arg(pv) * 180.0 / M_PI);
std::cout << " tv: "<< tv << " " << abs(tv) << " " << (arg(tv) * 180.0 / M_PI);
std::cout.precision ( 8 );
std::cout << " cfreq: " << carrierFreqGet() << "\n";
break;
}
}
switch(trackingState_)
{
case tsIdle:
case tsSearch:
case tsSearchConfirm:
break;
case tsAdjustCarrierFrequency:
case tsAdjustCarrierPhase:
break;
case tsAdjustConfirm:
case tsTracking:
if( npv < threshold )
{
++belowThresholdCount_;
if(belowThresholdCount_ > 8)
{
trackingState_ = tsSearch;
}
}
else
{
belowThresholdCount_ = 0;
}
break;
}
// std::cout << trackingState_ << " " << searchFreqBase_ << " " << codeSearchIndex_ << "\n";
switch(trackingState_)
{
case tsIdle:
{
}
break;
case tsSearch:
if(npv >= threshold)
{
trackingState_ = tsSearchConfirm;
confirmCount_ = 1;
confirmHistory_[0] = curVector_;
++confirmAttempts_;
}
else
{
if(codeSearchIndex_ >= 1024)
{ //completed code search at this frequency
//select new frequency
codeSearchIndex_ = 0;
bool const maxReached = (maxSearchFreq_ == searchFreqUpper_);
bool const minReached = (minSearchFreq_ == searchFreqLower_);
// bool const baseIsAtUpper = (searchFreqBase_ == searchFreqUpper_);
bool const baseIsAtLower = (searchFreqBase_ == searchFreqLower_);
if(maxReached && minReached)
{
trackingState_ = tsIdle;
}
else if(!maxReached && baseIsAtLower)
{
searchFreqUpper_ += deltaSearchFreq_;
searchFreqBase_ = searchFreqUpper_;
}
else
{
searchFreqLower_ -= deltaSearchFreq_;
searchFreqBase_ = searchFreqLower_;
}
if(debug_level_ > 0)
{
std::cout << "Freq: " << searchFreqBase_ << " Confirm Attempts: " << confirmAttempts_ << "\n";
}
carrierFreqSet(searchFreqBase_);
confirmAttempts_ = 0;
}
}
break;
case tsSearchConfirm:
{
if(confirmCount_ < confirmSetupCountTotal_)
{
confirmHistory_[confirmCount_] = curVector_;
++confirmCount_;
}
if(confirmSetupCountTotal_ == confirmCount_)
{
/*
s32 passCount = 2;
for(s32 i = 2; i < confirmCount_; ++i)
{
f64 const lastFreqDelta = 180 / M_PI * (arg(confirmHistory_[i-1]) - arg(confirmHistory_[i-2]));
f64 const currFreqDelta = 180 / M_PI * (arg(confirmHistory_[i]) - arg(confirmHistory_[i-1]));
f64 const deltaDelta = currFreqDelta - lastFreqDelta;
if( ( std::fabs(deltaDelta) <= 5.0 ) || ( std::fabs( std::fabs(deltaDelta) - 180 ) <= 5.0 ) )
{
++passCount;
if(debug_level_ > 0) std::cout << confirmAttempts_ << " " << i << " " << lastFreqDelta << " " << currFreqDelta << "\n";
}
}
*/
s32 passCount = 0;
for(s32 i = 0; i < confirmCount_; ++i)
{
if(std::abs(confirmHistory_[i]) > threshold) ++passCount;
if(debug_level_ > 0) std::cout << threshold << " " << std::abs(confirmHistory_[i]) << "\n";
}
if(passCount < confirmSetupCountPass_)
{
trackingState_ = tsSearch;
}
else
{
trackingState_ = tsAdjustCarrierFrequency;
if(debug_level_ > 0)
{
std::cout << "PRN: " << chips_.prnNumber_ << "\n";
for(s32 i = 0; i < confirmCount_; ++i)
{
std::cout << confirmHistory_[i] << " " << abs(confirmHistory_[i]) << " " << 180 / M_PI * arg(confirmHistory_[i]) << "\n";
}
for(s32 i = 1; i < confirmCount_; ++i)
{
f64 const freqDelta = 180 / M_PI * (arg(confirmHistory_[i]) - arg(confirmHistory_[i-1]));
std::cout << freqDelta << "\n";
}
}
}
}
}
break;
case tsAdjustCarrierFrequency:
{
//adjust carrier frequency
f64 freqTheta = std::arg(curVector_ / oldVector_);
if(freqTheta > (M_PI * 0.5))
freqTheta -= M_PI;
if(freqTheta < (-M_PI * 0.5))
freqTheta += M_PI;
freqTheta *= (sampleRate_ / (2 * M_PI)) / currSamples;
f64 const freqError = freqTheta * pow(2.0,32) / sampleRate_;
f64 fet;
if(freqError > 0)
fet = floor(freqError + 0.5);
else
fet = ceil(freqError - 0.5);
carrierDelta_ += static_cast<u32>(fet);
trackingState_ = tsAdjustCarrierPhase;
if(debug_level_ > 0)
{
std::cout << "tsAdjustCarrierFrequency cur old: " << curVector_ << " " << oldVector_ << " freqTheta: " << freqTheta << " Freq: " << carrierFreqGet() << "\n";
}
}
break;
case tsAdjustCarrierPhase:
{
//adjust carrier phase
f64 phase_theta = arg(curVector_);
if(phase_theta > (M_PI * 0.5))
phase_theta -= M_PI;
if(phase_theta < (-M_PI * 0.5))
phase_theta += M_PI;
phase_theta *= (1 / (2 * M_PI));
f64 const phase_error = phase_theta * pow(2.0,32);
f64 pet;
if(phase_error > 0)
pet = floor(phase_error + 0.5);
else
pet = ceil(phase_error - 0.5);
carrierPhase_ += static_cast<u32>(pet);
confirmCount_ = 0;
trackingState_ = tsAdjustConfirm;
if(debug_level_ > 0)
{
std::cout << "tsAdjustCarrierPhase " << phase_theta << "\n";
}
}
break;
case tsAdjustConfirm:
{
++confirmCount_;
if(confirmCount_ > 5) trackingState_ = tsTracking;
}
break;
case tsTracking:
{
//carrier frequency PLL
f64 freqTheta = atan2(qp,ip);
if(freqTheta > (M_PI * 0.5))
freqTheta -= M_PI;
if(freqTheta < (-M_PI * 0.5))
freqTheta += M_PI;
freqTheta *= (sampleRate_ / (2 * M_PI)) / currSamples;
f64 const freqError = freqTheta * pow(2.0,32) / sampleRate_;
/*
//eventual proper carrier loop filter
f64 const k_a = 0.6;
f64 const k_k = 0.05;
f64 static ynm1 = 0;
ynm1 = k_a * ynm1 + (1.0 - k_a) * freqError;
carrierDelta_ += k_k * ynm1;
*/
carrierDelta_ += static_cast<u32>( 0.2 * (0.1 * freqError + 0.2 * (freqError - lastFreqError_)) );
lastFreqError_ = freqError;
//code phase Lock Loop
cf64 const tv(it,qt);
cf64 const tDivP = tv / curVector_;
f64 const s = tDivP.real() + tDivP.imag();
chipPhase_ += static_cast<u32>((1<<16) * 0.5 * s);
}
break;
}
}
return dump; //dump did not occur
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,450 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_corrH
#define gps_corrH
//---------------------------------------------------------------------------
#include <vector>
#include <cmath>
#include "kkutils.h"
//---------------------------------------------------------------------------
/*
interleave prompt with each of the three other chip patterns
leave a 0 at the beggining of each chip pattern so we can advance one whole
chip during rough search, during normal mode, when we reach the last chip instead
of setting offset to zero chips set to one chip
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// 0 p/2 p 3p/4 2p
//cos 1 0 -1 0 1
//sin 0 1 0 -1 0
//-sin 0 -1 0 1 0
template<typename VA_,u32 BITS_>
class
CosData
{
public:
typedef VA_ Result;
enum {bits = BITS_};
enum {length = 1 << bits};
enum {mask = length - 1};
enum {negSinOffset = 1 << 30};
enum {negSinIndexOffset = negSinOffset >> (32 - bits)};
CosData()
{
for(u32 i = 0; i < length; ++i)
data_[i] = std::cos(M_PI * 2.0 * i / length);
}
static
inline
u32
cosineIndex(
u32 const inPhase)
{
return inPhase >> (32 - bits);
}
static
inline
u32
negSineIndex(
u32 const inPhase)
{
return ((inPhase >> (32 - bits)) + negSinIndexOffset) & mask;
}
inline
Result const*
cosine(
u32 const inPhase)
const
{
return data_ + cosineIndex(inPhase);
}
VA_ data_[length];
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
typedef CosData<f32,16> CarrierData;
static const CarrierData cosData;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
static const u32 g2Shift1[37] =
{2,3,4,5,1,2,1,2,3,2,3,5,6,7,8,9,1,2,3,4,5,6,1,4,5,6,7,8,1,2,3,4,5,4,1,2,4};
static const u32 g2Shift2[37] =
{6,7,8,9,9,10,8,9,10,3,4,6,7,8,9,10,4,5,6,7,8,9,3,6,7,8,9,10,6,7,8,9,10,10,7,8,10};
//---------------------------------------------------------------------------
template<typename IT_,typename VA_>
void
generateCACode(
u32 const inPrnNumber,
VA_ const inTrueValue,
VA_ const inFalseValue,
IT_ inBegin,
IT_ const inEnd)
{
if((0 == inPrnNumber) || (37 <= inPrnNumber))
{ //if out of range for valid PRN numbers set all to 1
for(u32 i = 0; (i < 1023) && (inBegin != inEnd); ++i)
{
*inBegin = inTrueValue;
++inBegin;
}
}
else
{ //valid PRN Number
u32 g1Code = ~0;
u32 g2Code = ~0;
for(u32 i = 0; (i < 1023) && (inBegin != inEnd); ++i)
{
//generate g1 bit
g1Code <<= 1;
u32 const g1CodeNewBit =
(g1Code >> 10) ^ (g1Code >> 3);
g1Code |= 1 & g1CodeNewBit;
//generate g2 bit
g2Code <<= 1;
u32 const g2CodeNewBit =
(g2Code >> 10) ^ (g2Code >> 9) ^ (g2Code >> 8) ^
(g2Code >> 6) ^ (g2Code >> 3) ^ (g2Code >> 2);
g2Code |= 1 & g2CodeNewBit;
u32 const caCodeNewBit =
(g1Code >> 10) ^
(g2Code >> g2Shift1[inPrnNumber-1]) ^
(g2Code >> g2Shift2[inPrnNumber-1]);
*inBegin = (1 & caCodeNewBit)?(inTrueValue):(inFalseValue);
++inBegin;
}
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorChips
{
public:
typedef f32 ValueType;
enum {bits = 11};
enum {length = 1 << bits};
enum {mask = length - 1};
GPSCorrelatorChips(
u32 const inPrnNumber)
{
generateChips(inPrnNumber);
}
void
generateChips(
u32 const inPrnNumber)
{
prnNumber_ = inPrnNumber;
std::vector<ValueType> ca(1023);
generateCACode(inPrnNumber,1,-1,ca.begin(),ca.end());
for(u32 i = 0; i < 2; ++i)
{
promptEarly_[i] = 0;
promptLate_[i] = 0;
promptEarlyMinusLate_[i] = 0;
promptEarly_[length + i] = 0;
promptLate_[length + i] = 0;
promptEarlyMinusLate_[length + i] = 0;
}
for(u32 i = 1; i < length / 2; ++i)
{
u32 const caIndex = i - 1;
u32 const arrIndex = 2 * i;
ValueType const prompt = ca[caIndex];
ValueType const next = ca[(caIndex + 1) % 1023];
ValueType const prev = ca[(caIndex + 1023 - 1) % 1023];
promptEarly_[arrIndex] = prompt;
promptEarly_[arrIndex+1] = prompt;
promptLate_[arrIndex] = prompt;
promptLate_[arrIndex+1] = prompt;
promptEarlyMinusLate_[arrIndex] = prompt;
promptEarlyMinusLate_[arrIndex+1] = prompt;
promptEarly_[length + arrIndex] = prompt;
promptEarly_[length + arrIndex+1] = next;
promptLate_[length + arrIndex] = prev;
promptLate_[length + arrIndex+1] = prompt;
promptEarlyMinusLate_[length + arrIndex] = prompt - prev;
promptEarlyMinusLate_[length + arrIndex+1] = next - prompt;
}
}
static
inline
u32
promptIndex(
u32 const chipPhase)
{
return (chipPhase >> 16) & mask;
}
static
inline
u32
trackIndex(
u32 const chipPhase)
{
return ((chipPhase >> 16) & mask) + length;
}
u32 prnNumber_;
ValueType promptEarly_[2 * length];
ValueType promptLate_[2 * length];
ValueType promptEarlyMinusLate_[2 * length];
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorState
{
public:
GPSCorrelatorState(
f64 const inSampleRate,
f64 const inCarrierFreq,
f64 const inChipRate)
: sampleRate_(inSampleRate)
, carrierPhase_(0)
, carrierDelta_(0)
, chipPhase_(0)
, chipDelta_(0)
, chipResetOffset_(0)
, processedSamples_(0)
, chipBase_(0)
, inProgress_(0)
{
carrierFreqSet(inCarrierFreq);
chipRateSet(inChipRate);
}
void
sampleRateSet(
f64 const inSampleRate)
{
//get sample rate independent carrier frequency
f64 const carrierFreq = carrierFreqGet();
//get sample rate independent chip rate
f64 const chipRate = chipRateGet();
//adjust sample rate
sampleRate_ = inSampleRate;
//set carrier frequency to value from before sample rate update
carrierFreqSet(carrierFreq);
//set chip rate to value from before sample rate update
chipRateSet(chipRate);
}
f64
carrierFreqGet()
const
{
return sampleRate_ * carrierDelta_ / std::pow(2.0,32);
}
void
carrierFreqSet(
f64 const inCarrierFreq)
{
carrierDelta_ = static_cast<u32>(inCarrierFreq * std::pow(2.0,32) / sampleRate_);
}
f64
chipRateGet()
const
{
return sampleRate_ * chipDelta_ / std::pow(2.0,16);
}
void
chipRateSet(
f64 const inChipRate)
{
chipDelta_ = static_cast<u32>(inChipRate * std::pow(2.0,16) / sampleRate_);
}
f64 sampleRate_;
u32 carrierPhase_;
u32 carrierDelta_;
u32 chipPhase_;
u32 chipDelta_;
u32 chipResetOffset_;
u64 processedSamples_;
GPSCorrelatorChips::ValueType* chipBase_;
bool inProgress_;
struct
Sums
{
Sums()
: ip_(0.0)
, qp_(0.0)
, it_(0.0)
, qt_(0.0)
{
};
void
set(
f32 const in_ip,
f32 const in_qp,
f32 const in_it,
f32 const in_qt)
{
ip_ = in_ip;
qp_ = in_qp;
it_ = in_it;
qt_ = in_qt;
}
void
get(
f32& in_ip,
f32& in_qp,
f32& in_it,
f32& in_qt)
const
{
in_ip = ip_;
in_qp = qp_;
in_it = it_;
in_qt = qt_;
}
f32 ip_,qp_,it_,qt_;
};
Sums runningSums_;
Sums dumpedSums_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSCorrelatorTrack
: public GPSCorrelatorState
{
public:
GPSCorrelatorTrack(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber);
void
reset();
void
debug_level_set(
s32 const inDebugLevel);
void
threshold_set(
f64 const inThreshold);
void
start();
void
prnNumberSet(
u32 const inPrnNumber);
f64
dopplerDeltaFreq()
const;
bool
doTrack(
f32 const*& inBegin,
f32 const* const inEnd);
enum
TrackingState
{ tsIdle
, tsSearch
, tsSearchConfirm
, tsAdjustCarrierFrequency
, tsAdjustCarrierPhase
, tsAdjustConfirm
, tsTracking
};
GPSCorrelatorChips chips_;
TrackingState trackingState_;
f64 intermediateFreq_;
f64 deltaSearchFreq_;
f64 minSearchFreq_;
f64 maxSearchFreq_;
f64 carrierFreq_;
f64 threshold_;
s32 codeSearchIndex_;
f64 searchFreqBase_;
f64 searchFreqUpper_;
f64 searchFreqLower_;
f64 lastFreqError_;
u32 history_;
cf64 curVector_;
cf64 oldVector_;
//tracking state variables
s32 belowThresholdCount_;
//search confirm state variables
s32 confirmSetupCountTotal_;
s32 confirmSetupCountPass_;
s32 confirmCount_;
std::vector<cf64> confirmHistory_;
//debuging
s32 debug_level_;
u32 confirmAttempts_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,109 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_corr.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
processGPSCorrelator(
f32 const*& inBegin,
f32 const* const inEnd,
GPSCorrelatorState* const ioState)
{
register f32 ip;
register f32 qp;
register f32 it;
register f32 qt;
ioState->runningSums_.get(ip,qp,it,qt);
f32 const* const orgBegin = inBegin;
register u32 carrierPhase = ioState->carrierPhase_;
const u32 carrierDelta = ioState->carrierDelta_;
register u32 chipPhase = ioState->chipPhase_;
const u32 chipDelta = ioState->chipDelta_;
register f32 const* carrierData = cosData.data_;
register GPSCorrelatorChips::ValueType const* chipBase = ioState->chipBase_;
if(!ioState->inProgress_)
{
chipPhase += ioState->chipResetOffset_;
ioState->processedSamples_ = 0;
}
// f32 register const* cosDataPntr = cosData.data_;
register f32 const* currPntr = inBegin;
while(currPntr != inEnd)
{
f32 register const d = *currPntr;
f32 register const c = *(carrierData + CarrierData::cosineIndex(carrierPhase));
f32 register const ns = *(carrierData + CarrierData::negSineIndex(carrierPhase));
f32 register const i = d * c;
f32 register const q = d * ns;
f32 register const p = *(chipBase + GPSCorrelatorChips::promptIndex(chipPhase));
f32 register const t = *(chipBase + GPSCorrelatorChips::trackIndex(chipPhase));
ip += i * p;
qp += q * p;
it += i * t;
qt += q * t;
carrierPhase += carrierDelta;
chipPhase += chipDelta;
++currPntr;
// if((chipPhase >> 16) & (~0 << 11))
//2^16 counts per half-chip,
//2^11-{0,2} half-chips per spreading code
if(chipPhase >> 27)
{ //dump
inBegin = currPntr;
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = (chipPhase & 0xFFFF);
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->runningSums_.set(0,0,0,0);
ioState->dumpedSums_.set(
ip / ioState->processedSamples_,
qp / ioState->processedSamples_,
it / ioState->processedSamples_,
qt / ioState->processedSamples_);
ioState->inProgress_ = false;
return true;
}
}
inBegin = currPntr;
ioState->runningSums_.set(ip,qp,it,qt);
ioState->carrierPhase_ = carrierPhase;
ioState->chipPhase_ = chipPhase;
ioState->processedSamples_ += (inBegin - orgBegin);
ioState->inProgress_ = true;
return false;
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_corr_genericH
#define gps_corr_genericH
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
processGPSCorrelator(
f32 const*& inBegin,
f32 const* const inEnd,
GPSCorrelatorState* const ioState);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

View File

@ -0,0 +1,110 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004,2005 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "gps_source.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//GPSSource::
//---------------------------------------------------------------------------
GPSSource::GPSSource(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber,
char const* inMessage)
: sampleRate_ ( inSampleRate )
, intermediateFreq_ ( inIntermediateFreq )
, chipRate_ ( inChipRate )
, prnNumber_ ( inPrnNumber )
, message_ ( )
, chips_ ( inPrnNumber )
, source_ ( sampleRate_, intermediateFreq_, chipRate_ )
, phase_ ( 0 )
, chipPhase_ ( 2 << 15 )
, messageCodeCount_ ( 0 )
, messageBitCount_ ( 0 )
{
//fill in message
for ( u32 i = 0; inMessage[i]; ++i)
switch ( inMessage[i] )
{
case '1':
case '+':
message_.push_back(1);
break;
case '0':
case '-':
message_.push_back(-1);
break;
}
}
//---------------------------------------------------------------------------
void
GPSSource::reset()
{
phase_ = 0;
chipPhase_ = 2 << 15;
messageCodeCount_ = 0;
messageBitCount_ = 0;
}
//---------------------------------------------------------------------------
void
GPSSource::doWork(
f32*& inBegin,
f32* const inEnd)
{
while ( inBegin != inEnd )
{
//I.F.
f64 value = *(cosData.cosine(phase_));
//spreading code
value *= chips_.promptEarly_[((chipPhase_ >> 16) + 0) % 2046 + 2];
//message bit
value *= message_[messageBitCount_];
*inBegin = value;
++inBegin;
phase_ += source_.carrierDelta_;
chipPhase_ += source_.chipDelta_;
//handle updating message bit
if(chipPhase_ >= (2046 << 16))
{
++messageCodeCount_;
if(messageCodeCount_ >= 20)
{
messageCodeCount_ = 0;
++messageBitCount_;
if(messageBitCount_ >= message_.size())
messageBitCount_ = 0;
}
}
chipPhase_ %= 2046 << 16;
}
}
//---------------------------------------------------------------------------

View File

@ -0,0 +1,71 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004,2005 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef gps_sourceH
#define gps_sourceH
//---------------------------------------------------------------------------
#include <vector>
#include <cmath>
#include "kkutils.h"
#include "gps_corr.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
GPSSource
{
public:
GPSSource(
f64 const inSampleRate,
f64 const inIntermediateFreq,
f64 const inChipRate,
u32 const inPrnNumber,
char const* inMessage);
void
reset();
void
doWork(
f32*& inBegin,
f32* const inEnd);
//setup variables
f64 sampleRate_;
f64 intermediateFreq_;
f64 chipRate_;
u32 prnNumber_;
std::vector<s8> message_;
//state variables
GPSCorrelatorChips chips_;
GPSCorrelatorState source_;
u32 phase_;
u32 chipPhase_;
u32 messageCodeCount_;
u32 messageBitCount_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#endif

File diff suppressed because one or more lines are too long

70
grkkgps-0.1/src/lib/grkkgps.i Executable file
View File

@ -0,0 +1,70 @@
/* -*- c++ -*- */
%include "exception.i"
%import "gnuradio.i"
%{
#include "gnuradio_swig_bug_workaround.h"
#include "grkkgps_gps_source_f.h"
#include "grkkgps_tracking_gps_correlator_fc.h"
#include <stdexcept>
%}
// --------------------------------------------------------
GR_SWIG_BLOCK_MAGIC(grkkgps,gps_source_f);
grkkgps_gps_source_f_sptr
grkkgps_make_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message);
class grkkgps_gps_source_f
: public gr_sync_block
{
private:
grkkgps_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message);
public:
};
// --------------------------------------------------------
GR_SWIG_BLOCK_MAGIC(grkkgps,tracking_gps_correlator_fc);
grkkgps_tracking_gps_correlator_fc_sptr
grkkgps_make_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id);
class grkkgps_tracking_gps_correlator_fc
: public gr_block
{
private:
//constructor
grkkgps_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id);
public:
void
debug_level_set(
int const debug_level);
void
threshold_set(
double const threshold);
};

View File

@ -0,0 +1,229 @@
# This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _grkkgps
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_type):
self.__dict__[name] = value.this
if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
del value.thisown
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name) or (name == "thisown"):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError,name
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
del types
class grkkgps_gps_source_f_sptr(_object):
"""Proxy of C++ grkkgps_gps_source_f_sptr class"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, grkkgps_gps_source_f_sptr, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, grkkgps_gps_source_f_sptr, name)
def __repr__(self):
return "<%s.%s; proxy of C++ boost::shared_ptr<grkkgps_gps_source_f > instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args):
"""
__init__(self) -> grkkgps_gps_source_f_sptr
__init__(self, p) -> grkkgps_gps_source_f_sptr
"""
_swig_setattr(self, grkkgps_gps_source_f_sptr, 'this', _grkkgps.new_grkkgps_gps_source_f_sptr(*args))
_swig_setattr(self, grkkgps_gps_source_f_sptr, 'thisown', 1)
def __deref__(*args):
"""__deref__(self)"""
return _grkkgps.grkkgps_gps_source_f_sptr___deref__(*args)
def name(*args):
"""name(self) -> string"""
return _grkkgps.grkkgps_gps_source_f_sptr_name(*args)
def input_signature(*args):
"""input_signature(self) -> gr_io_signature_sptr"""
return _grkkgps.grkkgps_gps_source_f_sptr_input_signature(*args)
def output_signature(*args):
"""output_signature(self) -> gr_io_signature_sptr"""
return _grkkgps.grkkgps_gps_source_f_sptr_output_signature(*args)
def unique_id(*args):
"""unique_id(self) -> long"""
return _grkkgps.grkkgps_gps_source_f_sptr_unique_id(*args)
def output_multiple(*args):
"""output_multiple(self) -> int"""
return _grkkgps.grkkgps_gps_source_f_sptr_output_multiple(*args)
def relative_rate(*args):
"""relative_rate(self) -> double"""
return _grkkgps.grkkgps_gps_source_f_sptr_relative_rate(*args)
def check_topology(*args):
"""check_topology(self, int ninputs, int noutputs) -> bool"""
return _grkkgps.grkkgps_gps_source_f_sptr_check_topology(*args)
def start(*args):
"""start(self) -> bool"""
return _grkkgps.grkkgps_gps_source_f_sptr_start(*args)
def stop(*args):
"""stop(self) -> bool"""
return _grkkgps.grkkgps_gps_source_f_sptr_stop(*args)
def detail(*args):
"""detail(self) -> gr_block_detail_sptr"""
return _grkkgps.grkkgps_gps_source_f_sptr_detail(*args)
def set_detail(*args):
"""set_detail(self, gr_block_detail_sptr detail)"""
return _grkkgps.grkkgps_gps_source_f_sptr_set_detail(*args)
def __del__(self, destroy=_grkkgps.delete_grkkgps_gps_source_f_sptr):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
class grkkgps_gps_source_f_sptrPtr(grkkgps_gps_source_f_sptr):
def __init__(self, this):
_swig_setattr(self, grkkgps_gps_source_f_sptr, 'this', this)
if not hasattr(self,"thisown"): _swig_setattr(self, grkkgps_gps_source_f_sptr, 'thisown', 0)
_swig_setattr(self, grkkgps_gps_source_f_sptr,self.__class__,grkkgps_gps_source_f_sptr)
_grkkgps.grkkgps_gps_source_f_sptr_swigregister(grkkgps_gps_source_f_sptrPtr)
def grkkgps_gps_source_f_block(*args):
"""grkkgps_gps_source_f_block(grkkgps_gps_source_f_sptr r) -> gr_block_sptr"""
return _grkkgps.grkkgps_gps_source_f_block(*args)
grkkgps_gps_source_f_sptr.block = lambda self: grkkgps_gps_source_f_block (self)
grkkgps_gps_source_f_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ())
def gps_source_f(*args):
"""
gps_source_f(double sample_rate, double carrier_frequency, unsigned int prn_id,
char message) -> grkkgps_gps_source_f_sptr
"""
return _grkkgps.gps_source_f(*args)
class grkkgps_tracking_gps_correlator_fc_sptr(_object):
"""Proxy of C++ grkkgps_tracking_gps_correlator_fc_sptr class"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, grkkgps_tracking_gps_correlator_fc_sptr, name)
def __repr__(self):
return "<%s.%s; proxy of C++ boost::shared_ptr<grkkgps_tracking_gps_correlator_fc > instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args):
"""
__init__(self) -> grkkgps_tracking_gps_correlator_fc_sptr
__init__(self, p) -> grkkgps_tracking_gps_correlator_fc_sptr
"""
_swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr, 'this', _grkkgps.new_grkkgps_tracking_gps_correlator_fc_sptr(*args))
_swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr, 'thisown', 1)
def __deref__(*args):
"""__deref__(self)"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr___deref__(*args)
def debug_level_set(*args):
"""debug_level_set(self, int debug_level)"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_debug_level_set(*args)
def threshold_set(*args):
"""threshold_set(self, double threshold)"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_threshold_set(*args)
def name(*args):
"""name(self) -> string"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_name(*args)
def input_signature(*args):
"""input_signature(self) -> gr_io_signature_sptr"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_input_signature(*args)
def output_signature(*args):
"""output_signature(self) -> gr_io_signature_sptr"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_output_signature(*args)
def unique_id(*args):
"""unique_id(self) -> long"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_unique_id(*args)
def output_multiple(*args):
"""output_multiple(self) -> int"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_output_multiple(*args)
def relative_rate(*args):
"""relative_rate(self) -> double"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_relative_rate(*args)
def check_topology(*args):
"""check_topology(self, int ninputs, int noutputs) -> bool"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_check_topology(*args)
def start(*args):
"""start(self) -> bool"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_start(*args)
def stop(*args):
"""stop(self) -> bool"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_stop(*args)
def detail(*args):
"""detail(self) -> gr_block_detail_sptr"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_detail(*args)
def set_detail(*args):
"""set_detail(self, gr_block_detail_sptr detail)"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_set_detail(*args)
def __del__(self, destroy=_grkkgps.delete_grkkgps_tracking_gps_correlator_fc_sptr):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
class grkkgps_tracking_gps_correlator_fc_sptrPtr(grkkgps_tracking_gps_correlator_fc_sptr):
def __init__(self, this):
_swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr, 'this', this)
if not hasattr(self,"thisown"): _swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr, 'thisown', 0)
_swig_setattr(self, grkkgps_tracking_gps_correlator_fc_sptr,self.__class__,grkkgps_tracking_gps_correlator_fc_sptr)
_grkkgps.grkkgps_tracking_gps_correlator_fc_sptr_swigregister(grkkgps_tracking_gps_correlator_fc_sptrPtr)
def grkkgps_tracking_gps_correlator_fc_block(*args):
"""grkkgps_tracking_gps_correlator_fc_block(grkkgps_tracking_gps_correlator_fc_sptr r) -> gr_block_sptr"""
return _grkkgps.grkkgps_tracking_gps_correlator_fc_block(*args)
grkkgps_tracking_gps_correlator_fc_sptr.block = lambda self: grkkgps_tracking_gps_correlator_fc_block (self)
grkkgps_tracking_gps_correlator_fc_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ())
def tracking_gps_correlator_fc(*args):
"""
tracking_gps_correlator_fc(double sample_rate, double intermediate_frequency,
unsigned int prn_id) -> grkkgps_tracking_gps_correlator_fc_sptr
"""
return _grkkgps.tracking_gps_correlator_fc(*args)

View File

@ -0,0 +1,66 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// copied from gr_vector_sink_f
#include "grkkgps_gps_source_f.h"
#include <gr_io_signature.h>
grkkgps_gps_source_f::grkkgps_gps_source_f (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id,
char const* message)
: gr_sync_block (
"gps_source_f",
gr_make_io_signature ( 0, 0, 0 ),
gr_make_io_signature ( 1, 1, sizeof(float) ) )
, d_gps_src ( sample_rate, intermediate_frequency, 2046000, prn_id, message )
{
}
//public:
int
grkkgps_gps_source_f::work (
int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
float* out = static_cast<float*> ( output_items[0] );
d_gps_src.doWork ( out, out + noutput_items );
return noutput_items;
}
grkkgps_gps_source_f_sptr
grkkgps_make_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message)
{
return grkkgps_gps_source_f_sptr ( new grkkgps_gps_source_f ( sample_rate, carrier_frequency, prn_id, message ) );
}

View File

@ -0,0 +1,78 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// copied from gr_vector_sink_f
#ifndef INCLUDED_GRKKGPS_GPS_SOURCE_F_H
#define INCLUDED_GRKKGPS_GPS_SOURCE_F_H
#include <gr_sync_block.h>
#include "gps_source.h"
class grkkgps_gps_source_f;
typedef boost::shared_ptr<grkkgps_gps_source_f> grkkgps_gps_source_f_sptr;
grkkgps_gps_source_f_sptr
grkkgps_make_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message);
/*!
* \brief outputs a gps signal made of a carrier frequency, 50 bits/s message, and a 1000 x 1023 chips/s spreading code.
* \ingroup gps
*/
class grkkgps_gps_source_f
: public gr_sync_block
{
friend
grkkgps_gps_source_f_sptr
grkkgps_make_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message);
//data members
GPSSource d_gps_src;
//constructor
grkkgps_gps_source_f (
double sample_rate,
double carrier_frequency,
unsigned int prn_id,
char const* message);
public:
//gr required methods
virtual
int
work (
int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
};
#endif

View File

@ -0,0 +1,131 @@
/* -*- c++ -*- */
/*
* Copyright 2005 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// copied from gr_vector_sink_f
#include "grkkgps_tracking_gps_correlator_fc.h"
#include <gr_io_signature.h>
#include <iostream>
grkkgps_tracking_gps_correlator_fc::grkkgps_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id)
: gr_block (
"tracking_gps_correlator_fc",
gr_make_io_signature ( 1, 1, sizeof(float) ),
gr_make_io_signature ( 1, 2, sizeof(gr_complex) ) )
, d_gps_corr ( sample_rate, intermediate_frequency, 2046000, prn_id )
{
set_relative_rate( 1000.0 / sample_rate ); //there are 1000 symbols per second 20 chips/bit * 50 bits/second
d_gps_corr.start();
}
//public:
int
grkkgps_tracking_gps_correlator_fc::general_work (
int noutput_items,
gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
int out_cnt = 0;
gr_complex* out_prompt_b = 0;
gr_complex* out_track_b = 0;
if(output_items.size() > 0)
out_prompt_b = static_cast<gr_complex*>( output_items[0] );
if(output_items.size() > 1)
out_track_b = static_cast<gr_complex*>( output_items[1] );
int const in_cnt = ninput_items[0];
float const* const in_b = static_cast<float const*> ( input_items[0] );
float const* const in_e = in_b + in_cnt;
float const* curr = in_b;
while(out_cnt < std::min(noutput_items,1)) //out_cnt < noutput_items
{
if(curr == in_e)
break;
bool const result = d_gps_corr.doTrack ( curr, in_e );
if(result)
{
if(out_prompt_b) out_prompt_b[out_cnt] = gr_complex( d_gps_corr.dumpedSums_.ip_, d_gps_corr.dumpedSums_.qp_ );
if(out_track_b) out_track_b[out_cnt] = gr_complex( d_gps_corr.dumpedSums_.it_, d_gps_corr.dumpedSums_.qt_ );
++out_cnt;
//debug dump info
#if 0
std::cout << "ip qp it qt:"
<< " " << d_gps_corr.dumpedSums_.ip_
<< " " << d_gps_corr.dumpedSums_.qp_
<< " " << d_gps_corr.dumpedSums_.it_
<< " " << d_gps_corr.dumpedSums_.qt_
<< "\n";
#endif
#if 0
std::cout << "Tracking state:"
<< " " << d_gps_corr.trackingState_
<< "\n";
std::cout << "DopplerFreq:"
<< " " << 1.0 * d_gps_corr.carrierDelta_ * d_gps_corr.sampleRate_ / std::pow(2.0,32) - d_gps_corr.intermediateFreq_
<< "\n";
#endif
}
}
consume_each(in_cnt - (in_e - curr));
return out_cnt;
}
void
grkkgps_tracking_gps_correlator_fc::debug_level_set(
int const debug_level)
{
d_gps_corr.debug_level_set(debug_level);
}
void
grkkgps_tracking_gps_correlator_fc::threshold_set(
double const threshold)
{
d_gps_corr.threshold_set(threshold);
}
grkkgps_tracking_gps_correlator_fc_sptr
grkkgps_make_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id)
{
return grkkgps_tracking_gps_correlator_fc_sptr ( new grkkgps_tracking_gps_correlator_fc ( sample_rate, intermediate_frequency, prn_id ) );
}

View File

@ -0,0 +1,85 @@
/* -*- c++ -*- */
/*
* Copyright 2005 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// copied from gr_vector_sink_f
#ifndef INCLUDED_GRKKGPS_TRACKING_GPS_CORRELATOR_FC_H
#define INCLUDED_GRKKGPS_TRACKING_GPS_CORRELATOR_FC_H
#include <gr_sync_block.h>
#include "gps_corr.h"
class grkkgps_tracking_gps_correlator_fc;
typedef boost::shared_ptr<grkkgps_tracking_gps_correlator_fc> grkkgps_tracking_gps_correlator_fc_sptr;
grkkgps_tracking_gps_correlator_fc_sptr
grkkgps_make_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id);
/*!
* \brief A correlator that should acquire and then track a particular PN encoded GPS signal
* \ingroup gps
*/
class grkkgps_tracking_gps_correlator_fc
: public gr_block
{
private:
friend
grkkgps_tracking_gps_correlator_fc_sptr
grkkgps_make_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id);
//data members
GPSCorrelatorTrack d_gps_corr;
//constructor
grkkgps_tracking_gps_correlator_fc (
double sample_rate,
double intermediate_frequency,
unsigned int prn_id);
public:
//gr required methods
virtual
int
general_work (
int noutput_items,
gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
void
debug_level_set(
int const debug_level);
void
threshold_set(
double const threshold);
};
#endif

View File

@ -0,0 +1,80 @@
//---------------------------------------------------------------------------
//Copyright (C) 2003,2004 Krzysztof Kamieniecki (krys@kamieniecki.com)
/*
This file is part of kkGPS.
kkGPS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
kkGPS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with kkGPS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef kkutilsH
#define kkutilsH
//---------------------------------------------------------------------------
#include <complex>
#include <exception>
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
typedef char c8;
typedef float f32;
typedef double f64;
typedef signed char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef long s32;
typedef unsigned long u32;
typedef signed long long s64;
typedef unsigned long long u64;
typedef std::complex<f64> cf64;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
KKException
: public std::exception
{
public:
KKException(
std::string const& inStr)
: whatString_(inStr)
{
}
virtual
~KKException()
throw()
{
}
c8 const*
what()
const
throw()
{
return whatString_.c_str();
}
protected:
std::string whatString_;
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#define M_KK_ASSERT(COND_) do {if(!(COND_)) throw KKException("ASSERT FAILED: "#COND_);} while(false)
//---------------------------------------------------------------------------
#endif

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More