![]() |
Semi-automatic Celestial Navigation
Original don1reed: http://www.subsim.com/radioroom/show...llarium&page=2
Yesterday, based on the original idea of don1reed(Thank you sir!) I began to work on the semi-automatic CelNav to implement this nice function in Silent Hunter 5: 1. phase (Under development): Using Python script to get the needed data from the only actual CampaignMission.mis file. Push this to the startup.ssc(The new Stellarium script extension) they made a whole new API so I needed to mine deep into. 2. phase (In the very near future): After I made my celestial body inspects, Stars, Moon, Sun etc. I'd like to calculate my current pos with an application written in C# or B#. Pros: . You don't need to know your Current Pos, before you begin to calculate your Current Pos :D. That was funny :). . If you're not a navigator or a hobby astronomer yet you can enjoy the success with your CelOb inspects. . You can navigate in bad weather too or even under water, but that's not realistic so not recommended. Cons: . You need some software: Stellarium above 0.11.3, The Python interpreter ( Future: automated install with everything, and batch file to execute) and my exe file from 2. phase (Required: Dotnetfx 2.0 or above). . You need time, patience, and time :D Interest, if you want to navigate like a real navigator. I use Python for data mine, because of it's talent in. Visual family from Microsoft is best for object-oriented programming (2. phase). Software reqs: .Python .Stellarium 0.11.3 or above (if they change the programming language in the future, then I need some modification) Important: you need to configure config.ini, change timezone to UTC time and change display settings to best your system is capable. |
have a look at this thread : http://www.subsim.com/radioroom/showthread.php?t=194033
|
Thank you Flostt!
I read this thread before, I'm not a modder, but I think I can help Silent Marshal. I'm eager to do this first written below and I am curious about your opinion. Are you interested? I just want to bring closer this thing to the ordinary people. |
1. phase
Progress:
Code:
import fileinput,string,sys,csv Everybody can use this script, because it finds the Uboat data ergo the Unit 1. Results: my.active.uboat.data.txt content: Code:
Name=U-33 Changes: .Added code snippet so we have our latitude and longitude in decimal using the my.active.uboat.data.txt file. |
The ScriptManager exposes a function that one can call to get the player's position at anytime :yep: There's no need to do what you are doing...
|
Thank you for your guide. That makes everything simpler.
|
Quote:
|
Maybe I used the "inspect", because of my limited English. I meant to click on the stars and write down the needed data.
If I correctly understand your question, I don't think about hardening the way to get star position. In this first step, I want it to work. Your job is reduced to choose your navigation object's, note the needed data, give this to the app. I think about triangulation and square operation in this start. If you make more triangulation you get more precise position. I think, but don't know, in IRL they used actual navigation star data books based on the latitudes, almanacs, sun moon charts. They calculated position's with boards. Today we use math based apps to get this job done. - We can limit our options in Stellarium if somebody understand the Stellarium programming language. But if you limit, you need a tool to extract this data. |
Quote:
Almanacs 39-45 and sight reduction tables are also availeable for free. An option in stellarium could be: if act wind_sh5 = 1 then FOView_Stellarium = max 80 if act wind_sh5 = 3 then FOView_Stellarium = max 75 if act wind_Sh5 = 6 then FOView_Stellarium = max 65 etc. FOV-values in stellar. make the star-positioning more difficult/inaccurater |
1. phase is done, but this is not the correct way...
Thank you CaliEs!
This will be very useful to refine the Stellarium options. Please note CaliEs' modifications one below to make the navigation more difficult. - Stellarium will show your ingame sky always as you execute, correct dates(read below). Script is working, but read the information below. The script carries the navdata(your location, time) from mission files into the Stellarium's startup file automatically without user input. You need to run the batch file, when you would like to see your sky in Stellarium. If you feel lost, don't hesitate to contact me. Download: http://www.mediafire.com/?9swhqak15l9a502 Alt.download: http://www.sendspace.com/file/i22sa1 (Click on below "Click here to start download from...") Warning: This is not the final scipt, because it needs user friendly modifications and using needless methods to get the navdata. - I don't know the game programming architecture so I need to study Ironpython to make navigational data pick the correct way from the game itself instead of using mission files and avoid text manipulation. So there will be an other script and this will be trashed. The script is using brute string manipulations to make the job so I apologize. It prints values, but don't need them. Their purpose is testing the success of data mine. It doesn't change any file in your install or in your user folder only grabbing data to the 2 txt files it creates.(date.txt, my.active.uboat.data.txt) If you want Backup your mission file, but the script only reads it. Requirements: Important install information: You need to write your file paths, directory paths into the script before running it(don't use "find and replace" because script using \\ to describe paths). I marked the needed modifications. You need to do this only once except your mission file. If you go to a new patrol, you need to change it to point the new file.(This will be fixed later, to auto find your paths). If you make a new profile in the game, you have new folder, new mission file, so you must show the script the new file. Needed applications: Python 2.7 default paths in script: C:\Python27 Stellarium 0.11.4 or above (older Stellarium uses other language, so "no go!") default paths in script: C:\Program Files\Stellarium Default path for .mis file: C:\Users\This.is.your.name\Documents\SH5\data\User s\This.is.your.in.game.name\Campaign-This.is.your.date\CampaignMission.mis Important changes in Stellarium config.ini: Default path: C:\Users\This.is.your.name\AppData\Roaming\Stellar ium Backup your config.ini. Use your resolution from ingame in Stellarium, change the values: [localization] ... ... time_zone = GMT . Note: this is a req, without this your Stellarium will apply your GMT shift and mess up date. [video] ... ... screen_h = (Example: 1080) screen_w = (Example: 1920) . You need the script and the python.exe in one folder, you run the whole with a batch file. This is not difficult but not user-friendly. If you aligned everything you need only change your .mis file location occasionally. I really much appreciate if you try this script and beta test for me. If this works to you I can step forward. |
If not user-friendly then many people will not try/use it. That's just the way it is :shifty:
I have no need for your idea as I have a working real navigation in my UIs mod (thus no need to test it). I do feel you are overcomplicating things. I would suggest you learn the game's architecture (what functions the scriptmanager exposes and how to use them) first. It will make things so much easier for you/everyone else :yep: You'll also probably get a much better response/feedback if this was originally posted in the SH5 Mods forum. |
Yes, I know but invested too much time in it to trash out the whole thing. That's why I posted. I need time to learn game architecture.
Next time, I will post in the SH5 mods topic. |
Quote:
|
Thank you! I felt we misunderstood each other. I really like your Real Navigation, just hard to calculate position in game, the way it meant.
Mod: I started IronPython to make the new script :). First experience: Moon is a problem in game so I can see 1 hour shift of the Moon from GMT. |
Quote:
Code:
Traceback(most recent call last): |
All times are GMT -5. The time now is 12:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.