GPS from Adafruit (arduino) to pixels. Need urgent help with the format

edited July 2014 in Library Questions

Hello, I have the following data: Location is 4042.6142,N (Latitude 40 degrees, 42.6142 decimal minutes North) & 07400.4168,W. (Longitude 74 degrees, 0.4168 decimal minutes West) in Google maps, +40° 42.6142', -74° 00.4168. It works.

I need to convert it onto pixels. I know GoogleMapper library which is great. My problem is the format, I don't know how to translate it, because GoogleMapper uses dd.ddddd° (40.710237, -74.006947) and I have dd° mm.mmm' (4042.6142,N,07400.4168,W). Someone knows how to translate this formate?

Thanks a lot David

Answers

  • Ok I have found the answer! Just dividing by /60 the internal MM.MMMM

    1. (48.225/60), -79.(59.074/60)
      43.(0.80375), -79.(0.98456)
      43.80375, -79.98456

    eg. 07717.3644 E is the DDMM.MMMM format

    077 --> degrees 17 --> minutes .3644 --> minutes equals to sec/60

    decimal = degrees + minutes/60 decimal = 77 + (17.3644 / 60)
    decimal = 77.28941

Sign In or Register to comment.