Open Alexustas opened 8 years ago
This is interesting. How did you set it up?
it was surprisingly easy to do )
config
PROP
{
name = NavScreenTestProp
MODULE
{
name = JSIVariableAnimator
refreshRate = 2
VARIABLESET
{
controlledTransform = ACFT_LAT_Loc
variableName = LATITUDE
scale = -90,90
localTranslationStart = 0,0,0.05
localTranslationEnd = 0,0,-0.05
}
VARIABLESET
{
controlledTransform = ACFT_LONG_Loc
variableName = LONGITUDE
scale = -180,180
localTranslationStart = 0.1,0,0
localTranslationEnd = -0.1,0,0
}
VARIABLESET
{
controlledTransform = TGT_LAT_Loc
variableName = TARGETLATITUDE
scale = -90,90
localTranslationStart = 0,0,0.05
localTranslationEnd = 0,0,-0.05
}
VARIABLESET
{
controlledTransform = TGT_LONG_Loc
variableName = TARGETLONGITUDE
scale = -180,180
localTranslationStart = 0.1,0,0
localTranslationEnd = -0.1,0,0
}
VARIABLESET
{
controlledTransform = ARFT_MarkerObj
variableName = MATH_ASET_AZ
scale = -180,180
localRotationStart = 0,180,0
localRotationEnd = 0,-180,0
longPath = yes
}
}
}
// CUSTOMs setup
RPM_MATH_VARIABLE
{
name = ASET_LAT_DIFF
operator = SUBTRACT
sourceVariable = LATITUDE
sourceVariable = TARGETLATITUDE
}
RPM_MATH_VARIABLE
{
name = ASET_LONG_DIFF
operator = SUBTRACT
sourceVariable = LONGITUDE
sourceVariable = TARGETLONGITUDE
}
RPM_MATH_VARIABLE
{
name = ASET_AZ
operator = ATAN2
sourceVariable = MATH_ASET_LAT_DIFF
sourceVariable = MATH_ASET_LONG_DIFF
}
the main thing is that I can replace the coordinates of targets at any fixed values, such as the coordinates of the runway and then it will be possible to do something like the instrument approach procedure. Also you can enter the coordinates of waypoints and receive course on them
The problem is that I can calculate the direction, but I can not find the distance to a fixed point, using the capabilities of PRM. I have useful information on this subject, but I can not pull it off. maybe I should create request?
I have/had the configs that did just that. I was trying to make an ILS but then NavUtilities exposed its variables and made all my work irrelevant. It uses: d = sqrt((X2 - X1)^2 + (Y2 - Y1)^2) This uses the 'flat earth' method so it will lose accuracy, let me know if your interested because I'm very interested with where this is going.
maybe I should create request?
A request would be good as a reminder. I've been pretty busy on something else lately, so I will forget if I don't have a reminder. :)
I want to make a simple navigation system, independent of the third-party mods. something like a radio navigation system based on a network of virtual NDB and VOR, located in the surroundings of KSC and the island
NAV Radio and ADF is not yet connected to each other. I still need to "build" a radionavigation network, ie, specify the location and frequency of all stations and draw charts.
Wow. That looks very cool.
I thought of adding support for MechJeb waypoint definitions in RPM (not requiring MechJeb, but able to read a MechJeb waypoint file, and then use them in RPM). They don't have a frequency field, but it may be possible to add a frequency field without MechJeb getting upset about it.
In this case, the frequency - the main thing. depending on the frequency setting, the appropriate radio beacon is selected and substituted its coordinates to calculate the relative bearing
So, what has been done:
!!!! I am speechless.
Well, almost speechless: does this mean when these are finished you can work on a Globus navigation system for those of us who fly spaceships instead of airplanes? :)
I didn't even think this was possible. You are amazing and I hope there is more to come!
you can work on a Globus navigation system
OK )). let's go back to the IMP ("Globus")
Also, how are you storing the nav waypoints? Is that a SELECT_ variable?
Yes
1 - "tune" radio to the station
// station frequences ==========================================
// location_type_(freq,name)
// KSC ILS DME RWY 27 (110.10,"IWE")
RPM_CUSTOM_VARIABLE
{
name = ASET_NAV_1_RADIO_KSC_ILS27_IWE
operator = AND
SOURCE_VARIABLE
{
name = PERSISTENT_ASET_NAV_Radio_1_ACTIVE_FREQ
range = 110.09,110.11
}
SOURCE_VARIABLE
{
name = CUSTOM_ASET_NAV_1_RADIO_ON
range = 0.1, 1.1
}
SOURCE_VARIABLE
{
name = ORBITBODYINDEX
range = 0.1, 1.1
}
}
...
2,3 - find station coordinates
// switch station coordinates ====================================
// select station LATITUDE ----
RPM_SELECT_VARIABLE
{
name = ASET_NAV_1_STATION_LATITUDE
defaultValue = 0
// - - - KSC ILS DME RWY 27 (IWE)
VARIABLE_DEFINITION
{
name = CUSTOM_ASET_NAV_1_RADIO_KSC_ILS27_IWE
range = 0.1, 1.1
value = -0.05023564553
}
...
// select station LONGITUDE ----
RPM_SELECT_VARIABLE
{
name = ASET_NAV_1_STATION_LONGITUDE
defaultValue = 0
// - - - KSC ILS DME RWY 27 (IWE)
VARIABLE_DEFINITION
{
name = CUSTOM_ASET_NAV_1_RADIO_KSC_ILS27_IWE
range = 0.1, 1.1
value = -74.51769428769
}
...
4 - find station altitude
// station altitude (ASL) ========================================================
// select station ALTIITUDE ----
RPM_SELECT_VARIABLE
{
name = ASET_NAV_1_STATION_ALTITUDE
defaultValue = 0
// - - - KSC ILS DME RWY 27 (IWE)
VARIABLE_DEFINITION
{
name = CUSTOM_ASET_NAV_1_RADIO_KSC_ILS27_IWE
range = 0.1, 1.1
value = 70
}
...
Is it possible to add runways to the configuration if one is using KerbinSide?
I myself do not plan to carry out support "KerbalSide". This is a very serious amount of work and a lot easier to do it for those who develops or maintains this mod. And I think it's better to make a separate navigation for "KarbalSide" instead of combining it with the Stock
some nice little feature. kind of tooltips...
KSP 1.2 will have support for user-saved waypoints. Avionics Systems (the replacement for RPM that I am designing) will be designed to use those waypoints, and I will make sure it is possible to import waypoints from a config file, too.
OK. will see that will make Squad and how it will work
and meanwhile, I started to make charts (o_O)
o_O indeed!
I definitely must make waypoint navigation a first-class feature.
Update ("Bolt" prop fixed aswell) https://www.dropbox.com/s/r0rewgrhp06417t/ASET_Dev-20-08-2016.zip?dl=0 and Improved charts
I noticed that 'Dropbox' viewer incorrectly displays the fonts in the chart. you better use the Acrobat viewer
Bloody beautiful charts, mate!
Bloody beautiful charts, mate!
Have you already tested navigation system?
As long as KSP allows me to read the waypoint database, any new beacon can be added using that name format, and MAS will be able to say, "A-ha! This waypoint is a VOR named AAA1, and its frequency is 108.1".
due to the operating principle of of radio navigation (you do not fly from point A to point B, but flying along the antenna beams, broadcasted by stations) do not necessarily to mix waypoints with the navigation station. it may be a separate config file having a different syntax. Waypoints are very suitable for GPS navigation (which is a particular case of RNAV)
radio navigation - it's the same thing that you are traveling by car with a bundle of paper maps and read road signs and trying to understand where you are now and where you need to turn.
but waypoints (and GPS) - is a nice LCD display which is very helpfully draws colored lines and arrows, and you just have to listen to the sweet voice from the speaker and execute what she tells you to. something like that ))
due to the operating principle of of radio navigation (you do not fly from point A to point B, but flying along the antenna beams, broadcasted by stations) do not necessarily to mix waypoints with the navigation station. it may be a separate config file having a different syntax.
Yes, but the waypoint database may still be useful to maintain and organize the data. Just because the radio navigation beacon is stored in the waypoint database, I don't have to use KSP's waypoint system to display it.
I don't have to use KSP's waypoint system to display it.
OK!
I believe a complete description of the station must have the following fields:
STATION NAME (in real life is the name of the city or settlement, near which the station is located)It consists of one or two words
STATION IDENTIFIER. 3 uppercase letters
IDENTIFIER MORSE CODE. there can be specified URL to the audio file. or perhaps have the opportunity to built-in generator Morse code, which will read the ID and play sounds ("point" or "dash") in accordance with the letters? it would be very cool
STATION LATITUDE (degree format)
STATION LONGITUDE (degree format)
STATION ALTITUDE (ASL)
STATION TYPE. VOR, NDB, ILS
Okay, We can have a config file format that will provide all of these fields. I think use the field names you have, only without 'station' (eg, name
, identifier
, latitude
, longitude
, altitude
, and type
). Do you want transmitter strength / range also, or do all Kerbin NAV radios have the same range?
IDENTIFIER MORSE CODE
Unity allows me to schedule audio clips. If there are sound files for each letter, I can arrange them to play automatically using the station identifier.
Do you want transmitter strength / range also, or do all Kerbin NAV radios have the same range?
I was thinking about the stations ranges and came to the conclusion that it simply increase the number of stations and complicate the whole system. so that in my implementation the range of the station depends on its type: NDB - the lowest, BOP - intermediate, DME - the greatest distance. Moreover, the range of each particular station depends on the altitude above sea level. so in fact they already have a different range
IDENTIFIER MORSE CODE
I see three ways to implement this feature:
First, I create a finished soundtrack for each the identifier, as is done currently.
Second, I can create a soundtrack for each letter (we only need the letters), and then I need a script that will decode and play back the ID code with the specified pauses between the individual letters
The third method. I create only two sounds: a short and a long beep. and then I need a script which will decode ID and create a series of commands for the 'soundplayer' module with specified intervals between the individual beeps and individual letters. this is the best, but also the most complicated to implement a method
also, you need to know that the station broadcasts its identifier approximately once per minute
I tried to find a ready-made scripts (link,link,link) for Morse code, but my several-hour dive into the study of Lua does not give me any chance to understand what the hell is going on out there
What I am thinking about is a module called navigation
. It will have methods like SetStation
and PlayStationIdentifier(true)
or PlayStationIdentifier(false)
that will automatically play the station identifier. If it is one minute interval, that is easy for the navigation
module to do. All it will need are the morse code letters (one WAV file per letter), and it will know how to create the correct morse code sequence.
so, we talk about the second method? right?
If it is one minute interval, that is easy for the navigation module to do.
and of course, the code should only be played if "IDENT" button is pressed on the receiver. So most of the time this feature will be idle
What I am thinking about is a module called navigation.
probably it would be better if I move further discussion of this feature in your Navigation topic? And here will be only issues relating to nav devices and nav station network
so, we talk about the second method? right?
I think this is the best method. 3rd method is complex, and 1st method means creating a new sound file for each station, and also means someone can not customize stations on their own installation.
probably it would be better if I move further discussion of this feature in your Navigation topic?
Yes, I think so.
proof of concept
https://youtu.be/Ju7v41btQSM