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 getLatitudeFromNmeaString(String latitude, String NS) {
        float med = Float.parseFloat(latitude.substring(2)) / 60.0f;
        med += Float.parseFloat(latitude.substring(0, 2));
        if (NS.startsWith("S")) {
            med = -med;
        }
        return med;
    }
}