How to calculate satellite position using ephemerides data - gps

I got a problem regarding ephemerides data.
The description of the ephemerides data is located here:
http://www.navcen.uscg.gov/pubs/gps/sigspec/gpssps1.pdf
I can extract the bits/bytes that are important. I just don't know how to interprete them.
It seems there is no information about that. I guess from the document that it should contain Keplerian data to calculate the position of a satellite in "WGS-84 Earth-Centered Earth-Fixed" format, which is what I need.
This document says that I can calculate the final position "utilizing a variation of the equations shown in Table 2-15"
The parameters that I need to fill into this terms are
Cus Cuc Crc Crs Cic Cis IDOT toe io
I know how long these parameters are, but not where to start to read them inside of the datastream
Looking at page 32, I see that they are there, but where they are inside of this block of "words", thats a secret for me.
Can anyone help ?
I dont ask anyone to read the whole pdf, thats a bit too much, but maybe someone has a deep knowledge regarding this topic already.
And this terms are a bit confusing, because some of them are defined recursive
A = sqrt(A^2)
vk = something * Ek
Ek = something * vk
Thanks in advance

I'm currently working on similar problems. So far the opensource library gnss-sdr has been of great help. Especially src/core/system_parametes/gps_navigation_message.cc where the function
int Gps_Navigation_Message::subframe_decoder(char *subframe)
which decodes and stores each subframe is defined.

Related

CHM/HHP: maximum length of variable names in [ALIAS] section

What is the maximum length of variable names in the [ALIAS] section of HHP files?
I_AM_WONDERING_ABOUT_THE_MAXIMUM_LENGTH_OF_THIS_STRING_RIGHT_HERE=this-is-some-really-helpful-html-file.html
I have found a CHM/HHP specification right here:
https://www-user.tu-chemnitz.de/~heha/viewchm.php/hs/chmspec.chm/hhp.html
That page only talks about the length of the overall line, though (and not about the length of the variable name). Very specific question, I know. Still, someone may be able to point me somewhere.
As far as I know never asked before and I never heard about limitations. But I think this is because nobody used long variable names in this place so far.
The purpose of the two files e.g. alias.h and map.h is to ease the coordination between developer and help author. The mapping file links an ID to the map number - typically this can be easily created by the developer and passed to the help author. Then the help author creates an alias file linking the IDs to the topic names. That was the idea behind years (decades) ago by Ralph Walden (ex Microsoft).
Please note HTMLHelp is about 20 years old and these context ID strings inside a alias.h file were derived from WinHelp as a predecessor of HTMLHelp.
You'll find some further Information at Creating Context-Sensitive Help for Applications.
In general I'd recommend to use ID's with a fixed format because of the better legibility like shown below:
;-------------------------------------------------------------
; alias.h file example for HTMLHelp (CHM)
; www.help-info.de
;
; All IDH's > 10000 for better format
; last edited: 2006-07-09
;---------------------------------------------------
IDH_90001=index.htm
IDH_10000=Context-sensitive_example\contextID-10000.htm
IDH_10010=Context-sensitive_example\contextID-10010.htm
IDH_20000=Context-sensitive_example\contextID-20000.htm
IDH_20010=Context-sensitive_example\contextID-20010.htm
I'd recommend to use less than 1024 bytes per line.

Extracting Data from an Area file

I am trying to extract information at a specific location (lat,lon) from different satellite images. These images are were given to me in the AREA format and I cooked up a simple jython script to extract temperature values like so.
While the script works, here is small snippet from it that prints out the data value at a point.
from edu.wisc.ssec.mcidas import AreaFile as af
url="adde://localhost/imagedata?&PORT=8113&COMPRESS=gzip&USER=idv&PROJ=0& VERSION=1&DEBUG=false&TRACE=0&GROUP=FL&DESCRIPTOR=8712C574&BAND=2&LATLON=29.7276 -85.0274 E&PLACE=ULEFT&SIZE=1 1&UNIT=TEMP&MAG=1 1&SPAC=4&NAV=X&AUX=YES&DOC=X&DAY=2012002 2012002&TIME=&POS=0&TRACK=0"
a=af(url);
value=a.getData();
print value
array([[I, [array([I, [array('i', [2826, 2833, 2841, 2853])])])
So what does this mean?
Please excuse me if the question seems trivial, while I am comfortable with python I am really new to dealing with scientific data.
Note
Here is a link to the entire script.
After asking around, I found out that the Area objects returns data in multiples of four. So the very first value is what I am looking for.
Grabbing the value is as simple as :
ar[0][0][0]

Why does this search for [help/dont-ask] return irrelevant results in DSE?

Why does this ridiculously simple query on data.stackexchange.com return results that don't have [help/dont-ask] in the comment text? I feel like I'm missing something mind-numbingly obvious here.
select top 10 Id, PostId, Text
from comments
where text like '%[help/dont-ask]%'
Results I currently get:
Id PostId Text
-- ------- -----------------------------------
1 35314 not sure why this is getting downvoted -- it is correct! Double check it in your compiler if you don't believe him!
2 35314 Yeah, I didn't believe it until I created a console app - but good lord! Why would they give you the rope to hang yourself! I hated that about VB.NET - the OrElse and AndAlso keywords!
4 35195 I don't see an accepted answer now, I wonder how that got unaccepted. Incidentally, I would have marked an accepted answer based on the answers available at the time. Also, accepted doesn't mean Best :)
9 47239 Jonathan: Wow! Thank you for all of that, you did an amazing amount of work!
10 45651 It will help if you give some details of which database you are using as techniques vary.
12 47428 One of the things that make a url user-friendly is 'discover-ability', meaning you can take a guess at url's simply from the address bar. http://i.love.pets.com/search/cats+dogs could easily lead to http://i.love.pets.com/search/pug+puppies etc
14 47481 I agree, both CodeRush and RefactorPro are visually impressive (most of which can be turned off BTW), but for navigating and refactoring Resharper is much better in my opinion of using both products.
15 47373 Just wanted to mention that this is an excellent solution if you consider the problem to be linear (i.e. treating `A1B2` as a single number). I still think the problem is multi-dimensional, but I guess we'll just have to wait for the author to clarify :)
16 47497 Indeed, the only way to do this is get the server to generate your CSS file which can be done in many ways depending on which language you are using. HttpHandlers are common in C#. You could use jQuery or the likes to add styling to every element with the class 'ourColur' and parametrise your JS
18 47513 This advice goes against the spirit of CSS, which is separation of content and presentation. You way requires changing HTML for presentation sake, and stating in content which elements have same color.
...none of which contains the magic link (or even the text dont-ask).
Because [] delimits a set of characters to find.
You need to escape them.
Or just use CHARINDEX as the search is unsargable anyway.
WHERE CHARINDEX('[help/dont-ask]', text) > 0

how do you flatten and unflatten an array of doubles in labview?

I have created a simple LabView program shown below that attempts to flatten an array [1,0,3] and then unflatten it and print out the contents.
However, I am unsuccessful in doing so. What am I doing wrong?
What am I doing wrong?
You're not going through tutorials or you're not reading the context help for the unflatten function (Ctrl+H) or you're not reading the full help for the function (right click>>Help) or you're not looking at the examples (from the help or Help>>Find Examples). Take your pick (preferably all four).
If you want an actual answer it is that LV is strictly typed, and therefore you need to tell the unflatten function which data type you want it to output (1D DBL array) and you're not doing that, but the real answer is what's in the previous paragraph - you should use those tools to learn how to find such an answer yourself.
The string returned by Flatten to String only contains the data, not the description of what data type was passed in, so in order to unflatten it again you need to tell Unflatten from String what type it was. You do this by wiring some data of the appropriate type (any data - if it's an array it can be an empty one) to the Type terminal.
I don't think this is immediately obvious from the LabVIEW 2012 help but I think it's fairly clear if you follow the link from the Unflatten from String help page to one of the examples. The Read Flattened Data.vi example has an array wired to the Type input.

Create a simple "subway" map in vb.net

I'm making an small logistics-oriented map...
I got an datatable containing users and their current locations (like station names), i got an image with all the "stations" and routes between 'em.
Current task is to warn when two users might meet (i.e. one user is one-two stations far from other one) and make statistics report (what stations users visit most), but i don't know where to start.
What's the most economic way to implement this?
I looked on GIS software, but i don't know how to make roads - and work with them too; there's too much unneeded stuff and no functions i need, or i did not found them so far.
Can you do it with php+JS(jQuery) and SQL? Because I think it's the bettter way to do this. Like an in-line app.
But if you really need to do this with VB.net I will try to answer your question:
The most economic way to implement this (I think) Is to make your own functions writen in .net something like:
Function get_number_of_users_in(stationID)
Function draw_user_in_image(userID)
and all the functions you may need...
After this, you can start to making your main program with a graphic interface, you could simply add a timmer to refresh your countent (Images, with a position...)
You can implement a grid and put your image over it, so you can display users like a point in X,Y coordenate. Like:
******************************
* Your image *
* -------------------------- *
* - - *
* - Your grid - *
* -------------------------- *
******************************
Next, you set the fixed coordenates like Station-1 = [(4,5)]
And controle the position with something like this in your main prg:
If get_user_next_to_station(userID) Then
msgBox('An user is close to station'&get_station_name(stationID)'!!')
EndIf
Sory for my probably erros in VB that's been a while I didn't touch this language xD But it's only for show you how you can do this.
Well I think this is the way I would do it, that depends on you and your time and skills in programming. Hope this helped you, if you need more help, you can ask me, there is no problem. Good luck !