Version:beta 0.99
下载:MLS6beta0.99.zip
0:
=========================================================================
Copyright 2006 Yang Hongbo(杨鸿博)
MLS6(SparrowHawk's the Maidenhead locator System Calculator 6th)is
distributed under the terms of the GNU General Public License.
MLS6(SparrowHawk's the Maidenhead locator System Calculator 6th)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.
MLS6(SparrowHawk's the Maidenhead's locator System Calculator 6th) is
distributed in the hope that it will be useful,but WITHOUT NY 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 MLS6(SparrowHawk's the Maidenhead's locator System Calculator 6th);
if not, write to the Free Software Foundation, Inc., 51 Franklin St,
Fifth Floor, Boston, MA 02110-1301 USA
(Please see ReadMeChs.txt for Chinese version)
1 Introduction
=========================================================================
MLS6(SparrowHawk's the Maidenhead Locator System Calculator 6th) is
a free calculator program, which can convert Maidenhead's Locator System Grid
Square into a coordinate(Lat/Lon) and gernerate a GoogleEarth kml file, distri-
buted under GPL.
The GoogleEarth had updated vastly in 9 Jun, 2006, including many cities
in China.Because I wanted a Maidenhead locator system grid square map which
I didn't get, I think I can write a program that can generate the GoogleEarth
kml file, and that can make the GoogleEarth as my grid square map.
So I write the very program.
2 Usage
=========================================================================
Users can input a Maidenhead Locator System Grid Square or a Lat/Lon
coordinate on the interface(now running under DOS).
The Maidenhead Locator System Grid Square is consisted of 6 or 4 chara-
caters. The 1st and 2nd post is AA~RR;the 3rd and 4th is 00~99;the 5th and 6th (be or not) is aa~xx.(Case insensitive)
The Lat/Lon can be inputed in two ways:Deg/Min/Sec or decimal format.In
the former one, the space(can be changed in Global.h, see Section 3(3)) stands for Degree sign,eg, North:108 degrees 55 minutes 0 second(s),you should input:
108 55'N(you can input 0" or not).This program support four direction sign:E/W/
S/N(stands for East/West/South/North,case insensitive);in latter one, directly
input the Lat/Lon, eg, North:108.15 degrees, you should input 108.15N
After the Calculating, it will ask whether you are willing to create a
GoogleEarth kml file(named with the Maidenhead's Locator System Grid Square),
you can open the kml file in the GooleEarth program.
3 Modifying the source code
=========================================================================
(0)Copyright:
You will get the whole souce code with the program and be able modify,
recompile or even redistribute, because the program isdistributed under GPL.
(but the redistributed must destribute under GPL all the same, the detail
about the license, please see the GPL or COPYING file in the directory, or
visit http://www.gnu.org)
(1)Basic infomation on the MLS6
MLS6 is developed in Microsoft Visual C++6.0.Whereas, it was written in
ANSI C standard mostly.So, the souce code should be compiled in any platform
which support ANSI C(but I didn't test it, if the platform is not Visual C++,
please delete or empty the stdafx.h and stdafx.cpp file,because these are for
specific Visual C++ precompiled header file, they maybe cause problems in other
compilers.
(2)The structure of the source code
MLS6.cpp:The mail file, including main() function, which show the interface
and generate the GoogleEarth kml file.
Global.h:Including some global constant, such as the sign of degree,minute
and second, compiling mark of the Chinese or English, the lenth of the strings,
etc.
Global.cpp:Define a ShowMsg() function, which is to output some infomation
.Now it only includes a printf().When MLS6 is modified to a graphical program,
we can just replace the printf() to other functions(eg, MessageBox() in Windows
Platform SDK)
Paser.cpp:Including a Paser() function, which is judge what the user inputed
is a grid square or Lat/Lon, and excute the corresponding function.
.\LatLon\
PaserLatLon.cpp:Including a PaserLatLon(),which judge the Lat/Lon the user
inputed is in Deg/Min/Sec format or decimal format, and excute the relative
function.
PaserDec.cpp:Including a PaserDec(), which a Lat/Lon in Decimal format.
PaserDMS.cpp:Including a PaserDMS(), which a Lat/Lon in Deg/Min/Sec format.
度。
.\Grid\
PaserGrid.cpp:Including a PaserGrid(), which a grid square.
(2)Chinese(simplified) and English version
If a CHS constant is defined in the Global.h, the souce code will be compiled in Chinese
version;otherwise,it will be English version.
(3)the modifying of the sign of degree,minute and second
Just modify the constant DEGSIGN, MINSIGN, SECSIGN in the Global.h.IMPORTANG:
If the sign you want to modify is a special sign in C language, please use a \
before it, details in ANSI C standard.
4.Contact with me
=========================================================================
E-mail:sprhawk@sohu.com(both English and Chinese mails are accepted)
QQ(One Chinese popular IM software):284815661
MSN spaces:http://spaces.msn.com/sprhawk/ (created and written in Chinese only)