Oh, degrees and minutes and fractions of minutes, which you want to
convert to degrees and fractions (in which case you meant dd.dddd). Is
that right?
Are you starting with the 5204.28330 as a string "5204.28330" or is it
already converted to a number? It would be easier if you started with
the string, then you can take the first two characters as the degrees,
convert the rest to a number and divide it by 60 and add to the
degrees (having converted that to a number first).
If it is already converted to a number it is a little more complex,
you will have to divide it by 100, take the integer part as the
degrees then take the fractional part and multiply by 100 again to
turn it back to minutes then divide by 60 to make it fractional
degrees and add that to the integer degrees.
Colin
Colin
>
https://groups.google.com/d/msgid/node-red/78198891-57fd-40d6-9ac1-52b1516944d3%40googlegroups.com.