From c53a6cf6941cb9d49944b4a0e95c82fda9afff5d Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 20 Mar 2021 09:59:59 -0400 Subject: [PATCH] debug toAprsFormat .MM --- afsk/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index 6e851f8b..c7e377c6 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -1980,7 +1980,13 @@ float toAprsFormat(float input) { // converts decimal coordinate (lattitude or longitude) to APRS DDMM.MM format int dd = (int) input; int mm1 = (int)((input - dd) * 60); - int mm2 = (int)((input - dd - mm1/60) * 60 * 60) ; + int mm2; // = (int)((input - dd - mm1/60) * 60 * 60); + float mm21 = input - dd - mm1/60 + print("%f ", mm21); + mm21 = mm21 * 60 * 60; + print("%f ", mm21); + mm2 = (int)mm21; + print("%d ", mm2); float output = dd * 100 + mm1 + mm2 * 0.01; return(output); }