Git Product home page Git Product logo

edmtools's People

Contributors

ironcitysoftware avatar wannamak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

edmtools's Issues

Exception in thread "main" org.joda.time.IllegalFieldValueException: Value 15 for monthOfYear must be in the range [1,12]

I'm not able to get the J.P. Instruments software installed (in the case of EzTrends - does not detect SQL Server Compact 4.0) or working (in the case of EzSave) so I tried to extract my data with this tool.

This is the exception I receive:

Exception in thread "main" org.joda.time.IllegalFieldValueException: Value 15 for monthOfYear must be in the range [1,12]
        at org.joda.time.field.FieldUtils.verifyValueBounds(FieldUtils.java:252)
        at org.joda.time.chrono.BasicChronology.getDateMidnightMillis(BasicChronology.java:612)
        at org.joda.time.chrono.BasicChronology.getDateTimeMillis(BasicChronology.java:177)
        at org.joda.time.chrono.AssembledChronology.getDateTimeMillis(AssembledChronology.java:133)
        at org.joda.time.chrono.ZonedChronology.getDateTimeMillis(ZonedChronology.java:118)
        at org.joda.time.chrono.AssembledChronology.getDateTimeMillis(AssembledChronology.java:133)
        at org.joda.time.base.BaseDateTime.<init>(BaseDateTime.java:258)
        at org.joda.time.base.BaseDateTime.<init>(BaseDateTime.java:199)
        at org.joda.time.DateTime.<init>(DateTime.java:397)
        at edmtools.FlightParser.parseUnixTimestamp(Unknown Source)
        at edmtools.FlightParser.parseFlightHeader(Unknown Source)
        at edmtools.FlightParser.parseHeaderAndSkipData(Unknown Source)
        at edmtools.JpiDecoder.decode(Unknown Source)
        at edmtools.tools.JpiDecode.run(Unknown Source)
        at edmtools.tools.CommandLineTool.initAndRun(Unknown Source)
        at edmtools.tools.JpiDecode.main(Unknown Source)

It could be that my files are corrupted but I suspect it may be because the file format has changed. These files were generated by a number of EDM 830s. Funnily enough the EzSave software complains about the date too:

EzSave

Here's the relevant bit of code:

  private long parseUnixTimestamp(int packedDate, int packedTime) {
    int year = (packedDate & 0xfe00) >> 9;
    year += (year >= 75) ? 1900 : 2000;
    DateTime dateTime = new DateTime(
        year,
        (packedDate & 0x01e0) >> 5,
        packedDate & 0x001f,
        (packedTime & 0xf800) >> 11,
        (packedTime & 0x07e0) >> 5,
        (packedTime & 0x001f) * 2);
    return dateTime.getMillis() / 1000;
  }

Could it be that the mask or the bitshift have changed? Or that packedDate and packedTime are at a different offset within the binary data?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.