Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static float getLongitudeFromNmeaString(String longitude, String WE) {
        float med = Float.parseFloat(longitude.substring(3)) / 60.0f;
        med += Float.parseFloat(longitude.substring(0, 3));
        if (WE.startsWith("W")) {
            med = -med;
        }
        return med;
    }
}