Menu

Southern hemisphere issue with possible fix

Anonymous
2010-07-17
2013-02-26
  • Anonymous

    Anonymous - 2010-07-17

    Maybe it's just me, but flying in the southern hemisphere in flightgear doesn't work: jmapview thinks I'm in the northern hemisphere.

    Though I'm no Java programmer, a quick look in the source code (mapapp/PositionWorker.java) shows this might be a fix:

    --- D:/Cop/jmapview/src/mapapp/PositionWorker.java.old  Thu Mar 19 12:57:36 2009
    +++ D:/Cop/jmapview/src/mapapp/PositionWorker.java  Sat Jul 17 14:44:44 2010
    @@ -42,7 +42,7 @@
             double lat = 0;
             double lon = 0;
             String east_west = null;
    -        String north_south;
    +        String north_south = null;
             try {
                 DatagramSocket sock = new DatagramSocket(5500);
                 DatagramPacket rx_packet = new DatagramPacket(b, b.length);
    @@ -68,6 +68,9 @@
                     }
                     if (i == 4) {
                         north_south = data;
    +                    if (north_south.equalsIgnoreCase("S")) {
    +                        lat = -lat;
    +                    }
                     }
                     if (i == 5) {
                         double lon_1 = new Double(data.substring(0, 3));
    

    Clemens, could you confirm/fix this if you have time?

    Thanks.

     
  • Anonymous

    Anonymous - 2010-07-17

    Yes, that does seem to fix things.

    I've compiled it and uploaded the fixed executable version:
    http://filebin.ca/xrfmh/jMapView.jar

     
  • RealFlash

    RealFlash - 2013-02-26

    Thanks for the fix Jim. I have applied it to the source and tested it successfully. It will be included in the next release. If you are still using jMapView and have any other issues you want addressed, please let me know.

     

Log in to post a comment.

MongoDB Logo MongoDB