Converting gps week/seconds

Hi all -
i am working on a project that requires me to convert the GPS week number and GPS seconds to the current day and time.
I will be glad if can some one help me with the skeleton structure of the algorithm?
Thanks in advance.

Hi -
This is the code that I wrote. Ready to compile. I hope it is clear.
The gps week = 1283 which is the current week.
The gps sec = 229015 is the no. of seconds elapsed this week.
These numbers should give me the date and time as
Aug-10-2004 15:37:55 [i dont worry about the seconds] Thanks,
import java.lang.*;
import java.util.*;
public class Hello {
    public static void main(String[] args){
        int week=1283; //gps week
        int sec=229015; //gps seconds
        GregorianCalendar gc1 = new GregorianCalendar(1980,Calendar.JANUARY,6,0,0,0);
        GregorianCalendar c = new GregorianCalendar();
        long elaps = gc1.getTimeInMillis();
        System.out.println("Elapsed seconds: " + elaps);
        long time = elaps + week*7*24*3600*1000 + sec*1000;
        System.out.println("Time  "+ time);
        Date javaDate = new Date(time);
        c.setTime(javaDate);
        System.out.print(c.get(Calendar.MONTH));
        System.out.print("-"+c.get(Calendar.DATE));
        System.out.print("-" + c.get(Calendar.YEAR));
        System.out.print(" "+ c.get(Calendar.HOUR));
        System.out.print(":" + c.get(Calendar.MINUTE));
        System.out.print(":" + c.get(Calendar.SECOND));
}

Similar Messages

  • Mpeg-2 converter only converts a few seconds

    I purchased the mpeg-2 converter. It converts my vob files but just a few seconds worth. It can create a new file but it's very small - the vob file is one gig but the resulting converted file is just 40 mb or so. Also - no sound.
    What's up?
    Thanks

    How can fix or avoid?
    "Command-F"
    It is always a good idea to "fix" MPEG-2 time code breaks even if they aren't "caught" during the load. I converted 65 TV shows over the last few weeks and everything was going so well I stopped "fixing" them on show 66 thru 87. Wouldn't you know it, every one of the last 22 had a time code break at the beginning that was not caught the the loading that caused audio and video to be "out of sync" on one side of the break and "in sync" on the other. Fixed the time codes, re-converted them and every one of them worked correctly. Seems like the "hurrier" I go, the "behinder" I get.

  • Converting numeric date (seconds) to Oracle date

    Hello all,
    Not sure if this is the correct place for my question but here goes...
    I am extracting data from an Oracle table in which the date/time is stored as a number (seconds since 1970). How can I convert this to an Oracle recognized date? I tried to extract the date as a number and then convert it using the localtime function in PERL but ran into other problems. Any help or advice would be greatly appreciated.
    David

    Instead of writing PERL script if you write on a format trigger same coad (using Pl/SQL) it will work.

  • To convert value in seconds or decimal value to hr:min:sec

    Hi There,
    I got 2 keyfigures which have the same data in decimal and seconds format like 1492.000 or 1492. In the <b>query</b> I want to convert this to HR:MIN:SEC format.
    Can anybody help me to convert to hr:min:sec format. what is the formula that can convert this?
    Thanks alot
    Anima

    I checked SU01 and didn't see anything there to customize...
    In my workstation, control panel / regional and languages settings / tab regional Options / customize; my time format is HH:mm:ss; the HH has to be in capital letter to display the time in 24 hour...
    but this is strange anyway... are you reporting with web frontend or excel?

  • HOW TO CONVERT DEGREES MINUTES SECONDS TO DECIMAL DEGREES IN HP 50G

    Equation: How to write and equation that includes SIN of 10 degrees 25 minutes 15 seconds to Decimal Degrees (10.4208 degrees. OR convert 10.4208 degrees back to 10 degrees 25 minutes 15 seconds.

    Hi,
    When using the Equation Writer, you can also find commands in the CAT menu ( red rightshift SYMB ) or you can manually type them in using alpha letters too.
    However, for the numeric equation solver, you can trick RPN mode into accepting HMS-> and ->HMS as follows:
    create a program:
    <<  `B=->HMS(ACOS(SIN(HMS->(A))))`  >>                     (note: you will have to enter the brackets manually)
    Note: ` is a slanted apostrophe, obtained by press and hold  Red RightShift ( ) and '  ( ).
    Save this program as e.g. 'EQ1'
    Open the numeric solver and for "Eq:" select CHOOS then select EQ1. It should show the program equation and variables A and B. You can enter data and solve for variables as normal.
    Best regards.
    EDIT: you can actually write this program directly in the editor of the Solver without first creating EQ1.
    Note: I do not work for HP, I just like playing with calculators :-)

  • Convert timestamp from text file (hh:mm:ss) into seconds

    How can I import a column of time stamps from a text file of the form hh:mm:ss and convert it into seconds using LabView? For example, 13:30:30 into 48630.
    Also, using the "Read from Spreadsheet File VI" I can't seem to get the entire time stamp imported correctly. Only the value before the colon is read. For example, if the timestamp reads 13:30:30, only 13 is inputed into the array in LabView.
    FYI I'm using LabView 7. Thanks!

    Here's a LV 7 example. Just a Scan From String, a couple of Multiply functions and add the results. As far as your Read From Spreadsheet issue, by default, the function creates an array of SGLs. 13:30:30 is text and the functions needs to be modified to return an array of strings. There are instructions on the diagram on how to do this. When you've made the changes, save it as a new name and in a new location.
    Attachments:
    time_to_seconds.vi ‏17 KB

  • Export PDF converts ONLY PART of PDF to excel - first table skipped, second table OK

    A single PDF contains two tables (income and expense) but Export PDF converts ONLY the second table and completely ignores the first table.  (The two tables may actually be parts of one larger table, but in that case it is the first part which is ignored.)

    Hi dgoldh,
    Do you know how the PDF was created? (Choose File > Properties, and check the Description tab. It may be that the PDF was created by a third-party application and doesn't contain the proper data to ensure a clean conversion. Please see Will Adobe ExportPDF convert both text and form... | Adobe Community.
    Best,
    Sara

  • Convert seconds to 00:00:00.00.

    Is there an easy way to convert a double (seconds and tenth of a second) to 00:00:00.00 (hh:mm:ss.tt)?

    Is there an easy way to convert a double (secondsand
    tenth of a second) to 00:00:00.00 (hh:mm:ss.tt)?Why do you want to do this? It looks like you want to
    take a look at java.sql.Date
    I don't really see this problem as being applicable to using java.sql.Date or even java.util.Date. These two classes are primarily containers for a long and one needs to use a DateFormat to format the value.
    DateFormat is specialized to consider the values being formatted as the number of milliseconds since the epoch and to take into account Leap years, Leap seconds, Locale and Daylight saving. None of these attributes are applicable to the problem and could actually result in an error in the formatting.
    Having said that, if the time is small (*) then it probably won't make any difference so it could be expedient to use this approach.
    (*) I don't know how small the value needs to be to be safe but I suspect that it is about the time when daylight saving came in in 1970.

  • I am trying to convert some avi's to mp4 to enable usage with apple tv and imovie.  I have used three different software, two paid and 1 free (Skysoft, Total Converter and Handbrake) but conversion stops at 4:57 minutes.

    My computer information:  Mac (27-inch) 3 TB fusion drive, Late 2013, Procesor:3.5 GHz Intel Core i7, Memory:16 GB 1600 MHz,  Graphics: NVIDIA GeForce GTX 775M 2048 MB, Operating system: Yosemite OS X 10.10.1, iPhoto 9.6, iMovie 10.0.6, Quick Time Player 10.4, ITunes 12.0.1, VLC Version 2.1.5 Rincewind (Intel 64bit)
    I have a large number of AVI home video files that need to be converted to MP4's.  All software I have used (iSkysoft Video Converter- paid version, Total Video Converter - paid version and Handbrake - free version) have done the same thing:  the conversion starts but part way through stops and the result is an MP3 clip of exactly 4:57 minutes.  I have been working with Skysoft support with no success.  The firs attempt was with Total Video Converter.  My second attempt was with iSkysoft Video Converter trial version and it converted entire length of video but of course with watermark.  The paid version then started having the short conversion problem.  I just purchased the computer and am new to Macs. 

    Thank you for your suggestions.  The Handbrake version I have is as follows: Version 0.10.0 x86_64 (2014112200) and I am not sure what website I downloaded it from  The fact the the same problem occurs with multiple softwares makes me think it is something on my computer, a setting or something, but I have no idea what or where to look.
    I will definitely check out iFlicks and let you know.
    Thanks

  • How do I convert an audio CD format album in my library into MP3

    Here's my problem. I have two vehicles. The older vehicle only plays audio CDs and the newer vehicle will play MP3 songs. So I want to burn two CDs, an audio and an MP3.
    I imported my original CDs into iTunes and kept them in the original format, not as MP3. I then burned an audio CD and it plays correctly. Now I want to burn an MP3 CD but got an error that iTunes cannot burn the MP3 CD as the original songs are not in MP3 format. I don't know how to convert these songs to MP3 and in all the help info I have read there is nothing about this.
    I really don't want to delete these songs from the library and re-import them as MP3. that's a lot of music and time.
    Does anyone have any ideas?
    Thanks, George

    You can use iTunes to convert the songs from your CDs to another format. When you convert a song in iTunes it will be converted to the format that you have set to import your CDs in. Converting creates a second copy of the song in the format you have chosen which gives you the opportunity to either keep or delete the original. You can get details on these pages:
    How to convert a song to a different format
    How To Choose Import Settings

  • Unable to  convert the file name in Target directory

    Dear Experts,
    Currently iam facing a problem with some files.my interface is a File to file .As per the interface the sender will pick the flatfiles from source directory which the file name was BNP_NE201.txt once my file reached to target directory the name of the file willrenamed as VENDOR_Payment.NE201 automatically  for this they have done some OS level script in receiver communication channel of the first interface which we have added "un operating system command after message processing" in processing parameters tab.again one more sender comm channel wil pick the file from first target directory which is having naming  convesion of "VENDOR_Payment.NE201 " and post it to target. all the two interfaces are file to file (NFS) . for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
    from our side i check every thing .could you please suggest me the way to approch
    Reagrs,
    Kiran tanuku

    >> for a parctuclar day files has been posted to 1 st target directory and the receiver communication channel is not yet convert the file names bcz of that the second communication channel can't able to pick the files from target directory. for some times that is working fine and some times it is unable to convert.
    You need to wait until the file is converted. After when it is converted then the second interface sender communication channel will pick the files.
    What do u mean by unable to convert?
    Is it unable to do the content conversion? if so then check the data as you said that it sometimes it works fine.
    > The best approach is to change the name of the file in the receiver communciation channel instead of using a script.
    Thanks,

  • Help for Seconds to Duration (hh:mm:ss) conversion

    I have this SubVI that is to convert Seconds to Duration (hh:mm:ss). This SubVI works fine for converting Seconds below 54000 (15:00:00) but the subsequent Seconds, for instance (57600 seconds), it returns Duration -8:00:00 instead of 16:00:00.
    My SubVI is attached below. Would any kind souls please help ??.... thanks...
    Note : - I've included the ConvertDurationToSeconds.vi to allow you to convert Duration to Seconds
    Attachments:
    ConvertSecondsToDuration.vi ‏40 KB
    ConvertDurationToSeconds.vi ‏20 KB

    Judging by you code and the results you reported I guess you are the other side of the world from me.
    I just happened to have worked with a driver that was provided by Cincinati Sub-Zero as part of the LabVIEW driver that supports one of their temperature chambers.
    As part of the driver they include a VI that does exactly what you want. CSZ does not support this driver, so do not call them for help. The sub-VI is included below.
    The issues that are hitting you here are patially addressed in a memo posted to Info-LabVIEW by Rolf.
    I include the same below.
    Ben
    "LewisDrake" wrote:
    >Another annoyance related to time changes is that the LabVIEW XY graphs,
    >formatted to show Time & Date on the X axis, generate major tic marks that
    >aren't synched to midnight local time. Instead, they place major tics at
    >7:00pm (in the US Eastern time zone). Before the time shift, they showed
    >major tics at 8:00 pm. Of course, they have always been off by the offset
    >between GMT and the computer's location.
    LabVIEWs internal time (seconds since January 1, 1904, midnight UTC) are UTC
    based. All times displayed on a frontpanel however are in local time which is
    dependant on the time zone set in the OS.
    >I believe that the major tic locations are determined from midnight GMT
    >rather than from midnight local time. To display properly, one must
    >configure Windows to use GMT instead of local time and turn off automatic
    >time adjustments.
    If you want to have a graph set to Time & Data and display only the time to get
    a nice 24 hours display for instance (relative time format has unfortunately
    not the same formating features as the absolute time) you can easily get that
    by setting the X axis offset to the appropriate offset of (24 * 3600 -
    (timezone offset)). This is a one time thing when opening the graph window
    and then the graph displays fine with 00:00 ......
    There are utilities on the Info-LabVIEW site, I believe developed by Stepan
    Riha, to get the actual UTC offset correctly calculated. It isn't really
    difficult just a little bit diff calculation and proper 24 hours overflow
    handling.
    >I WISH NI WOULD FIX THIS.
    Not so simple without causing many more problems for existing applications.
    Also using UTC as internal time format is a good choice, it really is! And
    displaying local time for absolute times is also what 99% of the users expect
    to see, so a good choice too.
    The only workable approach I see is either improve the formating capabilities
    of the relative time display to allow similar display formats as in the
    absolute time format and/or add an option to the absolute time format to
    display UTC instead of local time. But above fix can solve the problem nicely.
    Rolf Kalbermatter
    CIT Engineering Nederland BV tel: +31 (070) 415 9190
    Treubstraat 7H fax: +31 (070) 415 9191
    2288 EG Rijswijk http://www.citengineering.com
    Netherlands mailto:[email protected]
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Time_Conversion.vi ‏49 KB

  • Convert OPML to Voracious' format

    I just stumbled on Xyne's Voracious feed aggregator, and liked the look of it (I had thought of writing something similar). I had a big fat OPML file though, which I didn't want to move into this new format by hand, so I wrote a Perl script to do it.
    I don't have anywhere nice to host it, so if someone wants to throw it up someplace, feel free. Otherwise, if you make use of it, it would be cool to hear any feedback, I haven't thrown many different files at it.
    The first argument should be the OPML file to convert, an optional second argument says where to output, or by default it will put it in the default Voracious config location so be careful not to overwrite an existing config.
    #!/usr/bin/env perl
    # Converts an OPML file to a format readable by Voracious.
    # Written by Trevor Vallender <tsv AT tsv DOT me DOT uk>.
    # Released into the public domain.
    use warnings;
    use strict;
    use XML::XPath;
    my $input;
    my $output;
    sub main {
    get_args( );
    open( OUTPUT, ">", $output ) or die $!;
    print( OUTPUT "[paths]\n/\n" );
    my $xp = XML::XPath->new( filename => $input );
    foreach my $outline ( $xp->find( '/opml/body/outline' )->get_nodelist ) {
    parse_outline( $outline, '', \*OUTPUT );
    close( OUTPUT );
    sub parse_outline {
    my ( $outline, $parent, $fref ) = @_;
    if ( $outline->find( '@type' )->string_value eq 'folder' ) {
    $parent .= '/'.$outline->find( '@title' )->string_value;
    $parent =~ s/ /_/g;
    print( $fref $parent . "\n");
    foreach my $subol ( $outline->find( 'outline' )->get_nodelist ) {
    parse_outline( $subol, $parent, $fref );
    } elsif ( $outline->find( '@type' )->string_value eq 'vfolder' ) {
    # Ignore them
    } else {
    print( $fref "\t" . $outline->find( '@xmlUrl' )->string_value . "\n" );
    sub get_args {
    my $config_path = "/voracious/config.txt";
    if ( $#ARGV == 0 ) {
    $input = $ARGV[0];
    if ( $ENV{XDG_CONFIG_HOME} ) {
    $output = $ENV{XDG_CONFIG_HOME} . $config_path;
    } else{
    $output = "~/.config" . $config_path;
    } elsif ( $#ARGV == 1 ) {
    $input = $ARGV[0];
    $output = $ARGV[1];
    } else {
    print STDERR "Invalid input\n";
    exit;
    main( );

    Hi ,
    Try this link:
    https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-GettingPDFfilefromspooling+list
    This is a good example of saving files from splooing list.
    May it helps you.
    Regards.
    DS

  • Adobe Audition 3.0.1 - Saving/Converting WAV's to MP3 adds small amounts of time to my MP3 files !!?

    Hello.
    I am new to the Forum, but turning to the masses out there for help with a weird one!
    I have used Adobe Audition for YEARS. I do a lot of converting of my finished WAV files to Mp3 files. The finished WAV's have always been in 48000Hz, 16 bit Stereo, and are always mixed to the specified time (e.g. 15, 30 or 60 seconds duration). These are then converted to mp3 files, using the 'Save As' option, choosing the 'Save As Type' as mp3PRO (Fhg) (*.mp3) option.
    My conversion settings have always been:
    CBR, mp3, 320Kbps 48000Hz Stereo (4:8:1), Maximum bandwith = 24000Hz, CBR Rate = 320, Sample Rate = 48000Hz, Codec = Current - Best Quality, Allow mid-side joint stereo, allow intensity joint stereo, Set 'Private' Bit, ISO Padding, Write CRC Check Sums.
    ...Now, for some strange reason, ever since last night, whenever I do the above process - the resulting mp2 file seems to ADD ON little bits of time...from 0.048 of a second to around 0.168 of a second..!!??? So to further clarify: If I convert a 15 second WAV file to mp3 - the resulting mp3 file ends up being slightly longer in duration at: 15.168 seconds..???
    This has never happened before. And, a solution has got me beat.
    I have tried different conversion settings, different configurations - even saving the initial WAV as a lower sample rate - but, no joy.
    I have an old version of Adobe Audition 2.0 on a different machine - and guess what?! Even IT does this same weird thing now too.
    It doesn't seem to matter if I REC and convert new files or convert old files - same problem.
    Even opening up mp3 files - that I KNOW were spot on for time - now also have these little bits of extra time added to them, once they are openned...??? What the...!!??
    I spent over half an hour on the phone with Adobe Tech support, earlier this afternoon. They got me to reset all of my user configuration files - but, didn't slove the issue!
    PLEASE:     Has anyone experienced this same conversion issue..? I would also be interested to know, if anyone else replicates these conversion settings, if they get the same problem..?
    Could this be one of those good old Windows update things..?
    Does anyone know if there are updates available for Auditions built-in mp3PRO encoder / decoder..?
    PLEASE HELP !!!
    Thank you, in advance.
    John.

    Well I don't know how you've missed this before, but it's always done it. It's a throwback to Syntrillium days, when it was discovered that some MP3 players managed to cut off the starts and finishes of MP3 files. The developers got around this by adding a small amount of silence when coding an MP3. Originally, Audition's loop files were MP3-based as well, but these didn't have the added silence, because obviously that would screw up the looping a treat. But as far as I'm aware, even though players are better now (aren't they???), the additional silence remains.
    I'm not surprised that the help desk doesn't know about this - it's a bit subtle. And with the best will in the world, they only have the crib sheets they're given, and they certainly don't cover everything that happens.

  • Time stamps in Seconds from Epocho

    Hi,
    I have a requirement, where I need to calculate the Time stamp for sy-datum.
    That is. I have to calculate the number of seconds from 01/01/1970.
    www.unixtimestamp.com
    gives more infor. But how do I do this in my report?

    Hi Jurgeon,
    The function module I used is 'L_MC_TIME_DIFFERENCE'. This gives time difference between two dates and time in minutes. I later converted this to seconds by multiplying by 60.
    Thanks for your suggestion.
    Thanks,
    Chaith.

Maybe you are looking for

  • Import failed in Con System

    Hello everybody, I did some development using the NWDS (JDI installed). After i have checked in my application / activated it and released it it was shown in the import queue at the Consolidation Tab of the CMS application. So far everything worked g

  • System login details capture

    Hi All, I have a requirement in ApEx where in I need to restrict the number of times a particular survey is answered. I know that the IP address can be found, but again this is not enough.(As multiple users use the same system due to shifts based ope

  • BPC 7.5: Delta Load when loading from BI InfoProvider

    Hi, in BPC 7.5 running a package based on Process Chain "CPMB/LOAD_INFOPROVIDER" loads data directly from an SAP BI Infoprovider into an BPC-Cube. According to the options you can choose "Merge Data Values" or "Replace & Clear DataValues" According t

  • Cgicmd.dat & Reports server problem

    I have problem using key map file to access Reports from the Web. I have Reports Server configure and used with rwcgi60 placed at ..Apache\cgi-bin\ It works fine with full url path (eg ..cgi-bin\rwcgi6?server=repserver+report=my.rdf+destype=cache+des

  • Where are my folders and collections?

    I had many photos and collections created in lightroom - now I only get some.  They are in my storage - but for some reason they do not show up in the library - where are they and what causes this?