What data type is a latitude and longitude?

incomingMsgId = LoRa.read(); what datatype does the read method return?

I'm not sure. I was assuming it was returning the same data type that was sent.

How would it know?

kgray9:
Do you know if sending the data with LoRa is messing up the large numbers?

A LoRa device is just a radio device that sends a packet of bytes that you give it. The radio device does not 'mess up' or change these bytes (packet errors excepted). If it did it would be no use at all as a radio device.

If what you send is not what is displayed at the receiver, then its a problem with your code.

I don't know. This is all it says in the LoRa.h:
virtual int read();

It says its "From stream"
Library here:
src

You’re sending a byte array.
You’re assigning what you receive to a float.
I can’t see the library, but I suspect what read returns is a byte, not a byte array.

I suggest you put this code aside, and just send something simple, like a single unsigned long with a distinctive value, like 0xdeadbeef, and make sure that’s what you receive.

@srnet I was saying that maybe I was using the LoRa library improperly.

Oh. Could I just transform the received information from byte to float and it would work? And if so, how would I transform it? Would this work? float() - Arduino Reference

A byte is eight bits.
A float is thirty-two bits.

A four element byte array is. . . thirty-two bits.

Sorry. I'm still pretty new. When I send a float, it is received as 4 bytes? So Latitude would be received as LoRa.read(); 4 times in a row?

When you send your float, you lie to the compiler and tell it that that it’s not a float, it’s a four byte array.
So, at the receiver, you need to make a similar lie.

kgray9:
When I send a float, it is received as 4 bytes?

Its sent as 4 bytes and thus received as 4 bytes.

I think you need to strip everything out of your code except the LoRa transfer until you get your head around this. All the other stuff (GPS, Blynk, OTA, etc) is just distracting clutter.

Also, did you mention what type boards you’re using? If one is an AVR and the other an ESP-type, then you have another problem. A float is 4 bytes on the former and 8 bytes on the latter.
Corrected in Replies 33 and 34 below.

Assuming they’re the same type, the procedure you need to perform on the RX side will go something like this:

  constexpr uint8_t numFloatBytes {sizeof(float)};
  char tempBuffer[numFloatBytes];
  float floatValue;


  for (uint8_t i = 0; i < numFloatBytes; i++) {
    tempBuffer[i] = LoRa.read();
  }
  memcpy((void *)&floatValue, tempBuffer, numFloatBytes);

gfvalvo:
If one is an AVR and the other an ESP-type, then you have another problem.

A float is 4 bytes on the former and 8 bytes on the latter.

A float is 8 bytes on a ESP32 etc ?

A double is 8 bytes for sure.

srnet:
A float is 8 bytes on a ESP32 etc ?

A double is 8 bytes for sure.

I just rechecked and you're right. Float is 4 and Double is 8. One less problem for OP to worry about.

gfvalvo:
I just rechecked and you're right. Float is 4 and Double is 8. One less problem for OP to worry about.

With the working example GPS tracker programs in my own LoRa library, which use TinyGPS++, a float as latitude or longitude sends as 4 bytes, and it matters not if the TX is an Arduino Pro Mini and the receiver is an ESP32, or vice versa.

srnet:
With the working example GPS tracker programs in my own LoRa library, which use TinyGPS++, a float as latitude or longitude sends as 4 bytes, and it matters not if the TX is an Arduino Pro Mini and the receiver is an ESP32, or vice versa.

Yes we're in violent agreement. A float is 4 bytes on all those platforms. That's what I said in Reply #34.

Thanks all. So the TX code is good?

Thanks @gfvalvo for the example code in post #32. Would you mind explaining a little what exactly it does? Here's what I think it does:
constexpr?
You define numFloatBytes as the size of a float,
More definitions,
For loop reading the correct amount of bytes from the LoRa,
memcpy?
What does the last sentence mean? In place of "&floatValue", I can put "latitude"?
Thanks again!

memcpy

constexpr was probably superfluous. const would have worked.

kgray9:
Thanks all. So the TX code is good?

No, the TX code has problems too. You're trying to tackle too much at once and got too many things wrong. That's why I suggested you cut things down to just the bare minimum of sending a single float from TX to RX. Dump everything else. Baby steps.