NMEA icon indicating copy to clipboard operation
NMEA copied to clipboard

ارسال مختصات بدست آمده از پورت سریال

Open mhsh68y opened this issue 6 years ago • 5 comments

سلام خیلی ممنون از سورسی که قرار دادید. من با دستور زیر می تونم کل خروجی مکانیاب را که با پورت سریال3 به میکرو ارسال می شه را از طریق پورت سریال 2 به رایانه ارسال کنم. HAL_UART_Transmit(&huart2,GPS.rxBuffer,sizeof(GPS.rxBuffer),500);

ولی نمی تونم طول و عرض جغرافیایی تبدیل شده را روی پورت سریال2 به تنهایی ارسال کنم.

منظور GPS.GPGGA.LatitudeDecimal و GPS.GPGGA.LongitudeDecimal است.

لطفا راهنمایی بفرمایید.

mhsh68y avatar Apr 23 '19 18:04 mhsh68y

سلام.  شما میتونین با sprintf یه آرایه رو با اطلاعات دلخواه خودتون پر کنین و اونو ارسال کنیدOn Apr 23, 2019 10:46 PM, mhshamsinejad [email protected] wrote:سلام خیلی ممنون از سورسی که قرار دادید. من با دستور زیر می تونم کل خروجی مکانیاب را که با پورت سریال3 به میکرو ارسال می شه را از طریق پورت سریال 2 به رایانه ارسال کنم. HAL_UART_Transmit(&huart2,GPS.rxBuffer,sizeof(GPS.rxBuffer),500); ولی نمی تونم طول و عرض جغرافیایی تبدیل شده را روی پورت سریال2 به تنهایی ارسال کنم. منظور GPS.GPGGA.LatitudeDecimal و GPS.GPGGA.LongitudeDecimal است. لطفا راهنمایی بفرمایید.

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

nimaltd avatar Apr 23 '19 18:04 nimaltd

من کد زیر را استفاده کردم ولی جواب نگرفتم char mybuff[50]; . . . sprintf(mybuff,"%S",GPS.GPGGA.LatitudeDecimal); HAL_UART_Transmit(&huart2,(uint8_t*)mybuff,sizeof(mybuff),30);

mhsh68y avatar Apr 23 '19 18:04 mhsh68y

%s نیست%d دسیمال%f اعشاریGoogle بزنید.  توضیحات کامل میادOn Apr 23, 2019 11:03 PM, mhshamsinejad [email protected] wrote:من کد زیر را استفاده کردم ولی جواب نگرفتم

char mybuff[50];

.

.

.

sprintf(mybuff,"%S",GPS.GPGGA.LatitudeDecimal);

HAL_UART_Transmit(&huart2,(uint8_t*)mybuff,sizeof(mybuff),30);

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

nimaltd avatar Apr 23 '19 18:04 nimaltd

salam,mamnoon az komaketoon. moshkele asli az str=strstr((char*)GPS.rxBuffer,"$GPGGA,"); bood k bayad b jaye $GPGGA az $GNGGA estefade mikardam. ehtemalan too majol gps man intori boode. alan dorost shod.bazam mamnoon.

mhsh68y avatar Apr 26 '19 17:04 mhsh68y

خواهش میکنم.  نباید اینجوری باشه.  استانداردنOn Apr 26, 2019 9:40 PM, mhshamsinejad [email protected] wrote:salam,mamnoon az komaketoon. moshkele asli az str=strstr((char*)GPS.rxBuffer,"$GPGGA,"); bood k bayad b jaye $GPGGA az $GNGGA estefade mikardam. ehtemalan too majol gps man intori boode. alan dorost shod.bazam mamnoon.

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

nimaltd avatar Apr 26 '19 22:04 nimaltd