MavLink packing and sending information to GCS

https://pastebin.com/ntuQUis2

So I am using mavlink c_library_v2, Atmel Studios 7, ATMega 328PB, and I am trying to figure out which packing function to use. I have been reading the MAVLink and Arduino: step by step. Unfortunately, they are only interacting with the pixhawk, where I am trying to send data to the GCS. Still it helped me understand MAVlink a little better. According to this article on https://ardupilot.org/dev/docs/mavlink-routing-in-ardupilot.html, as long as the target_system is not set or is 0 it will get routed to the other telem port.

My issue is I am using mavlink_msg_data64_pack() from the ardupilotmega.h file, and it will not proceed past this function. It doesn’t have a target system parameter, and I will be eventually sending 2 float values so 64 bits is perfect. I am unsure what other pack I should use because I have looked through all the other possibilities. The only alternative I am thinking is using the log pack? Which resides in the common folder, but I am just unsure.

Reading all the posts, it seems like it should be as easy as packing, msg->buffer, then send it over to UART and have it automatically routed to the GCS through telemetry. Then it should apparently appear in tlog files according to https://ardupilot.org/planner/docs/common-mission-planner-telemetry-logs.html.

After doing more research, I am guessing the ardupilotmega does not work. I am assuming I will have to create my own messages if I wanted to send LIDAR and luminosity sensor data to the ground control for it to graph it? And I’ll have to also modify mission planner also for it to graph? Is that correct?