Compare commits

..
10 Commits
Author SHA1 Message Date
KenanZhu fb86442c9b none 2025-04-19 12:38:13 +08:00
KenanZhu 5350c8fa61 Remove all license, you are free to use 2025-04-19 12:33:28 +08:00
KenanZhu 5cebf53014 Modify readme 2025-04-19 12:23:06 +08:00
Kenan Zhu 8934efd425 Update READMECN.md 2025-02-02 21:15:25 +08:00
Kenan Zhu 5f5f8114e4 Update README.md 2025-02-02 21:14:04 +08:00
KenanZhu111 9e5b6d9ea3 Merge branch 'master' of https://github.com/KenanZhu111/KNZ_GeoTrackLab
# Conflicts:
#	README.md
2024-11-08 16:46:40 +08:00
KenanZhu111 fc181301c7 fix some bugs 2024-11-08 16:39:42 +08:00
Kenan Zhu 635b1da9ca Update README.md 2024-11-05 20:07:22 +08:00
KenanZhu111 80e29d68c7 see on update notes 2024-11-05 20:05:36 +08:00
KenanZhu111 93f218a113 none 2024-11-04 21:02:19 +08:00
15 changed files with 585 additions and 676 deletions

No files matched your search

-373
View File
@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
+106 -92
View File
@@ -1,123 +1,137 @@
[中文](/READMECN.md)
[ENGLISH](READMEEN.md)
# **MAIN FUNCTION INTRODUCTION**
> [!WARNING]
> 你正在浏览已经被遗弃的仓库 !
> 我们将不再对该项目进行更新。
Support version of RINEX:
* [RINEX of Observation of version 2.xx.](https://github.com/KenanZhu111/KNZ_Convert)(Support by KNZ_Convert)
* RINEX of Observation & Navigation of version 3.xx.
* RINEX of Observation of version 4.xx.
# **主要功能介绍**
Support system of GNSS:
* GPS: Satellite position solving & Receiver station orientation
* Galileo : Satellite position solving & Receiver station orientation
* GLONASS : Satellite position solving(OINP)
* BeiDou / Compass : Satellite position solving(OINP)
支持RINEX版本:
* [RINEX 2.xx 观测值文件 ](https://github.com/KenanZhu111/KNZ_Convert)(通过KNZ_Convert支持)
* RINEX 3.xx 观测值文件和广播星历
* RINEX 4.xx 观测值文件
Support method of orientation
* Pseudorange positioning
支持GNSS:
* GPS:卫星位置解算&接收机定位
* Galileo:卫星位置解算&接收机定位
* GLONASS:卫星位置解算(OINP)
* 北斗/Compass:卫星位置解算(OINP)
支持定位方式
* 伪距定位
* (OINP)
# MAIN INTRO
## Program intro
### About KNZ_GeoTrackLab
* Added on October 24, 2024, merged from KNZ_Calculate and KNZ_Plot, improved operation logic, optimized interface display.
* Read more on help.doc
### About KNZ_Calculate(STOP)(Merge with KNZ_Plot )
* As of October 24, 2024, KNZ_Calculate has been merged with KNZ_Plot to form KNZ_GeoTrackLab.[ADIN 2024/10/26]
### About KNZ_Plot(STOP)(Merge with KNZ_Calculate )
* As of October 5, 2024, KNZ_Calculate has been merged with KNZ_Plot to form KNZ_GeoTrackLab.[ADIN 2024/10/26]
### About PyGMT(STOP)
* As of October 5, 2024, PyGMT plot project will no longer be considered.[ADIN 2024/10/5]
### About Matlab(STOP)
* As of October 5, 2024, Matlab project will no longer be considered.[ADIN 2024/10/5]
# 主要介绍
## 程序介绍
### 关于KNZ_GeoTrackLab
* 2024年10月24日新增,由KNZ_Calculate与KNZ_Plot合并而成,改进运算逻辑,优化界面显示。
* 阅读帮助文档了解更多
### 关于 KNZ_Calculate(停止)(与 KNZ_Plot 合并)
* 自 2024 年 10 月 24 日起,KNZ_Calculate 已与 KNZ_Plot 合并为 KNZ_GeoTrackLab。[ADIN 2024/10/26]
### 关于 KNZ_Plot(停止)(与 KNZ_Calculate 合并)
* 自 2024 年 10 月 24 日起,KNZ_Calculate 已与 KNZ_Plot 合并为 KNZ_GeoTrackLab。[ADIN 2024/10/26]
### 关于 PyGMT(停止)
* 自 2024 年 10 月 5 日起,PyGMT 项目将不再考虑。[ADIN 2024/10/5]
### 关于 Matlab(停止)
* 自 2024 年 10 月 5 日起,Matlab 项目将不再考虑。[ADIN 2024/10/5]
## Project Update
## 项目更新
更新:2024/11/08:
1. KNZ_GeoTrackLab: 修复一些bug。
Update: 2024/11/03:
1. KNZ_GeoTrackLab: Fix some bug, Modify some UI logic.
2. KNZ_GeoTrackLab: Complete the function of Satellite track plot.
更新:2024/11/05:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑。
2. KNZ_GeoTrackLab: 为View文本编辑器增添保存修改功能。
3. KNZ_GeoTrackLab: 卫星轨迹投影图更改为墨卡托投影,
并实现动画显示,卫星号选择,绘
制采样频率选择。
Update: 2024/11/03:
1. KNZ_GeoTrackLab: Fix some bug, Modify some UI logic.
2. KNZ_GeoTrackLab: Remove 3D plot function.
3. KNZ_GeoTrackLab: Merge some functions and concentrated.
4. KNZ_GeoTrackLab: New added:
Sat track projection ui(not ok on function).
更新: 2024/10/31:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑。
2. KNZ_GeoTrackLab: 移除3D绘图功能。
2. KNZ_GeoTrackLab: 合并功能并专一化。
3. KNZ_GeoTrackLab: 新增:
卫星轨迹投影图。
Update: 2024/10/31:
1. KNZ_GeoTrackLab: Fix some bug, Modify some UI logic.
2. KNZ_GeoTrackLab: Optimize code structure.
3. KNZ_GeoTrackLab: New added:
Elevation angle option.
更新: 2024/10/31:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑.
2. KNZ_GeoTrackLab: 优化代码结构.
3. KNZ_GeoTrackLab: 新增:
截止高度角选项。
Update: 2024/10/28
1. KNZ_GeoTrackLab: Fix some bug.
2. KNZ_GeoTrackLab: Optimize code structure.
更新:2024/10/28
1. KNZ_GeoTrackLab:修复一些bug。
2. KNZ_GeoTrackLab:优化代码结构。
Rename the Project & Update: 2024/10/26
1. First release KNZ_GeoTrackLab.
2. KNZ_Calculate: Merged with KNZ_Plot.
3. KNZ_Plot: Merged with KNZ_Calculate.
4. KNZ_GeoTrackLab: Support GPS & BeiDou & Galileo & GLONASS.
重命名项目并更新:2024/10/26
1. 首次发布 KNZ_GeoTrackLab。
2. KNZ_Calculate:与 KNZ_Plot 合并。
3. KNZ_Plot:与 KNZ_Calculate 合并。
4. KNZ_GeoTrackLab:支持 GPS、北斗、伽利略和 GLONASS。
Update: 2024/10/14
1. KNZ_Calculate: Support GPS & BDS & Galileo.
2. KNZ_Plot: Support GPS & Galileo.
更新:2024/10/14
1. KNZ_Calculate:支持 GPS、BDS 和伽利略。
2. KNZ_Plot:支持 GPS 和伽利略。
Update: 2024/10/09
1. KNZ_Calculate: Modify some crash.
2. KNZ_Calculate: Optimize use experience.
3. KNZ_Plot: Modify UI..
更新:2024/10/09
1. KNZ_Calculate:修改一些崩溃。
2. KNZ_Calculate:优化使用体验。
3. KNZ_Plot:修改 UI。
Rename the Project & Update: 2024/10/08
1. First release KNZ_Plot ,KNZ_Calculate.
2. KNZ_Plot: Modify UI.
3. KNZ_Calculate: Modify UI.
重命名项目并更新:2024/10/08
1. 首次发布 KNZ_Plot、KNZ_Calculate。
2. KNZ_Plot:修改 UI。
3. KNZ_Calculate:修改 UI。
Update: 2024/10/06
1. SPP_Plot: Fix some bug.
2. SPP_Plot: Optimize use experience.
3. SPP_Calculate: Optimize code structure.
4. SPP_Calculate: Modify UI.
更新:2024/10/06
1. SPP_Plot:修复一些bug。
2. SPP_Plot:优化使用体验。
3. SPP_Calculate:优化代码结构。
4. SPP_Calculate:修改UI。
Update: 2024/10/05
1. First release SPP_Plot
2. SPP_Calculate: Modify UI.
更新:2024/10/05
1. 首次发布SPP_Plot
2. SPP_Calculate:修改UI。
Update: 2024/09/28
1. First release SPP_Calculate.
2. Optimize code structure.
更新:2024/09/28
1. 首次发布SPP_Calculate。
2. 优化代码结构。
Update: 2024/09/26
1. Fix some bug.
2. Optimize use experience.
更新:2024/09/26
1. 修复一些bug。
2. 优化使用体验。
Update: 2024/09/23
1. Fix some bug.
2. Modify some crash.
更新:2024/09/23
1. 修复一些bug。
2. 修改一些崩溃。
Update: 2024/09/22
1. Fix some bug.
2. Modify UI.
更新:2024/09/22
1. 修复一些bug。
2. 修改UI。
Update: 2024/09/21
1. Fix some bug.
2. Optimize use experience.
更新:2024/09/21
1. 修复一些bug。
2. 优化使用体验。
Update: 2024/09/20
1. First release.
更新:2024/09/20
1. 首次发布。
## Project notice
* When writing the code, with the help of the existing open source code results, and different degrees of reference, here one by one mark and express thanks:
## 项目公告
* 编写代码时,借助了已有的开源代码成果,并不同程度的参考,在此一一标注并表示感谢:
| *https://blog.csdn.net/why1472587?type=blog*
| *https://zhuanlan.zhihu.com/p/416072448*
| *https://www.pygmt.org/latest/index.html*
| *https://blog.csdn.net/FrankXCR/article/details/135438701*
### Document label specification
* [ADIN TIME]: new added in "TIME"(e.g. [ADIN 2024/9/22]: new added in 2024/9/22).
* (OINP): Operation in progress, or in urgent need of improvement.
* (STOP): No longer update maintenance or consider implementing features.
### 文档标签说明
* [ADIN TIME]: 新增于“TIME”(如 [ADIN 2024/9/22]: 新增于 2024/9/22)。
* (OINP):正在进行中的更改,或急需改进的部分。
* (STOP):不再更新维护或考虑实现功能。
#### *This program code is solely for study and communication purposes* ####
> [!NOTE]
> 你可以对该代码核心功能和界面部分进行二次开发
> 无需额外授权。我们对此不保留任何权利。
-126
View File
@@ -1,126 +0,0 @@
[ENGLISH](/README.md)
# **主要功能介绍**
支持RINEX版本:
* [RINEX 2.xx 观测值文件 ](https://github.com/KenanZhu111/KNZ_Convert)(通过KNZ_Convert支持)
* RINEX 3.xx 观测值文件和广播星历
* RINEX 4.xx 观测值文件
支持GNSS:
* GPS:卫星位置解算&接收机定位
* Galileo:卫星位置解算&接收机定位
* GLONASS:卫星位置解算(OINP)
* 北斗/Compass:卫星位置解算(OINP)
支持定位方式
* 伪距定位
* (OINP)
# 主要介绍
## 程序介绍
### 关于KNZ_GeoTrackLab
* 2024年10月24日新增,由KNZ_Calculate与KNZ_Plot合并而成,改进运算逻辑,优化界面显示。
* 阅读帮助文档了解更多
### 关于 KNZ_Calculate(停止)(与 KNZ_Plot 合并)
* 自 2024 年 10 月 24 日起,KNZ_Calculate 已与 KNZ_Plot 合并为 KNZ_GeoTrackLab。[ADIN 2024/10/26]
### 关于 KNZ_Plot(停止)(与 KNZ_Calculate 合并)
* 自 2024 年 10 月 24 日起,KNZ_Calculate 已与 KNZ_Plot 合并为 KNZ_GeoTrackLab。[ADIN 2024/10/26]
### 关于 PyGMT(停止)
* 自 2024 年 10 月 5 日起,PyGMT 项目将不再考虑。[ADIN 2024/10/5]
### 关于 Matlab(停止)
* 自 2024 年 10 月 5 日起,Matlab 项目将不再考虑。[ADIN 2024/10/5]
## 项目更新
更新:2024/10/31:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑。
2. KNZ_GeoTrackLab: 完成卫星轨迹绘图功能。
更新: 2024/10/31:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑。
2. KNZ_GeoTrackLab: 移除3D绘图功能。
2. KNZ_GeoTrackLab: 合并功能并专一化。
3. KNZ_GeoTrackLab: 新增:
卫星轨迹投影图(还未实现功能化)。
更新: 2024/10/31:
1. KNZ_GeoTrackLab: 修复一些bug, 优化UI逻辑.
2. KNZ_GeoTrackLab: 优化代码结构.
3. KNZ_GeoTrackLab: 新增:
截止高度角选项。
更新:2024/10/28
1. KNZ_GeoTrackLab:修复一些bug。
2. KNZ_GeoTrackLab:优化代码结构。
重命名项目并更新:2024/10/26
1. 首次发布 KNZ_GeoTrackLab。
2. KNZ_Calculate:与 KNZ_Plot 合并。
3. KNZ_Plot:与 KNZ_Calculate 合并。
4. KNZ_GeoTrackLab:支持 GPS、北斗、伽利略和 GLONASS。
更新:2024/10/14
1. KNZ_Calculate:支持 GPS、BDS 和伽利略。
2. KNZ_Plot:支持 GPS 和伽利略。
更新:2024/10/09
1. KNZ_Calculate:修改一些崩溃。
2. KNZ_Calculate:优化使用体验。
3. KNZ_Plot:修改 UI。
重命名项目并更新:2024/10/08
1. 首次发布 KNZ_Plot、KNZ_Calculate。
2. KNZ_Plot:修改 UI。
3. KNZ_Calculate:修改 UI。
更新:2024/10/06
1. SPP_Plot:修复一些bug。
2. SPP_Plot:优化使用体验。
3. SPP_Calculate:优化代码结构。
4. SPP_Calculate:修改UI。
更新:2024/10/05
1. 首次发布SPP_Plot
2. SPP_Calculate:修改UI。
更新:2024/09/28
1. 首次发布SPP_Calculate。
2. 优化代码结构。
更新:2024/09/26
1. 修复一些bug。
2. 优化使用体验。
更新:2024/09/23
1. 修复一些bug。
2. 修改一些崩溃。
更新:2024/09/22
1. 修复一些bug。
2. 修改UI。
更新:2024/09/21
1. 修复一些bug。
2. 优化使用体验。
更新:2024/09/20
1. 首次发布。
## 项目公告
* 编写代码时,借助了已有的开源代码成果,并不同程度的参考,在此一一标注并表示感谢:
| *https://blog.csdn.net/why1472587?type=blog*
| *https://zhuanlan.zhihu.com/p/416072448*
| *https://www.pygmt.org/latest/index.html*
| *https://blog.csdn.net/FrankXCR/article/details/135438701*
### 文档标签说明
* [ADIN TIME]: 新增于“TIME”(如 [ADIN 2024/9/22]: 新增于 2024/9/22)。
* (OINP):正在进行中的更改,或急需改进的部分。
* (STOP):不再更新维护或考虑实现功能。
#### *本程序代码仅供学习交流使用* ####
+136
View File
@@ -0,0 +1,136 @@
[中文](README.md)
> [!WARNING]
> You are browse a aborted repositories !
> We will no longer update this project.
# **MAIN FUNCTION INTRODUCTION**
Support version of RINEX:
* [RINEX of Observation of version 2.xx.](https://github.com/KenanZhu111/KNZ_Convert)(Support by KNZ_Convert)
* RINEX of Observation & Navigation of version 3.xx.
* RINEX of Observation of version 4.xx.
Support system of GNSS:
* GPS: Satellite position solving & Receiver station orientation
* Galileo : Satellite position solving & Receiver station orientation
* GLONASS : Satellite position solving(OINP)
* BeiDou / Compass : Satellite position solving(OINP)
Support method of orientation
* Pseudorange positioning
* (OINP)
# MAIN INTRO
## Program intro
### About KNZ_GeoTrackLab
* Added on October 24, 2024, merged from KNZ_Calculate and KNZ_Plot, improved operation logic, optimized interface display.
* Read more on help.doc
### About KNZ_Calculate(STOP)(Merge with KNZ_Plot )
* As of October 24, 2024, KNZ_Calculate has been merged with KNZ_Plot to form KNZ_GeoTrackLab.[ADIN 2024/10/26]
### About KNZ_Plot(STOP)(Merge with KNZ_Calculate )
* As of October 5, 2024, KNZ_Calculate has been merged with KNZ_Plot to form KNZ_GeoTrackLab.[ADIN 2024/10/26]
### About PyGMT(STOP)
* As of October 5, 2024, PyGMT plot project will no longer be considered.[ADIN 2024/10/5]
### About Matlab(STOP)
* As of October 5, 2024, Matlab project will no longer be considered.[ADIN 2024/10/5]
## Project Update
Update: 2024/11/08:
1. KNZ_GeoTrackLab: Fix some bug。
Update: 2024/11/05:
1. KNZ_GeoTrackLab: Fix some bug, Optimize UI logic。
2. KNZ_GeoTrackLab: New added function of save and change
file for View.
3. KNZ_GeoTrackLab: Sat track projection plot changed as
Mecator projection and relize the display
by dynamic, sat prn selection, selection of
sample rate/inteval of plot.
Update: 2024/11/03:
1. KNZ_GeoTrackLab: Fix some bug, Modify some UI logic.
2. KNZ_GeoTrackLab: Remove 3D plot function.
3. KNZ_GeoTrackLab: Merge some functions and concentrated.
4. KNZ_GeoTrackLab: New added:
Sat track projection ui.
Update: 2024/10/31:
1. KNZ_GeoTrackLab: Fix some bug, Modify some UI logic.
2. KNZ_GeoTrackLab: Optimize code structure.
3. KNZ_GeoTrackLab: New added:
Elevation angle option.
Update: 2024/10/28
1. KNZ_GeoTrackLab: Fix some bug.
2. KNZ_GeoTrackLab: Optimize code structure.
Rename the Project & Update: 2024/10/26
1. First release KNZ_GeoTrackLab.
2. KNZ_Calculate: Merged with KNZ_Plot.
3. KNZ_Plot: Merged with KNZ_Calculate.
4. KNZ_GeoTrackLab: Support GPS & BeiDou & Galileo & GLONASS.
Update: 2024/10/14
1. KNZ_Calculate: Support GPS & BDS & Galileo.
2. KNZ_Plot: Support GPS & Galileo.
Update: 2024/10/09
1. KNZ_Calculate: Modify some crash.
2. KNZ_Calculate: Optimize use experience.
3. KNZ_Plot: Modify UI..
Rename the Project & Update: 2024/10/08
1. First release KNZ_Plot ,KNZ_Calculate.
2. KNZ_Plot: Modify UI.
3. KNZ_Calculate: Modify UI.
Update: 2024/10/06
1. SPP_Plot: Fix some bug.
2. SPP_Plot: Optimize use experience.
3. SPP_Calculate: Optimize code structure.
4. SPP_Calculate: Modify UI.
Update: 2024/10/05
1. First release SPP_Plot
2. SPP_Calculate: Modify UI.
Update: 2024/09/28
1. First release SPP_Calculate.
2. Optimize code structure.
Update: 2024/09/26
1. Fix some bug.
2. Optimize use experience.
Update: 2024/09/23
1. Fix some bug.
2. Modify some crash.
Update: 2024/09/22
1. Fix some bug.
2. Modify UI.
Update: 2024/09/21
1. Fix some bug.
2. Optimize use experience.
Update: 2024/09/20
1. First release.
## Project notice
* When writing the code, with the help of the existing open source code results, and different degrees of reference, here one by one mark and express thanks:
| *https://blog.csdn.net/why1472587?type=blog*
| *https://zhuanlan.zhihu.com/p/416072448*
| *https://www.pygmt.org/latest/index.html*
| *https://blog.csdn.net/FrankXCR/article/details/135438701*
### Document label specification
* [ADIN TIME]: new added in "TIME"(e.g. [ADIN 2024/9/22]: new added in 2024/9/22).
* (OINP): Operation in progress, or in urgent need of improvement.
* (STOP): No longer update maintenance or consider implementing features.
[!NOTE]
> You are free to modify the core functionality and interface of this code.
> No additional permissions are required. We waive all rights to these modifications.
+4
View File
@@ -67,6 +67,10 @@ class Configinit:
self.config.set('Options_Draw', 'N_Line', '0.80')
self.config.set('Options_Draw', 'U_Line', '0.80')
self.config.set('Options_Draw', 'Sat_Amount_Color', '#0080FF')
self.config.set('Options_Draw', 'Enable of track', '0')
self.config.set('Options_Draw', 'Track of prn', '01')
self.config.set('Options_Draw', 'Track sample rate','10')
### Config for input path
self.config.add_section('Input_Obs_Path')
self.config.set('Input_Obs_Path', '0', '')
+107 -39
View File
@@ -84,7 +84,8 @@ class CALLBACK:
position_y = int((hwnd.winfo_screenheight() - win_y) / 2)
hwnd.geometry(f'{win_x}x{win_y}+{position_x}+{position_y}')
def Calcuconfirm(self, cionbox, ctrobox, canglebox, systemv):
def Calcuconfirm(self, cionbox, ctrobox, canglebox, systemv,
trackprn, trackint):
# -------------------------------------------------------------------------------
# >
# Method: Calcuconfirm
@@ -101,6 +102,9 @@ class CALLBACK:
self.cfg_get.set('Options_Calc', 'Trop_model', self.trocormode.get(ctrobox.get()))
self.cfg_get.set('Options_Calc', 'Elev_angle', canglebox.get())
self.cfg_get.set('Options_Calc', 'Sat_system', str(systemv.get()))
self.cfg_get.set('Options_Draw', 'Track of prn', trackprn.get())
self.cfg_get.set('Options_Draw', 'Track sample rate', trackint.get())
self.cfg.save_config()
def Colorchoose(self, hwndparent, i, colorlab, mode):
@@ -306,6 +310,7 @@ class CALLBACK:
# Brief : Execute RINEX file into .ksln.
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
exten = "ksln"
statemsg = ""
state3 = ["","",""]
if not ObsSelectBoxVar.get():
@@ -327,9 +332,12 @@ class CALLBACK:
if AskOrNotCheckVar.get():
directory = DirectorySelectBoxVar.get()
directory = self.Dir_or_name_get(directory, 1)
syssign = self.system.get(int(self.cfg_get['Options_Calc']['sat_system']))
resname = syssign + '-' + self.Dir_or_name_get(obspath,0) + 'ksln'
if int(self.cfg_get['Options_Draw']['Enable of track'])==1:
exten="ssln"
resname = syssign + '-' + self.Dir_or_name_get(obspath,0) + exten
respath = (directory + resname)
ExecuteState.config(text='Processing...... file : %s' %resname)
@@ -343,7 +351,8 @@ class CALLBACK:
int(self.cfg_get['Options_Calc']['Sat_system']),
int(self.cfg_get['Options_Calc']['Elev_angle']),
int(self.cfg_get['Options_Calc']['Iono_Model']),
int(self.cfg_get['Options_Calc']['Trop_Model'])
int(self.cfg_get['Options_Calc']['Trop_Model']),
int(self.cfg_get['Options_Draw']['Enable of track'])
):
case 0.0:
ExecuteState.config(text='Generated successfully ! file : %s' %resname)
@@ -382,12 +391,19 @@ class CALLBACK:
# Brief : Plot by open ksln as pos solution.
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
system = self.system.get(int(self.cfg_get['Options_Calc']['sat_system']))
path = filedialog.askopenfilename(title='Open as Pos Solution',
filetypes=[('Solution File(*.ksln)', '*.ksln'),
('All Files', '*.*')])
if not path: return
if not path.find('.ksln'):
plotstate.config(text='Error : Unsupported format !')
return
with open(path,'r')as f:
while 1:
line = f.readline()
if not line: return
if line.find('APPROX POSITION XYZ')>=0:
apx = float(line[22:35])
apy = float(line[35:48])
@@ -406,22 +422,23 @@ class CALLBACK:
elif line.find('<END OF HEADER')>=0:
plotstate.config(text="Reading...")
break
satnum = 0
ENU = np.empty((3,0))
EPO = np.empty((1,0))
NUM = np.empty((1,0))
while 1:
line = f.readline()
if not line: return
if line[0:1]=='>':
satnum = 0
EPO = np.hstack((EPO,[[float(line[1:6])]]))
plotstate.config(text='Reading...%5d/%5d Mode: Single solving'
%(int(line[1:6]), int(86400/ive)))
elif line[0:1]==self.system.get(int(
self.cfg_get['Options_Calc']['sat_system']
)) and line.find('END')==-1 and line.find('Rec')==-1:
elif line[0:1]==system:
if not line.find('END')==-1: pass
elif not line.find('Rec')==-1: pass
else:
satnum += 1
elif line.find('Rec:')>=0:
@@ -439,7 +456,7 @@ class CALLBACK:
])
ENU = np.hstack((ENU,S@ds))
NUM = np.hstack((NUM,[[satnum]]))
elif line.find('END')>=0:
if line.find('END')>=0:
# plot on the e
# -------------------------------------------------------------------
explot.clear()
@@ -499,7 +516,6 @@ class CALLBACK:
satnplot.set_title('Valid Satellite Numbers', loc='left', fontsize=8)
satnplot.set_xlabel('Epochs')
satnplot.grid(True, linestyle='--', alpha=0.7)
canvas1.draw()
f.close()
@@ -524,56 +540,108 @@ class CALLBACK:
# Brief :
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
if self.cfg_get['Options_Draw']['Enable of track']=='0':
plotstate.config(text="Track plot is not avaliable now, Please enable it.")
return
satprn = int(self.cfg_get['Options_Draw']['Track of prn'])
anirat = int(self.cfg_get['Options_Draw']['Track sample rate'])
system = self.system.get(int(self.cfg_get['Options_Calc']['sat_system']))
path = filedialog.askopenfilename(title='Open as Sat Solution',
filetypes=[('Solution File(*.ksln)', '*.ksln'),
filetypes=[('Solution File(*.ssln)', '*.ssln'),
('All Files', '*.*')])
sattrack.clear()
if not path: return
if not path.find('.ssln')>=0:
plotstate.config(text="Error : Unsupported format !")
return
with open(path,'r') as f:
while 1:
line = f.readline()
if not line: return
if line.find('APPROX POSITION BLH')>=0:
sattrack.clear()
apb = math.degrees( float(line[22:35]) )
apl = math.degrees( float(line[35:48]) )
plotstate.config(text="Plotting...")
sattrack.scatter(
apl,
apb,
color='r',
s=35,
transform=ccrs.PlateCarree()
)
sattrack.text(
apl,
apb,
blank*4+marker,
color='k',
fontsize=10,
fontweight='bold',
transform=ccrs.PlateCarree()
)
canvas2.draw()
elif line.find('GENERATE SOURCE')>=0:
marker = line[22:26]
elif line.find('TIME OF FIRST OBS')>=0:
yea = int(line[22:26])
mon = int(line[27:29])
day = int(line[30:32])
hou = int(line[33:35])
min = int(line[36:38])
sec = float(line[39:46])
elif line.find('INTERVAL')>=0:
ive = float(line[22:27])
elif line.find('<END OF HEADER')>=0:
sattrack.coastlines(resolution='110m')
sattrack.gridlines(draw_labels=True, dms=True, x_inline=False, y_inline=False)
sattrack.set_title('Ground Track of %s%02d (GPST: %04d/%02d/%02d/%02d/%02d/%7.04f)'
%(system,satprn,yea,mon,day,hou,min,sec),
loc='left',fontsize=14,weight='bold')
break
epoch = 0
while 1:
line =f.readline()
if line[0:1]=='>':
epoch = int(line[1:6])
line = f.readline()
if not line: break
if line.find('END')>=0: break
if not str(line[ 0: 1])==system: continue
if not int(line[ 1: 3])==satprn: continue
if not int(line[41:46])%anirat==0: continue
plotstate.config(text="Reading...%5d/%5d Mode: Sat track plot"
%(int(line[1:6]), int(86400/ive)))
elif line[0:1]==blank:
pass
elif line[0:1]==self.system.get(int(self.cfg_get['Options_Calc']['sat_system'])
) and line.find('END')==-1 and line.find('Rec')==-1:
if epoch % 10==0:
% (int(line[41:46]), int(86400 / ive)))
# Judge twice
if not int(line[ 1: 3])==satprn:break
b = math.degrees( float(line[ 4:13]) )
l = math.degrees( float(line[14:23]) )
sattrack.scatter(l,b,color='b',s=2,
transform=ccrs.PlateCarree())
else:
pass
elif line.find('END')>=0:
plotstate.config(text="Plotting...")
sattrack.scatter(apl, apb, color='#ff8000', s=35,
transform=ccrs.PlateCarree())
sattrack.text(apl, apb, blank * 4 + marker, color='#ff8000',
fontsize=12, fontweight='bold'
, transform=ccrs.PlateCarree())
plotstate.config(text="Reading...")
sattrack.coastlines(resolution='110m')
sattrack.gridlines()
sattrack.scatter(
l,
b,
color='b',
s=2,
transform=ccrs.PlateCarree()
)
canvas2.draw()
plotstate.config(text="Done !")
text = sattrack.text(
l,
b,
4*blank+system+'%02d'%satprn,
color='k',
fontsize=10,
fontweight='bold',
transform=ccrs.PlateCarree()
)
point = sattrack.scatter(
l,
b,
color='b',
s=10,
transform=ccrs.PlateCarree()
)
canvas2.draw()
text.remove()
point.remove()
plotstate.config(text="Done ! Track plot form: sys=%s sat=%2d interval=%2d"
% (system, satprn, anirat))
return
def _Plot2polar(self, sattrack, plotstate, canvas2):
T = threading.Thread(
+4 -5
View File
@@ -30,7 +30,7 @@ from matplotlib.backends.backend_tkagg import (
import tkinter as tk
import tkinter.font as tkfont
import cartopy.crs as ccrs
#import cartopy.feature as cfeature
import cartopy.io.shapereader as shp
import matplotlib as mpl
mpl.use('TkAgg')
import matplotlib.pyplot as plt
@@ -63,7 +63,6 @@ def _instanceABO(hwndparemt, cfg_get_, func_):
T = threading.Thread(target=lambda :instanceABO(hwndparemt, cfg_get_, func_))
T.start()
# noinspection PyUnusedLocal,PyProtectedMember
class MAINGUI:
def __init__(self, hwnd_, func_):
@@ -389,15 +388,15 @@ class MAINGUI:
plt.rc('font', family='Segoe UI')
fig = plt.figure()
self.sattrack = fig.add_subplot(
projection=ccrs.PlateCarree()
projection=ccrs.Mercator()
)
self.sattrack.coastlines(resolution='110m')
self.sattrack.gridlines()
fig.subplots_adjust(
left=0,
bottom=0.03,
bottom=0.045,
right=1,
top=0.95
top=0.90
)
for spine in ['right', 'left']:
self.sattrack.spines[spine].set_visible(False)
+82 -15
View File
@@ -42,6 +42,13 @@ class OPTGUI:
self.canglebox = None
self.angleentry = None
self.enable = tk.IntVar()
self.trackprn = tk.StringVar()
self.trackint = tk.StringVar()
self.enable.set(int(self.cfg_get['Options_Draw']['Enable of track']))
self.trackprn.set(self.cfg_get['Options_Draw']['Track of prn'])
self.trackint.set(self.cfg_get['Options_Draw']['Track sample rate'])
self.ulinewidth = None
self.nlinewidth = None
self.elinewidth = None
@@ -59,9 +66,9 @@ class OPTGUI:
self.opthwnd = tk.Toplevel(self.hwndparent)
self.opthwnd.title("Options")
self.opthwnd.resizable(0,0)
self.func.Move_center(self.opthwnd,320,250)
self.opthwnd.minsize(320,250)
self.opthwnd.maxsize(320,250)
self.func.Move_center(self.opthwnd,320,280)
self.opthwnd.minsize(320,280)
self.opthwnd.maxsize(320,280)
### Set icon
icon_ico = (b'AAABAAEAICAAAAAAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAADjsAAA47AAAAAA'
b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
@@ -184,6 +191,9 @@ class OPTGUI:
# Elev option frame
# -------------------------------------------------------------------------------
self.HANGOPT()
# Sat track opt frame
# -------------------------------------------------------------------------------
self.TRACK()
# Syst option frame
# -------------------------------------------------------------------------------
self.SYSOPT()
@@ -252,6 +262,55 @@ class OPTGUI:
self.canglebox.current(int(pos))
self.canglebox.pack(side=tk.RIGHT,anchor='e')
def TRACK(self):
# -------------------------------------------------------------------------------
# >
# Method: TRACK
# Brief : Plot satellite track by dynamic
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
SattrackFrm = ttk.LabelFrame(self.CalcuFrame, text='Satellite Track', labelanchor='nw')
SattrackFrm.pack(side=tk.TOP, expand=tk.YES, padx='0px', pady='2px', fill=tk.BOTH)
Sattrack = ttk.Frame(SattrackFrm)
Sattrack.pack(side=tk.TOP, expand=tk.YES, padx='0px', pady='0px',fill=tk.X)
SatenableBut = ttk.Checkbutton(
Sattrack,
text='Enable : (s)PRN / Plot Interval',
variable=self.enable,
onvalue=1,
offvalue=0,
command=lambda :self.func.AskOrNotCheck(
self.enable,
RateEntry,
SattprnEntry
)
)
SatenableBut.pack(side=tk.LEFT, anchor='w')
# Interval of track plot
# -------------------------------------------------------------------------------
RateEntry = ttk.Entry(
Sattrack,
width=8,
state=tk.DISABLED,
textvariable=self.trackint,
)
RateEntry.pack(side=tk.RIGHT, anchor='e')
# SPRN of satellite ploted
# -------------------------------------------------------------------------------
SattprnEntry = ttk.Entry(
Sattrack,
width=8,
state=tk.DISABLED,
textvariable=self.trackprn
)
SattprnEntry.pack(side=tk.RIGHT, anchor='e')
if self.enable.get():
RateEntry.config(state=tk.NORMAL)
SattprnEntry.config(state=tk.NORMAL)
def SYSOPT(self):
# -------------------------------------------------------------------------------
# >
@@ -296,7 +355,7 @@ class OPTGUI:
LineoptFrame.pack(side=tk.RIGHT, expand=tk.YES, padx='1px', pady='1px', fill=tk.Y)
EFrame = tk.Frame(LineoptFrame)
EFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
EFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
elinewopt = tk.Label(
EFrame,
text='Eline:',
@@ -315,7 +374,7 @@ class OPTGUI:
self.elinewidth.pack(side=tk.LEFT, expand=tk.YES, padx='1px', pady='0px')
NFrame = tk.Frame(LineoptFrame)
NFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
NFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
nlinewopt = tk.Label(
NFrame,
text='Nline:',
@@ -334,7 +393,7 @@ class OPTGUI:
self.nlinewidth.pack(side=tk.LEFT, expand=tk.YES, padx='1px', pady='0px')
UFrame = tk.Frame(LineoptFrame)
UFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
UFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
ulinewopt = tk.Label(
UFrame,
text='Uline:',
@@ -353,7 +412,7 @@ class OPTGUI:
self.ulinewidth.pack(side=tk.LEFT, expand=tk.YES, padx='1px', pady='0px')
LineCon = tk.Frame(LineoptFrame)
LineCon.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
LineCon.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
linewre = ttk.Button(
LineCon,
text='Undo',
@@ -375,11 +434,11 @@ class OPTGUI:
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
# Satnum plot options#
SatvisFrame = ttk.LabelFrame(self.PlotFrame, text='Satn configs', labelanchor='nw')
SatvisFrame = ttk.LabelFrame(self.PlotFrame, text='SatN configs', labelanchor='nw')
SatvisFrame.pack(side=tk.BOTTOM, expand=tk.YES, padx='1px', pady='1px', fill=tk.BOTH)
SatnFrame = tk.Frame(SatvisFrame)
SatnFrame.pack(side=tk.LEFT, expand=tk.YES, padx='5px', pady='0px')
SatnFrame.pack(side=tk.LEFT, expand=tk.YES, padx='5px', pady='2px')
satncollab = tk.Label(
SatnFrame,
width=5,
@@ -409,7 +468,7 @@ class OPTGUI:
LinecolorFrame.pack(side=tk.LEFT, expand=tk.YES, padx='1px', pady='1px', fill=tk.Y)
EFrame = tk.Frame(LinecolorFrame)
EFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
EFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
ecollab = tk.Label(
EFrame,
width=5,
@@ -425,7 +484,7 @@ class OPTGUI:
ecolopt.pack(side=tk.RIGHT, expand=tk.YES, padx='5px', pady='0px')
NFrame = tk.Frame(LinecolorFrame)
NFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
NFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
ncollab = tk.Label(
NFrame,
width=5,
@@ -443,7 +502,7 @@ class OPTGUI:
UFrame = tk.Frame(LinecolorFrame)
UFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
UFrame.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
ucollab = tk.Label(
UFrame,
width=5,
@@ -460,7 +519,7 @@ class OPTGUI:
ucolopt.pack(side=tk.RIGHT, expand=tk.YES, padx='5px', pady='0px')
ColorCon = tk.Frame(LinecolorFrame)
ColorCon.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='0px')
ColorCon.pack(side=tk.TOP, expand=tk.YES, padx='5px', pady='2px')
colorcon = ttk.Button(
ColorCon,
text='Undo',
@@ -496,7 +555,10 @@ class OPTGUI:
text='Confirm',
width=10,
command=lambda :[
self.func.Colorchoose(self.opthwnd, 0, None, 2),
self.func.Colorchoose(
self.opthwnd,
0, None, 2
),
self.func.Linewchoose(
self.elinewidth,
self.nlinewidth,
@@ -507,8 +569,13 @@ class OPTGUI:
self.cionbox,
self.ctrobox,
self.canglebox,
self.systemv
self.systemv,
self.trackprn,
self.trackint
),
self.cfg_get.set('Options_Draw',
'Enable of track',
'%d' % self.enable.get()),
self.opthwnd.destroy()
]
)
+55 -14
View File
@@ -23,10 +23,12 @@ class VIEWGUI:
def __init__(self, hwndparent, func):
# init
# -------------------------------------------------------------------------------
self.text = None
self.func = func
self.hwndparent = hwndparent
self.view = None
self.f_path=""
self.initGUI()
@@ -224,8 +226,13 @@ class VIEWGUI:
### File > Oprn File
filemenu.add_command(
label="Open File",
command=lambda: self.View_windowshow(text, self.view),
accelerator='Ctrl+F'
command=self.View_windowshow,
accelerator='Ctrl+O'
)
filemenu.add_command(
label="Save File",
command=self.Save_file,
accelerator='Ctrl+S'
)
### File > Exit
filemenu.add_command(
@@ -242,7 +249,7 @@ class VIEWGUI:
xbar = tk.Scrollbar(self.view, orient=tk.HORIZONTAL)
xbar.pack(side=tk.BOTTOM, fill=tk.X)
text = tk.Text(
self.text = tk.Text(
self.view,
xscrollcommand=xbar.set,
yscrollcommand=ybar.set,
@@ -251,23 +258,57 @@ class VIEWGUI:
autoseparators=False,
wrap='none'
)
text.pack(side=tk.TOP, fill=tk.BOTH)
ybar.config(command=text.yview)
xbar.config(command=text.xview)
self.text.pack(side=tk.TOP, fill=tk.BOTH)
ybar.config(command=self.text.yview)
xbar.config(command=self.text.xview)
def View_windowshow(self, text, view):
def View_windowshow(self):
# -------------------------------------------------------------------------------
# >
# Method:
# Brief :
# Author: @KenanZhu All Right Reserved.
# -------------------------------------------------------------------------------
f_path = filedialog.askopenfilename(parent=view)
if not f_path:
self.f_path = filedialog.askopenfilename(parent=self.view)
if not self.f_path:
return 0
self.view.title('Viewing: %s' % f_path)
text.delete('1.0', 'end')
with open(f_path, 'r') as f:
self.view.title('Viewing: %s' % self.f_path)
self.text.delete('1.0', 'end')
with open(self.f_path,'r',encoding='utf-8') as f:
fcon = f.read()
text.insert('insert', fcon)
text.config()
self.text.insert('insert', fcon)
self.text.config()
def Save_file(self):
filecontent = self.text.get('1.0', 'end')
if self.f_path:
with open(self.f_path,'w',encoding='utf-8') as f:
f.write(filecontent)
else:
if not filecontent=='\n':
fpath = filedialog.asksaveasfilename(
defaultextension='.txt',
parent=self.view,
title='Save As:',
filetypes=[
('Text File(*.txt)', '*.txt'),
('Solution File(*.ksln)', '*.ksln'),
('Solution File(*.ssln)', '*.ssln'),
('RINEX NAV File(*.*nav.*.hnav.*.gnav.*.qnav.*.*n.*.*g.*.*h.*.*q.*.*p)',
'*.*nav;*.hnav;*.gnav;*.qnav;*.*n;*.*g;*.*h;*.*q;*.*p'),
('RINEX OBS File(*.o*.*.*obs.*.*d)', '*.*o;*.*obs;*.*d'),
('All Files', '*.*')])
try:
with open(fpath,'w',encoding='utf-8') as f:
f.write(filecontent)
except FileNotFoundError:
self.view.title('Fail to save: %s' % fpath)
return
self.view.title('Viewing : %s' % fpath)
else:
return
Binary file not shown.
Binary file not shown.
+14 -2
View File
@@ -108,6 +108,17 @@
#define GLO 04
#define SBAS 05
#define MAXTOE_GPS 7200.0
#define MAXTOE_BDS 21600.0
#define MAXTOE_GAL 14400.0
#define MAXTOE_GLO 1800.0
#define MAXTOE_SBS 360.0
#define TIMEGAP_GPS 7200.0
#define TIMEGAP_BDS 3600.0
#define TIMEGAP_GAL 600.0
#define TIMEGAP_GLO 1800.0
#define MAXRINEX 4096 /* Max length of line of rinex file */
#define MAXPATH 260 /* Max length of file path */
@@ -377,7 +388,7 @@ extern void read_n_b(FILE*, pnav_body);
extern void read_o_h(FILE*, pobs_head);
extern void read_o_eb(FILE*, pobs_head, pobs_epoch, pobs_body);
//Contain in solutionout.cpp
extern FILE* headerout(pobs_head obs_h, char obs_path[MAXPATH], char nav_path[MAXPATH], char res_path[MAXPATH]);
extern FILE* headerout(pobs_head obs_h, int mode, char obs_path[MAXPATH], char nav_path[MAXPATH], char res_path[MAXPATH]);
extern void solution(FILE* res_file, pobs_head obs_h, double X, double Y, double Z);
extern void outdata(blh blh, FILE* res_file, int sPRN, int GNSS);
//Entry function
@@ -388,5 +399,6 @@ extern "C" _declspec(dllexport) double brdm2pos(
int GNSS,
int Hangle,
int ionopt,
int tropopt);
int tropopt,
int genmode);
+3 -6
View File
@@ -1,10 +1,4 @@
#include "brdm2pos.h"
#define MAXTOE_GPS 7200.0
#define MAXTOE_BDS 21600.0
#define MAXTOE_GAL 14400.0
#define MAXTOE_GLO 1800.0
#define MAXTOE_SBS 360.0
using namespace std;
/**
* Find the nearest obs epoch with boardcast.
@@ -296,6 +290,7 @@ void read_n_b(FILE* fp_nav, pnav_body nav_b)
case 0:
nav_b[i_g].sPRN_BDS = -1;
nav_b[i_g].sPRN_GAL = -1;
nav_b[i_g].sPRN_GLO = -1;
nav_b[i_g].sPRN_GPS = (int)strtonum(buff, 1, 2);
nav_b[i_g].TOC_Y = (int)strtonum(buff, 4, 4);
nav_b[i_g].TOC_M = (int)strtonum(buff, 9, 2);
@@ -368,6 +363,7 @@ void read_n_b(FILE* fp_nav, pnav_body nav_b)
case 0:
nav_b[i_g].sPRN_GPS = -1;
nav_b[i_g].sPRN_GAL = -1;
nav_b[i_g].sPRN_GLO = -1;
nav_b[i_g].sPRN_BDS = (int)strtonum(buff, 1, 2);
nav_b[i_g].TOC_Y = (int)strtonum(buff, 4, 4);
nav_b[i_g].TOC_M = (int)strtonum(buff, 9, 2);
@@ -440,6 +436,7 @@ void read_n_b(FILE* fp_nav, pnav_body nav_b)
case 0:
nav_b[i_g].sPRN_BDS = -1;
nav_b[i_g].sPRN_GPS = -1;
nav_b[i_g].sPRN_GLO = -1;
nav_b[i_g].sPRN_GAL = (int)strtonum(buff, 1, 2);
nav_b[i_g].TOC_Y = (int)strtonum(buff, 4, 4);
nav_b[i_g].TOC_M = (int)strtonum(buff, 9, 2);
+71 -2
View File
@@ -332,6 +332,64 @@ int sat_pos_cal(pobs_head obs_h, pobs_epoch obs_e, pobs_body obs_b,
free(in_lsq.B); free(in_lsq.P); free(in_lsq.L);
return 1;
}
/**/
int sat_cal(pnav_body nav_b, pobs_head obs_h, FILE* solu,int satnum, int GNSS) {
int ii, i, sPRN=0;
double Min, min, Weeksec=0, Beginsec, STOP=0;
pos_ts pos = { 0 };
blh in_blh = { 0 };
Beginsec = time2gpst(
obs_h->f_y,
obs_h->f_m,
obs_h->f_d,
obs_h->f_h,
obs_h->f_min,
obs_h->f_sec
);
for (i = 0; i < satnum; i++) {
switch (GNSS){
case GPS:if (nav_b[i].sPRN_GPS == -1) { continue; }
Weeksec =
fabs(sPRN - nav_b[i].sPRN_GPS) > 0 ? Beginsec : Weeksec;
sPRN = nav_b[i].sPRN_GPS;
STOP = TIMEGAP_GPS/2;
break;
case BDS:if (nav_b[i].sPRN_BDS == -1) { continue; }
Weeksec =
fabs(sPRN - nav_b[i].sPRN_BDS) > 0 ? Beginsec : Weeksec;
sPRN = nav_b[i].sPRN_BDS;
STOP = TIMEGAP_BDS/2;
break;
case GAL:if (nav_b[i].sPRN_GAL == -1) { continue; }
Weeksec =
fabs(sPRN - nav_b[i].sPRN_GAL) > 0 ? Beginsec : Weeksec;
sPRN = nav_b[i].sPRN_GAL;
STOP = TIMEGAP_GAL/2;
break;
case GLO:if (nav_b[i].sPRN_GLO == -1) { continue; }
Weeksec =
fabs(sPRN - nav_b[i].sPRN_GLO) > 0 ? Beginsec : Weeksec;
sPRN = nav_b[i].sPRN_GLO;
STOP = TIMEGAP_GLO/2+18;
break;
}
for (Weeksec; fabs(Weeksec - nav_b[i].TOE) <= STOP; Weeksec += 30.0) {
if (Weeksec - Beginsec >= DAYSEC) break;
else if (Weeksec - Beginsec >= DAYSEC - STOP) STOP += STOP;
if (GNSS != GLO) pos = sat_pos(sPRN, i, Weeksec, GNSS, nav_b, obs_h, pos);
else if (GNSS == GLO) pos = glo_pos(i, Weeksec, nav_b, obs_h, pos);
in_blh = xyz2blh(in_blh, pos.X, pos.Y, pos.Z);
outdata(in_blh, solu, sPRN, GNSS);
fprintf(solu, ">>%05d", (int)(Weeksec - Beginsec) / 30 + 1);
}
}return 0;
}
/**
* The entrance of function.
*
@@ -339,6 +397,10 @@ int sat_pos_cal(pobs_head obs_h, pobs_epoch obs_e, pobs_body obs_b,
* \param obs_path: The RINEX observation file's path
* \param res_path: The satellite position solution output path
* \param GNSS: GNSS code
* \param Hangle :
* \param ionopt :
* \param troopt :
* \param genmode:
* \return
* -1 ,Can not open the nav file
* -2 ,Can not open the obs file
@@ -356,7 +418,8 @@ double brdm2pos(
int GNSS,
int Hangle,
int ionopt,
int tropopt
int tropopt,
int genmode
)
{
int satnum, epochnum, result = 0;
@@ -413,7 +476,13 @@ double brdm2pos(
obs_h->apL = apblh.L;
obs_h->apH = apblh.H;
FILE* solu = headerout(obs_h, obs_path, nav_path, res_path);
FILE* solu = headerout(obs_h, genmode, obs_path, nav_path, res_path);
if (genmode == 1) {
sat_cal(nav_b, obs_h, solu, satnum, GNSS);
fprintf(solu, "\nEND");
fclose(solu);
return 0;
}
//Begin to calculate
for (int i = 0; i < epochnum; i++) {
+3 -2
View File
@@ -158,7 +158,7 @@ stations designmat(pobs_head obs_h, acct_obs obs,
return sta;
}
/*Output the header data of satllite position solution*/
FILE* headerout(pobs_head obs_h,
FILE* headerout(pobs_head obs_h, int mode,
char obs_path[MAXPATH], char nav_path[MAXPATH], char res_path[MAXPATH])
{
time_t gen_time;
@@ -169,7 +169,8 @@ FILE* headerout(pobs_head obs_h,
FILE* result_file = fopen(res_path, "a+");
fprintf(result_file, ">GENERATE PROGRAM : KNZ_GeoTrackLab ver%s\n", KNZ_GTL_VER);
fprintf(result_file, " GENERATE SOURCE : %.10s\n", obs_h->marker);
fprintf(result_file, " GENERATE TYPE : Satellite Position\n");
if (mode == 0); fprintf(result_file, " GENERATE TYPE : Position Resolve\n");
if (mode == 1); fprintf(result_file, " GENERATE TYPE : Satellite Position\n");
fprintf(result_file, " GENERATE TIME : %s", ctime(&gen_time));
fprintf(result_file, " OBS FILE PATH : %s\n", obs_path);
fprintf(result_file, " NAV FILE PATH : %s\n", nav_path);